am_yjdys.~pas
资源名称:挡案管理系统.rar [点击查看]
上传用户:szruida
上传日期:2007-06-01
资源大小:6518k
文件大小:2k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit am_yjdys;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls, ExtCtrls, ComCtrls, Buttons, Grids, DBGridEh, DB,
- DBClient;
- type
- Tam_yjdy = class(TForm)
- Panel1: TPanel;
- DateTimePicker1: TDateTimePicker;
- DateTimePicker2: TDateTimePicker;
- Label1: TLabel;
- RadioButton1: TRadioButton;
- RadioButton2: TRadioButton;
- SpeedButton1: TSpeedButton;
- Panel2: TPanel;
- DBGridEh1: TDBGridEh;
- V_AJDY: TDataSource;
- SpeedButton2: TSpeedButton;
- SpeedButton3: TSpeedButton;
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- procedure RadioButton2Click(Sender: TObject);
- procedure RadioButton1Click(Sender: TObject);
- procedure SpeedButton1Click(Sender: TObject);
- procedure SpeedButton2Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- am_yjdy: Tam_yjdy;
- implementation
- uses dms,u_public, Am_Yjcxs, am_yjqc_Ps;
- {$R *.dfm}
- procedure Tam_yjdy.FormClose(Sender: TObject; var Action: TCloseAction);
- begin
- dm.V_yjDY.Active:=false;
- action:=cafree;
- am_yjdy:=nil;
- end;
- procedure Tam_yjdy.RadioButton2Click(Sender: TObject);
- begin
- radiobutton1.Checked:=false;
- datetimepicker1.Enabled:=false;
- datetimepicker2.Enabled:=false;
- end;
- procedure Tam_yjdy.RadioButton1Click(Sender: TObject);
- begin
- radiobutton2.Checked:=false;
- datetimepicker1.Enabled:=true;
- datetimepicker2.Enabled:=true;
- end;
- procedure Tam_yjdy.SpeedButton1Click(Sender: TObject);
- var date1,date2,Swhere:tdatetime;
- begin
- if radiobutton1.Checked=true then
- begin
- date1:=datetimepicker1.DateTime;
- date2:=datetimepicker2.DateTime;
- dm.v_yjdy.Close;
- dm.V_YJDY.commandtext:='select * from v_yjdy where ajyj_yjrq>='+''''+datetimetostr(date1)+''+''''+' and '+' ajyj_yjrq<= '+''''+datetimetostr(date2)+''''+'';
- dm.V_YJDY.Open;
- end
- else
- if radiobutton2.checked=true then
- begin
- am_yjcx:=tam_yjcx.create(application);
- am_yjcx.showmodal;
- end;
- end;
- procedure Tam_yjdy.SpeedButton2Click(Sender: TObject);
- begin
- am_yjqc_P:=Tam_yjqc_P.create(application);
- am_yjqc_P.quickrep1.preview;
- end;
- end.