更新了表格列设置的问题
This commit is contained in:
		
							parent
							
								
									d74dbaaa9f
								
							
						
					
					
						commit
						9f38a6e3ac
					
				| 
						 | 
					@ -558,6 +558,11 @@ end;
 | 
				
			||||||
          begin
 | 
					          begin
 | 
				
			||||||
            mcatpion:=StringReplace(mcatpion,'[COLOR=#FF0000]*[/COLOR]','',[rfIgnoreCase]);
 | 
					            mcatpion:=StringReplace(mcatpion,'[COLOR=#FF0000]*[/COLOR]','',[rfIgnoreCase]);
 | 
				
			||||||
            ShowMessage('【'+mcatpion+'】,数据不能为空!');
 | 
					            ShowMessage('【'+mcatpion+'】,数据不能为空!');
 | 
				
			||||||
 | 
					            // ÉèÖý¹µã
 | 
				
			||||||
 | 
					              if  (TdxLayoutItem(dxLayoutControl1.Items[i]).Control is TWinControl) then
 | 
				
			||||||
 | 
					             begin
 | 
				
			||||||
 | 
					                TWinControl(TdxLayoutItem(dxLayoutControl1.Items[i]).Control).SetFocus;
 | 
				
			||||||
 | 
					             end;
 | 
				
			||||||
             exit ;
 | 
					             exit ;
 | 
				
			||||||
          end;
 | 
					          end;
 | 
				
			||||||
        end;
 | 
					        end;
 | 
				
			||||||
