57 lines
1.1 KiB
ObjectPascal
57 lines
1.1 KiB
ObjectPascal
unit U_KCEdit;
|
|
|
|
interface
|
|
|
|
uses
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
Dialogs, StdCtrls, ExtCtrls, cxControls, cxContainer, cxEdit, cxTextEdit,
|
|
cxCurrencyEdit;
|
|
|
|
type
|
|
TfrmKCEdit = class(TForm)
|
|
RadioGroup1: TRadioGroup;
|
|
Label1: TLabel;
|
|
Label2: TLabel;
|
|
cxCurrencyEdit2: TcxCurrencyEdit;
|
|
Button1: TButton;
|
|
Button2: TButton;
|
|
procedure Button2Click(Sender: TObject);
|
|
procedure Button1Click(Sender: TObject);
|
|
procedure FormDestroy(Sender: TObject);
|
|
private
|
|
{ Private declarations }
|
|
public
|
|
{ Public declarations }
|
|
end;
|
|
|
|
var
|
|
frmKCEdit: TfrmKCEdit;
|
|
|
|
implementation
|
|
|
|
{$R *.dfm}
|
|
|
|
procedure TfrmKCEdit.Button2Click(Sender: TObject);
|
|
begin
|
|
close;
|
|
end;
|
|
|
|
procedure TfrmKCEdit.Button1Click(Sender: TObject);
|
|
begin
|
|
if strtofloatdef(cxCurrencyEdit2.Text,0)=0 then
|
|
begin
|
|
application.MessageBox('数量不能为零!','提示信息',0);
|
|
exit;
|
|
end;
|
|
|
|
if Application.MessageBox('确定要调整数据吗?','提示',32+4)<>IDYES then Exit;
|
|
ModalResult:=1;
|
|
end;
|
|
|
|
procedure TfrmKCEdit.FormDestroy(Sender: TObject);
|
|
begin
|
|
frmKCEdit:=nil;
|
|
end;
|
|
|
|
end.
|