Last change
on this file since 729 was 459, checked in by Kevin Toppenberg, 16 years ago |
Adding foia-cprs branch
|
File size:
1.5 KB
|
Rev | Line | |
---|
[459] | 1 | unit fOrderUnflag;
|
---|
| 2 |
|
---|
| 3 | interface
|
---|
| 4 |
|
---|
| 5 | uses
|
---|
| 6 | Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
---|
| 7 | fAutoSz, StdCtrls, ComCtrls, ORFn, rOrders, ORCtrls;
|
---|
| 8 |
|
---|
| 9 | type
|
---|
| 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 |
|
---|
| 24 | function ExecuteUnflagOrder(AnOrder: TOrder): Boolean;
|
---|
| 25 |
|
---|
| 26 | implementation
|
---|
| 27 |
|
---|
| 28 | {$R *.DFM}
|
---|
| 29 |
|
---|
| 30 | function ExecuteUnflagOrder(AnOrder: TOrder): Boolean;
|
---|
| 31 | var
|
---|
| 32 | frmUnflagOrder: TfrmUnflagOrder;
|
---|
| 33 | begin
|
---|
| 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;
|
---|
| 52 | end;
|
---|
| 53 |
|
---|
| 54 | procedure TfrmUnflagOrder.FormCreate(Sender: TObject);
|
---|
| 55 | begin
|
---|
| 56 | inherited;
|
---|
| 57 | OKPressed := False;
|
---|
| 58 | end;
|
---|
| 59 |
|
---|
| 60 | procedure TfrmUnflagOrder.cmdOKClick(Sender: TObject);
|
---|
| 61 | begin
|
---|
| 62 | inherited;
|
---|
| 63 | OKPressed := True;
|
---|
| 64 | Close;
|
---|
| 65 | end;
|
---|
| 66 |
|
---|
| 67 | procedure TfrmUnflagOrder.cmdCancelClick(Sender: TObject);
|
---|
| 68 | begin
|
---|
| 69 | inherited;
|
---|
| 70 | Close;
|
---|
| 71 | end;
|
---|
| 72 |
|
---|
| 73 |
|
---|
| 74 | end.
|
---|
Note:
See
TracBrowser
for help on using the repository browser.