source: cprs/branches/tmg-cprs/CPRS-Chart/Orders/fOrderUnflag.pas@ 1683

Last change on this file since 1683 was 453, checked in by Kevin Toppenberg, 16 years ago

Initial upload of TMG-CPRS 1.0.26.69

File size: 1.6 KB
Line 
1//kt -- Modified with SourceScanner on 8/8/2007
2unit fOrderUnflag;
3
4interface
5
6uses
7 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
8 fAutoSz, StdCtrls, ComCtrls, ORFn, rOrders, ORCtrls, DKLang;
9
10type
11 TfrmUnflagOrder = class(TfrmAutoSz)
12 txtComment: TCaptionEdit;
13 Label1: TLabel;
14 cmdOK: TButton;
15 cmdCancel: TButton;
16 memReason: TMemo;
17 memOrder: TMemo;
18 procedure FormCreate(Sender: TObject);
19 procedure cmdOKClick(Sender: TObject);
20 procedure cmdCancelClick(Sender: TObject);
21 private
22 OKPressed: Boolean;
23 end;
24
25function ExecuteUnflagOrder(AnOrder: TOrder): Boolean;
26
27implementation
28
29{$R *.DFM}
30
31function ExecuteUnflagOrder(AnOrder: TOrder): Boolean;
32var
33 frmUnflagOrder: TfrmUnflagOrder;
34begin
35 Result := False;
36 frmUnflagOrder := TfrmUnflagOrder.Create(Application);
37 try
38 ResizeFormToFont(TForm(frmUnflagOrder));
39 with frmUnflagOrder do
40 begin
41 memOrder.SetTextBuf(PChar(AnOrder.Text));
42 LoadFlagReason(memReason.Lines, AnOrder.ID);
43 ShowModal;
44 if OKPressed then
45 begin
46 UnflagOrder(AnOrder, txtComment.Text);
47 Result := True;
48 end;
49 end;
50 finally
51 frmUnflagOrder.Release;
52 end;
53end;
54
55procedure TfrmUnflagOrder.FormCreate(Sender: TObject);
56begin
57 inherited;
58 OKPressed := False;
59end;
60
61procedure TfrmUnflagOrder.cmdOKClick(Sender: TObject);
62begin
63 inherited;
64 OKPressed := True;
65 Close;
66end;
67
68procedure TfrmUnflagOrder.cmdCancelClick(Sender: TObject);
69begin
70 inherited;
71 Close;
72end;
73
74
75end.
Note: See TracBrowser for help on using the repository browser.