unit CGGL_CGDDSP_C;interfaceuses Windows, SPCortrol, classes, CGGL_CGDDSP_D, dbtables, Common , MTypes, Forms,
     DB;type
  TControl_CGGL_CGJHSP = class(TSPCortrol)
  private
    //
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
    procedure Auditing; //执行审批  end;implementation{ TControl_CGGL_CGJHSP }procedure TControl_CGGL_CGJHSP.Auditing;
begin
  P_TYSP('CGDD', MTable.Table_ZB.FieldByName('ddid').AsString);  if F_spgltj('CGJH') = '' then
  begin
    MTable.Table_ZB.Filter := 'ddid is null';
    MTable.Table_ZB.Filtered := True;
    Application.MessageBox('没有您可审批的单据!', '提示信息', MB_OK or MB_ICONINFORMATION);
  end
  else
  begin
    MTable.Table_ZB.Filter := F_spgltj('CGDD');
    MTable.Table_ZB.Filtered := True;
  end;
end;

解决方案 »

  1.   

    是公共的就写在public中定义就行是局部的就在private中写就可以呀
      

  2.   

    在类中定义过程和函数:
    1、加入其类中;
    2、独立单元中定义过程:
         Unit Unit2;
          inteface;
          Type
              Tabc=class();
              Procedure HHH(var a:integer);
               .
               .
              end;
          var
             abc:Tabc;
              .
              .
              .
    3、在unit1中调用unit2中定义的过程
     (1)、uses Unit2(加在变量区后);
      (2)、调用:
             例:abc.HHH();