| 
						 | 
					@ -597,6 +602,11 @@ begin
 | 
				
			||||||
          begin
 | 
					          begin
 | 
				
			||||||
            mcatpion:=StringReplace(mcatpion,'[COLOR=#FF0000]*[/COLOR]','',[rfIgnoreCase]);
 | 
					            mcatpion:=StringReplace(mcatpion,'[COLOR=#FF0000]*[/COLOR]','',[rfIgnoreCase]);
 | 
				
			||||||
            ShowMessage('【'+mcatpion+'】,数据不能为空!');
 | 
					            ShowMessage('【'+mcatpion+'】,数据不能为空!');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					             if  (TdxLayoutItem(dxLayoutGroup.Items[i]).Control is TWinControl) then
 | 
				
			||||||
 | 
					             begin
 | 
				
			||||||
 | 
					                TWinControl(TdxLayoutItem(dxLayoutGroup.Items[i]).Control).SetFocus;
 | 
				
			||||||
 | 
					             end;
 | 
				
			||||||
             exit ;
 | 
					             exit ;
 | 
				
			||||||
          end;
 | 
					          end;
 | 
				
			||||||
        end;
 | 
					        end;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -32,8 +32,7 @@ procedure ShowCxGridDesign(application: TApplication;
 | 
				
			||||||
function checkColumnMustIn(app: TApplication; tv1: TcxGridDBTableView;
 | 
					function checkColumnMustIn(app: TApplication; tv1: TcxGridDBTableView;
 | 
				
			||||||
  mFlag: integer): Boolean;
 | 
					  mFlag: integer): Boolean;
 | 
				
			||||||
// stdcall;external 'rtCommon.dll' Name 'checkColumnMustIn_A';
 | 
					// stdcall;external 'rtCommon.dll' Name 'checkColumnMustIn_A';
 | 
				
			||||||
function checkColumnMustIn_A(app: TApplication; tv1: TcxGridDBTableView;
 | 
					function checkColumnMustIn_A(app: TApplication; tv1: TcxGridDBTableView;client1: TClientDataSet; mFlag: integer): Boolean;
 | 
				
			||||||
  client1: TClientDataSet; mFlag: integer): Boolean;
 | 
					 | 
				
			||||||
procedure getColumnRelation(tv1: TcxGridDBTableView; client1: TClientDataSet);
 | 
					procedure getColumnRelation(tv1: TcxGridDBTableView; client1: TClientDataSet);
 | 
				
			||||||
function SaveGridSetInfoToBase(mCxGridView: TcxGridDBTableView; client1:TClientDataSet;
 | 
					function SaveGridSetInfoToBase(mCxGridView: TcxGridDBTableView; client1:TClientDataSet;
 | 
				
			||||||
  ADOCmd: TADOQuery; designCode: string): Boolean;
 | 
					  ADOCmd: TADOQuery; designCode: string): Boolean;
 | 
				
			||||||
| 
						 | 
					@ -473,8 +472,7 @@ end;
 | 
				
			||||||
// end;
 | 
					// end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
function checkColumnMustIn(app: TApplication; tv1: TcxGridDBTableView;
 | 
					function checkColumnMustIn(app: TApplication; tv1: TcxGridDBTableView;mFlag: integer): Boolean;
 | 
				
			||||||
  mFlag: integer): Boolean;
 | 
					 | 
				
			||||||
var
 | 
					var
 | 
				
			||||||
  i: integer;
 | 
					  i: integer;
 | 
				
			||||||
  client1: TClientDataSet;
 | 
					  client1: TClientDataSet;
 | 
				
			||||||
| 
						 | 
					@ -520,25 +518,38 @@ end;
 | 
				
			||||||
    mfieldName:string;
 | 
					    mfieldName:string;
 | 
				
			||||||
  begin
 | 
					  begin
 | 
				
			||||||
    result:=false;
 | 
					    result:=false;
 | 
				
			||||||
    for i := 0 to tv1.ColumnCount-1 do
 | 
					    try
 | 
				
			||||||
    begin
 | 
					       tv1.DataController.DataSet.DisableControls;
 | 
				
			||||||
     // ADBColumn :=TcxGridDBColumn( tv1.Columns[i] );
 | 
					      for i := 0 to tv1.ColumnCount-1 do
 | 
				
			||||||
      if tv1.Columns[i].Tag = mFlag then
 | 
					 | 
				
			||||||
      begin
 | 
					      begin
 | 
				
			||||||
        with tv1.DataController.DataSet do                //
 | 
					         if tv1.Columns[i].Tag = mFlag then
 | 
				
			||||||
        begin
 | 
					         begin
 | 
				
			||||||
          if not client1.Locate('caption',tv1.Columns[i].Caption,[]) then Continue;
 | 
					           with tv1.DataController.DataSet do                //
 | 
				
			||||||
          if tv1.Columns[i].DataBinding.Field.DataType<>ftString then Continue ;
 | 
					           begin
 | 
				
			||||||
          mfieldName :=trim( client1.FieldByName('fieldName').AsString);
 | 
					             // if not client1.Locate('caption',tv1.Columns[i].Caption,[]) then Continue;
 | 
				
			||||||
          if locate( mfieldName, null, []) or locate( mfieldName, '', []) then
 | 
					             //  if tv1.Columns[i].DataBinding.Field.DataType<>ftString then Continue ;
 | 
				
			||||||
          begin
 | 
					             mfieldName :=trim(tv1.Columns[i].DataBinding.FieldName);
 | 
				
			||||||
            Application.MessageBox(PChar(tv1.Columns[i].Caption + '²»ÄÜΪ¿Õ!'), 'Ìáʾ', 0);
 | 
					             First;
 | 
				
			||||||
            exit;
 | 
					             while not eof do
 | 
				
			||||||
          end;
 | 
					             begin
 | 
				
			||||||
        end;
 | 
					                if trim(FieldByName(mfieldName).AsString) = '' then
 | 
				
			||||||
 | 
					                begin
 | 
				
			||||||
 | 
					                  Application.MessageBox(pchar('¡¾'+PChar(tv1.Columns[i].Caption + '¡¿²»ÄÜΪ¿Õ!')), 'Ìáʾ', 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                 // tv1.Controller.FocusedRowIndex := 0;
 | 
				
			||||||
 | 
					                 // tv1.Controller.FocusedColumn:=tv1.Columns[i] ;
 | 
				
			||||||
 | 
					                 // tv1.Controller.MakeFocusedItemVisible  ;
 | 
				
			||||||
 | 
					                  exit;
 | 
				
			||||||
 | 
					                end;
 | 
				
			||||||
 | 
					                Next;
 | 
				
			||||||
 | 
					             end;
 | 
				
			||||||
 | 
					           end;
 | 
				
			||||||
 | 
					         end;
 | 
				
			||||||
      end;
 | 
					      end;
 | 
				
			||||||
 | 
					       result:=true;
 | 
				
			||||||
 | 
					    finally
 | 
				
			||||||
 | 
					       tv1.DataController.DataSet.EnableControls ;
 | 
				
			||||||
    end;
 | 
					    end;
 | 
				
			||||||
    result:=true;
 | 
					 | 
				
			||||||
  end;
 | 
					  end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
///////////////////////////////////
 | 
					///////////////////////////////////
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user