source: cprs/branches/HealthSevak-CPRS/CPRS-Chart/Orders/fOrderUnflag.pas@ 1723

Last change on this file since 1723 was 829, checked in by Kevin Toppenberg, 14 years ago

Upgrade to version 27

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