possch.pas

来自「飞恒进销存(超市批发)管理系统V5.1(含源程序) 语言:Delphi 6/7」· PAS 代码 · 共 63 行

PAS
63
字号
unit PosSch;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Unitmb, ImgList, Menus, ComCtrls, Buttons, ToolWin, Mask,
  DBCtrls, dbcgrids, Grids, DBGridEh, StdCtrls, FR_Ctrls, ExtCtrls,
  DBCtrlsEh;

type
  TPosSchForm = class(TmbForm)
    lblAmount: TLabel;
    edtTakeAmt: TEdit;
    edtAmount: TEdit;
  private
    { Private declarations }
    procedure ShowMasterSpecial(bAdd:boolean);override;
  public
    { Public declarations }
  end;

var
  PosSchForm: TPosSchForm;

implementation

uses datamodule1;

{$R *.dfm}
procedure TPosSchForm.ShowMasterSpecial(bAdd:boolean);
var
  s,sSql:string;
begin
  with DataE2 do
  if not bAdd then
  begin
    nEmployId:=adoquery1.fieldbyname('EmployId').asinteger;
    sMasterMemo:=trim(adoquery1.fieldbyname('Memo').asstring)+trim(adoquery1.fieldbyname('cardID').asstring);

    edtAmount.Text:=trim(adoquery1.fieldbyname('BillAmt').asstring);
    edtTakeAmt.Text:=trim(adoquery1.fieldbyname('TakeAmt').asstring);
    edtStore.Text:=trim(adoquery1.fieldbyname('Pos').asstring);
    edtMemo.text:=sMastermemo;

    s:='';
    if OpenTable('select * from employ where EmployId= :employid',nEmployid) then
      s:=adoquery1.fieldbyname('name').asstring;
    edtEmp.text:=s;
    adoQuery1.close;

  end
  else begin  //add emptye record,so clear last infomation
    edtAmount.Text:='';
    edtStore.Text:='';
    edtEmp.Text:='';
    edtTakeAmt.Text:='';
    edtMemo.text:='';
  end;
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?