pkform.pas

来自「简单的餐饮软件部分源码」· PAS 代码 · 共 67 行

PAS
67
字号
unit pkform;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons;

type
  Tfpk = class(TForm)
    rabut1: TRadioButton;
    rabut2: TRadioButton;
    bit1: TBitBtn;
    bit2: TBitBtn;
    procedure bit2Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure bit1Click(Sender: TObject);
  private
    { Private declarations }
    PkSQLstr:string;
  public
    { Public declarations }
    Fpktableid,Fpkmealid:string;
  end;

var
  fpk: Tfpk;

implementation
uses SnackDM,mealform;
{$R *.dfm}

procedure Tfpk.bit2Click(Sender: TObject);
begin
 fpk.Close;
 fpk.Release;
end;

procedure Tfpk.FormCreate(Sender: TObject);
begin
 self.Caption:=datam.SPLanguage.ReadString('captions','00105','');
 bit1.Caption:=datam.SPLanguage.ReadString('captions','00002','');
 bit2.Caption:=datam.SPLanguage.ReadString('captions','00036','');
 rabut1.Caption:=datam.SPLanguage.ReadString('captions','00103','');
 rabut2.Caption:=datam.SPLanguage.ReadString('captions','00104','');
end;
procedure Tfpk.bit1Click(Sender: TObject);
begin
  if rabut1.Checked then
    begin
     DataM.inmealdata.Edit;
     meal.DBGrid.Fields[8].Value:='Ypk';
     DataM.tempmealado.Post;
   end else
       begin
        with datam.bfreeado do
          begin
           Close;
           SQL.Clear;
           SQL.Add('Update sntempmeal set pkflag=''Ypk'' where tablename='''+Fpktableid+'''');
           ExecSQL;
          end;
       end;
  bit2Click(Sender);     
end;
end.

⌨️ 快捷键说明

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