unit AboutGuide;

interface

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

type
  TffrmSetTrackingNum = class(TForm)
    Timer1: TTimer;
    txtTrackNum: TEdit;
    GroupBox1: TGroupBox;
    BitBtn1: TBitBtn;
    procedure Timer1Timer(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  ffrmSetTrackingNum: TffrmSetTrackingNum;

implementation

{$R *.dfm}
uses DM;

procedure TffrmSetTrackingNum.Timer1Timer(Sender: TObject);
begin
      StatusBar1.Panels.Items[3].Text:=DateToStr(Now)
end;

procedure TffrmSetTrackingNum.BitBtn1Click(Sender: TObject);
begin
      if DModule.TR.InTransaction then
          DModule.TR.Commit;

          DModule.QR.SQL.Clear;
          DModule.QR.SQL.Add('UPDATE SETTRACKINGNUM SET PARTNAME=:A, SETDATE=:B, SETBY=:C, P_NUM=:D WHERE SETCODE=:E');
          DModule.QR.Params.AsString[0] := lb_pname.Caption;
          DModule.QR.Params.AsString[1] := DateToStr(Now);
          DModule.QR.Params.AsString[2] := UpperCase(frmMain.fullname);
          DModule.QR.Params.AsString[3] := lb_pnum.Caption;
          DModule.QR.Prepare;
          DModule.QR.Open();

            MessageDlg('Set successfully',mtInformation,[mbOK],0);

      if DModule.TR.InTransaction then
          DModule.TR.Commit;
end;

end.
