unit U_ShowHelpForm;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, ToolWin, StdCtrls,DBGrids, DB, cxDBData, ADODB,StrUtils,
  Midas, ExtCtrls, Buttons,DBClient,FTComboBox,BtnEdit;

procedure SelMember(Selmem:TBtnEditA;stuffFlag:string;stuffDept:string;other:string);
procedure SelSupply(Selmem:TBtnEditA);
procedure SelCust(Selmem:TBtnEditA);
procedure SelMember10(Selmem:TBtnEditC;stuffFlag:string;stuffDept:string;other:string);
procedure SelCust10(Selmem:TBtnEditA);
procedure SelCust20(Selmem:TBtnEditC);

implementation
uses
  U_adodbmd,U_global,U_StuffHelp,U_SupplyHelp,U_frameHelp,U_CustHelp;


////////////////////////////////
///函数功能：取员工编号和姓名
///////////////////////////////
procedure SelMember(Selmem:TBtnEditA;stuffFlag:string;stuffDept:string;other:string);
begin
  try
    frmStuffHelp:=TfrmStuffHelp.Create(Application);
    with frmStuffHelp do
    begin
      fFrameNo:=stuffDept;
      if ShowModal=1 then
      begin
        Selmem.TxtCode:=Trim(ADOQueryHelp.fieldbyname('code').AsString);
        Selmem.Text:=Trim(ADOQueryHelp.fieldbyname('name').AsString);
      end;
    end;
  finally
    frmStuffHelp.Free;
  end;
end;

procedure SelMember10(Selmem:TBtnEditC;stuffFlag:string;stuffDept:string;other:string);
begin
  try
    frmStuffHelp:=TfrmStuffHelp.Create(Application);
    with frmStuffHelp do
    begin
      fFrameNo:=stuffDept;
      if ShowModal=1 then
      begin
        Selmem.TxtCode:=Trim(ADOQueryHelp.fieldbyname('code').AsString);
        Selmem.Text:=Trim(ADOQueryHelp.fieldbyname('name').AsString);
      end;
    end;
  finally
    frmStuffHelp.Free;
  end;
end;


///////////////////////////////////
///函数功能：取供应商的编号和名称
//////////////////////////////////
procedure SelCust(Selmem:TBtnEditA);
begin
 { try
    frmCustHelp:=TfrmCustHelp.Create(Application);
    with frmCustHelp do
    begin
      if ShowModal=1 then
      begin
        Selmem.TxtCode:=Trim(ADOQuery1.fieldbyname('CustomNo').AsString);
        Selmem.Text:=Trim(ADOQuery1.fieldbyname('ShortName').AsString);
      end;
    end;
  finally
    frmCustHelp.Free;
  end;}
end;
procedure SelCust10(Selmem:TBtnEditA);
begin
  try
    frmSupplyHelp:=TfrmSupplyHelp.Create(Application);
    with frmSupplyHelp do
    begin
      if ShowModal=1 then
      begin
        Selmem.TxtCode:=Trim(ADOQueryHelp.fieldbyname('CustomNo').AsString);
        Selmem.Text:=Trim(ADOQueryHelp.fieldbyname('ShortName').AsString);
      end;
    end;
  finally
    frmSupplyHelp.Free;
  end;
end;
procedure SelCust20(Selmem:TBtnEditC);
begin
  try
    frmSupplyHelp:=TfrmSupplyHelp.Create(Application);
    with frmSupplyHelp do
    begin
      if ShowModal=1 then
      begin
        Selmem.TxtCode:=Trim(ADOQueryHelp.fieldbyname('CustomNo').AsString);
        Selmem.Text:=Trim(ADOQueryHelp.fieldbyname('ShortName').AsString);
      end;
    end;
  finally
    frmSupplyHelp.Free;
  end;
end;
procedure SelSupply(Selmem:TBtnEditA);
begin
  {try
    frmSupplyHelp:=TfrmSupplyHelp.Create(Application);
    with frmSupplyHelp do
    begin
      if ShowModal=1 then
      begin
        Selmem.TxtCode:=Trim(ADOQueryHelp.fieldbyname('CustomNo').AsString);
        Selmem.Text:=Trim(ADOQueryHelp.fieldbyname('ShortName').AsString);
      end;
    end;
  finally
    frmSupplyHelp.Free;
  end;}
end;




end.
