📄 paymenttype_unit.pas
字号:
unit PaymentType_Unit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, TypeBase_Unit, StdCtrls, Mask, DBCtrls, Buttons, Grids, DBGrids,
ExtCtrls, DB;
type
TfrmPaymentType = class(TfrmBaseType)
procedure btnAddClick(Sender: TObject);
procedure btnModfiyClick(Sender: TObject);
procedure btnDelClick(Sender: TObject);
procedure btnSaveClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmPaymentType: TfrmPaymentType;
implementation
uses ClientDM_Unit;
{$R *.dfm}
procedure TfrmPaymentType.btnAddClick(Sender: TObject);
begin
inherited;
DM.cdsPaymentType.Insert;
DM.cdsPaymentType.FieldByName('PaymentCode').AsString :=
DM.SocketConn.AppServer.GetMaxID('PaymentType','PaymentCode','1000');
end;
procedure TfrmPaymentType.btnModfiyClick(Sender: TObject);
begin
inherited;
DM.cdsPaymentType.Edit;
end;
procedure TfrmPaymentType.btnDelClick(Sender: TObject);
begin
if Application.MessageBox('确定要删除吗?','提示',68) = IDNo then
Exit;
DM.cdsPaymentType.Delete;
DM.cdsPaymentType.ApplyUpdates(0);
end;
procedure TfrmPaymentType.btnSaveClick(Sender: TObject);
begin
inherited;
if DM.cdsPaymentType.State in [dsInsert,dsEdit] then
begin
DM.cdsPaymentType.Post;
DM.cdsPaymentType.ApplyUpdates(0);
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -