yhz_bjs.~pas
资源名称:挡案管理系统.rar [点击查看]
上传用户:szruida
上传日期:2007-06-01
资源大小:6518k
文件大小:2k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit yhz_bjs;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, ExtCtrls, StdCtrls, Mask, DBCtrls, Buttons;
- type
- Tyhz_bj = class(TForm)
- Image1: TImage;
- Label1: TLabel;
- Panel1: TPanel;
- Label2: TLabel;
- DBEdit1: TDBEdit;
- Label3: TLabel;
- DBEdit2: TDBEdit;
- Label4: TLabel;
- Label5: TLabel;
- DBEdit4: TDBEdit;
- Label6: TLabel;
- Label7: TLabel;
- Label8: TLabel;
- SpeedButton1: TSpeedButton;
- SpeedButton2: TSpeedButton;
- js: TDBLookupComboBox;
- procedure SpeedButton2Click(Sender: TObject);
- procedure SpeedButton1Click(Sender: TObject);
- procedure FormKeyPress(Sender: TObject; var Key: Char);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- yhz_bj: Tyhz_bj;
- implementation
- uses xt_yhz_ms, DMs;
- {$R *.dfm}
- procedure Tyhz_bj.SpeedButton2Click(Sender: TObject);
- begin
- close;
- end;
- procedure Tyhz_bj.SpeedButton1Click(Sender: TObject);
- var i:integer;
- begin
- if dbedit1.Text='' then
- begin
- application.MessageBox('用户组代码不能为空!','提示',mb_ok+mb_iconinformation);
- exit;
- end;
- if dbedit2.Text='' then
- begin
- application.MessageBox('用户组名称不能为空!','提示',mb_ok+mb_iconinformation);
- exit;
- end;
- if js.Text='' then
- begin
- application.MessageBox('角色不能为空!','提示',mb_ok+mb_iconinformation);
- exit;
- end;
- Dm.xt_yhz.ApplyUpdates(0);
- i:=Dm.xt_yhz.ApplyUpdates(0);
- if i=0 then
- begin
- application.MessageBox('数据保存成功','提示',mb_ok+mb_iconinformation);
- close;
- xt_yhz.ToolButton4.Click;
- end
- else
- begin
- application.MessageBox('数据保存失败','提示',mb_ok+mb_iconinformation);
- exit;
- end;
- end;
- procedure Tyhz_bj.FormKeyPress(Sender: TObject; var Key: Char);
- begin
- if key=#13 then
- begin
- key:=#0;
- perform(WM_NEXTDLGCTL,0,0);
- end;
- end;
- end.