xt_lbjss.pas
资源名称:挡案管理系统.rar [点击查看]
上传用户:szruida
上传日期:2007-06-01
资源大小:6518k
文件大小:5k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit xt_lbjss;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, ComCtrls, StdCtrls, Buttons, TFlatEditUnit, TFlatSpinEditUnit,
- Mask, DBCtrlsEh, DB, Spin, DBLookupEh, DBClient, TFlatMaskEditUnit;
- type
- Txt_lbjs = class(TForm)
- PageControl1: TPageControl;
- TabSheet1: TTabSheet;
- TabSheet2: TTabSheet;
- Label1: TLabel;
- GroupBox1: TGroupBox;
- GroupBox2: TGroupBox;
- Label2: TLabel;
- Edit1: TEdit;
- SpeedButton1: TSpeedButton;
- SpeedButton2: TSpeedButton;
- Memo1: TMemo;
- Label3: TLabel;
- Label4: TLabel;
- Label5: TLabel;
- Label6: TLabel;
- Label7: TLabel;
- Label8: TLabel;
- Memo2: TMemo;
- Label9: TLabel;
- DBNumberEditEh1: TDBNumberEditEh;
- DataSource1: TDataSource;
- lbjs: TDataSource;
- bm1: TSpinEdit;
- bm2: TSpinEdit;
- bm3: TSpinEdit;
- bm4: TSpinEdit;
- bm5: TSpinEdit;
- bm6: TSpinEdit;
- ComboBox1: TComboBox;
- ClientDataSet1: TClientDataSet;
- procedure SpeedButton2Click(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- procedure bm2Change(Sender: TObject);
- procedure bm3Change(Sender: TObject);
- procedure bm4Change(Sender: TObject);
- procedure bm5Change(Sender: TObject);
- procedure bm6Change(Sender: TObject);
- procedure ComboBox1Change(Sender: TObject);
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- procedure Edit1Change(Sender: TObject);
- procedure bm1Click(Sender: TObject);
- private
- { Private declarations }
- Procedure btn_valid;
- public
- { Public declarations }
- end;
- var
- xt_lbjs: Txt_lbjs;
- s1,s2,s3,s4,s5,s6:string;
- i:integer;
- const ss:array[0..13] of string=('sz_ajlb','sz_bgqx','sz_bm','sz_qz','sz_jyfs',
- 'sz_jymd','sz_kw','sz_mj','sz_wjlb','sz_xtajlb','sz_yg',
- 'sz_zjlb','sz_ztcl','sz_ztlb');
- implementation
- uses dms;
- {$R *.dfm}
- procedure Txt_lbjs.btn_valid;
- begin
- if (combobox1.Text='案卷类别代码') or (combobox1.Text='库位代码')or(combobox1.text='部门代码')
- or (combobox1.Text='文件类别代码') or (combobox1.Text='主题词类别代码') or (combobox1.Text='员工代码') then
- begin
- memo1.Visible:=true;
- memo2.Visible:=false;
- bm1.Enabled:=true;
- bm2.Enabled:=true;
- bm3.Enabled:=true;
- bm4.Enabled:=true;
- bm5.Enabled:=true;
- bm6.Enabled:=true;
- end
- else
- begin
- memo2.Visible:=true;
- memo1.Visible:=false;
- bm1.Enabled:=true;
- bm2.Enabled:=false;
- bm3.Enabled:=false;
- bm4.Enabled:=false;
- bm5.Enabled:=false;
- bm6.Enabled:=false;
- end;
- end;
- procedure Txt_lbjs.SpeedButton2Click(Sender: TObject);
- begin
- close;
- end;
- procedure Txt_lbjs.FormCreate(Sender: TObject);
- var ss:string;
- begin
- dm.xt_lbjs.Active:=true;
- dm.xt_ajcs.Active:=true;
- with combobox1.Items do
- begin
- add('案卷类别代码');
- add('保管期限代码');
- add('部门代码');
- add('全宗代码');
- add('借阅方式代码');
- add('借阅目的代码');
- add('库位代码');
- add('密级代码');
- add('文件类别代码');
- add('系统案卷类别代码');
- add('员工代码');
- add('证件类别代码');
- add('主题词类别代码');
- add('载体类别代码');
- end;
- end;
- procedure Txt_lbjs.bm2Change(Sender: TObject);
- begin
- { s2:='';
- for i:=0 to bm2.Value-1 do
- begin
- s2:=s2+'#';
- end;}
- end;
- procedure Txt_lbjs.bm3Change(Sender: TObject);
- begin
- { s3:='';
- for i:=0 to bm3.Value-1 do
- begin
- s3:=s3+'#';
- end;}
- end;
- procedure Txt_lbjs.bm4Change(Sender: TObject);
- begin
- { s4:='';
- for i:=0 to bm4.Value-1 do
- begin
- s4:=s4+'#';
- end;}
- end;
- procedure Txt_lbjs.bm5Change(Sender: TObject);
- begin
- { s5:='';
- for i:=0 to bm5.Value-1 do
- begin
- s5:=s5+'#';
- end; }
- end;
- procedure Txt_lbjs.bm6Change(Sender: TObject);
- begin
- {s6:='';
- for i:=0 to bm6.Value-1 do
- begin
- s6:=s6+'#';
- end;}
- end;
- procedure Txt_lbjs.ComboBox1Change(Sender: TObject);
- var
- s_index,s_lbjs_sm:string;
- K,N_Length:integer;//代码说明长度
- begin
- s_Index:=ss[combobox1.itemindex];//以上是获得下拉框中的值
- Btn_valid;//调用代码编辑按钮可否用的过程
- Clientdataset1.Close;
- Clientdataset1.CommandText:='select * from xt_lbjs where lb_dm='+''''+s_index+''''+'';
- Clientdataset1.Open;
- edit1.Text:=Clientdataset1.fieldbyname('lb_dmgz').AsString;
- s_lbjs_sm:=Clientdataset1.fieldbyname('lbjs_sm').AsString;
- N_Length:=length(Clientdataset1.fieldbyname('lbjs_sm').AsString);
- for K:=0 to N_length do
- begin
- bm1.Text:=s_lbjs_sm[1];
- bm1.Text:=s_lbjs_sm[2];
- bm1.Text:=s_lbjs_sm[3];
- bm1.Text:=s_lbjs_sm[4];
- bm1.Text:=s_lbjs_sm[5];
- bm1.Text:=s_lbjs_sm[6];
- end;
- end;
- procedure Txt_lbjs.FormClose(Sender: TObject; var Action: TCloseAction);
- begin
- dm.xt_lbjs.Active:=false;
- action:=cafree;
- xt_lbjs:=nil;
- end;
- procedure Txt_lbjs.Edit1Change(Sender: TObject);
- begin
- //edit1.Text:=s1+'/'+s2+'/'+s3+'/'+s4+'/'+s5+'/'+s6;
- end;
- procedure Txt_lbjs.bm1Click(Sender: TObject);
- begin
- s1:='';
- for i:=0 to bm1.Value-1 do
- begin
- s1:=s1+'#';
- end;
- end;
- end.