U_bmda_fzlr.pas
上传用户:psxgmh
上传日期:2013-04-08
资源大小:15112k
文件大小:2k
- unit U_bmda_fzlr;
- interface
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- Grids, DBGrids, Db, DBClient, ExtCtrls, Buttons;
- type
- TfrmBmda_fzlr = class(TForm)
- Panel1: TPanel;
- Panel2: TPanel;
- DataSource1: TDataSource;
- DBGrid: TDBGrid;
- SpeedButton1: TSpeedButton;
- SpeedButton2: TSpeedButton;
- procedure SpeedButton1Click(Sender: TObject);
- procedure SpeedButton2Click(Sender: TObject);
- procedure FormActivate(Sender: TObject);
- procedure DBGridTitleClick(Column: TColumn);
- procedure FormCreate(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- frmBmda_fzlr: TfrmBmda_fzlr;
- pub_Bmmc: string;
- implementation
- uses U_mainform, U_zgda, WzglDB, u_public;
- {$R *.DFM}
- procedure TfrmBmda_fzlr.SpeedButton1Click(Sender: TObject);
- begin
- if DM.CDS_BMDA_INDEX.recordcount = 0 then
- begin
- application.messagebox('请选择具体部门', '物资管理系统', mb_iconinformation + mb_defbutton1);
- exit;
- end;
- pub_Bmmc := DM.CDS_BMDA_INDEX.fieldbyname('部门名称').asstring;
- close;
- end;
- procedure TfrmBmda_fzlr.SpeedButton2Click(Sender: TObject);
- begin
- close;
- end;
- procedure TfrmBmda_fzlr.FormActivate(Sender: TObject);
- begin
- DM.CDS_BMDA_INDEX.IndexFieldNames := '部门编码';
- end;
- procedure TfrmBmda_fzlr.DBGridTitleClick(Column: TColumn);
- begin
- DBGridSort(dbgrid, column);
- end;
- procedure TfrmBmda_fzlr.FormCreate(Sender: TObject);
- begin
- DM.CDS_BMDA_INDEX.Active := True;
- end;
- end.