unit u_op_add_code; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, BusinessSkinForm, bsSkinCtrls, bsSkinBoxCtrls; type Tfrm_op_add_code = class(TForm) bsSkinCheckListBox1: TbsSkinCheckListBox; bsBusinessSkinForm1: TbsBusinessSkinForm; bsSkinPanel1: TbsSkinPanel; bsSkinButton2: TbsSkinButton; bsSkinButton1: TbsSkinButton; procedure bsSkinButton2Click(Sender: TObject); procedure FormShow(Sender: TObject); procedure bsSkinButton1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var frm_op_add_code: Tfrm_op_add_code; frm_op_add_code_num:integer; implementation uses u_main, u_data_share{$IFDEF SJBAOGUAN}, u_op_seae_apply, u_op_seai_apply{$ENDIF}; {$R *.dfm} procedure Tfrm_op_add_code.bsSkinButton2Click(Sender: TObject); begin close; end; procedure Tfrm_op_add_code.FormShow(Sender: TObject); begin bsSkinCheckListBox1.Clear; case frm_op_add_code_num of 1,3: begin frm_data_share.t_code_shiyan.first; while not frm_data_share.t_code_shiyan.Eof do begin bsSkinCheckListBox1.Items.Add(frm_data_share.t_code_shiyan.fieldbyname('实验内容').asstring); frm_data_share.t_code_shiyan.next; end; end; 2,4: begin frm_data_share.t_code_card.first; while not frm_data_share.t_code_card.Eof do begin bsSkinCheckListBox1.Items.Add(frm_data_share.t_code_card.fieldbyname('单证名称').asstring); frm_data_share.t_code_card.next; end; end; end; end; procedure Tfrm_op_add_code.bsSkinButton1Click(Sender: TObject); var str:widestring; i:integer; begin for i:=0 to bsSkinCheckListBox1.Items.Count-1 do begin if bsSkinCheckListBox1.Checked[i] then begin if str=''then str:=bsSkinCheckListBox1.Items[i] else str:=str+';'+bsSkinCheckListBox1.Items[i]; end; end; {$IFDEF SJBAOGUAN} case frm_op_add_code_num of 1: begin frm_op_seae_apply.t_op_seae.edit; frm_op_seae_apply.t_op_seae['实验内容']:=str; frm_op_seae_apply.t_op_seae.post; end; 2: begin frm_op_seae_apply.t_op_seae.edit; frm_op_seae_apply.t_op_seae['单证信息']:=str; frm_op_seae_apply.t_op_seae.post; end; 3: begin frm_op_seai_apply.t_op_seai.edit; frm_op_seai_apply.t_op_seai['实验内容']:=str; frm_op_seai_apply.t_op_seai.post; end; 4: begin frm_op_seai_apply.t_op_seai.edit; frm_op_seai_apply.t_op_seai['单证信息']:=str; frm_op_seai_apply.t_op_seai.post; end; end; {$ENDIF} close; end; end.