PageRenderTime 23ms CodeModel.GetById 20ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/Gedemin/Tax/gdc_frmValueSel_unit.pas

http://gedemin.googlecode.com/
Pascal | 50 lines | 37 code | 10 blank | 3 comment | 1 complexity | d1ed9c7ddfe0a7346f3aa2b178c1be65 MD5 | raw file
 1unit gdc_frmValueSel_unit;
 2
 3interface
 4
 5uses
 6  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
 7  StdCtrls, gsIBLookupComboBox, ExtCtrls, IBDatabase;
 8
 9type
10  TfrmValueSel = class(TForm)
11    pnlValue: TPanel;
12    bvlSepar: TBevel;
13    iblcValue: TgsIBLookupComboBox;
14    pnlButton: TPanel;
15    btnOk: TButton;
16    btnCancel: TButton;
17    IBTransaction: TIBTransaction;
18    procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
19    procedure FormCreate(Sender: TObject);
20  private
21    { Private declarations }
22  public
23    { Public declarations }
24  end;
25
26var
27  frmValueSel: TfrmValueSel;
28
29implementation
30
31 uses
32   gdcBaseInterface;
33
34{$R *.DFM}
35
36procedure TfrmValueSel.FormCloseQuery(Sender: TObject;
37  var CanClose: Boolean);
38begin
39  if (ModalResult = idOk) and (iblcValue.CurrentKeyInt = -1) then
40  begin
41    raise Exception.Create('?????????? ??????? ??????? ?????????.');
42  end;
43end;
44
45procedure TfrmValueSel.FormCreate(Sender: TObject);
46begin
47  IBTransaction.DefaultDatabase := gdcBaseManager.Database;
48end;
49
50end.