|
|
unit u_op_railway_add;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, DB, BusinessSkinForm, bsSkinCtrls, StdCtrls, wwdbdatetimepicker,
|
|
|
RxLookup,ComObj;
|
|
|
|
|
|
type
|
|
|
Tfrm_op_railway_add = class(TForm)
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
data1: TDataSource;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
bsSkinGroupBox1: TbsSkinGroupBox;
|
|
|
Label1: TLabel;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
bsSkinCheckRadioBox7: TbsSkinCheckRadioBox;
|
|
|
bsSkinCheckRadioBox2: TbsSkinCheckRadioBox;
|
|
|
bsSkinCheckRadioBox3: TbsSkinCheckRadioBox;
|
|
|
bsSkinCheckRadioBox4: TbsSkinCheckRadioBox;
|
|
|
bsSkinCheckRadioBox1: TbsSkinCheckRadioBox;
|
|
|
bsSkinCheckRadioBox5: TbsSkinCheckRadioBox;
|
|
|
bsSkinCheckRadioBox6: TbsSkinCheckRadioBox;
|
|
|
Label2: TLabel;
|
|
|
RxDBLookupCombo15: TRxDBLookupCombo;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
OpenDialog1: TOpenDialog;
|
|
|
bsSkinCheckRadioBox8: TbsSkinCheckRadioBox;
|
|
|
bsSkinCheckRadioBox9: TbsSkinCheckRadioBox;
|
|
|
bsSkinCheckRadioBox10: TbsSkinCheckRadioBox;
|
|
|
Label3: TLabel;
|
|
|
Edit1: TEdit;
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
shiptype:string;
|
|
|
BsType:string;
|
|
|
PNO:string;
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_op_railway_add: Tfrm_op_railway_add;
|
|
|
frm_op_railway_add_num:integer;
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_op_railway, u_main, my_sys_function, u_data_share;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_op_railway_add.bsSkinButton2Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_railway_add.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
wwDBDateTimePicker1.MinDate:=Logininfo.endday+1;
|
|
|
wwDBDateTimePicker1.Date:=date;
|
|
|
RxDBLookupCombo15.DisplayValue:=subComp;
|
|
|
if shiptype<>'' then
|
|
|
begin
|
|
|
if shiptype='<27><><EFBFBD><EFBFBD>' then bsSkinCheckRadioBox4.Checked:=True
|
|
|
else if shiptype='<27><><EFBFBD><EFBFBD>' then bsSkinCheckRadioBox2.Checked:=True
|
|
|
else if shiptype='<27><>ó' then bsSkinCheckRadioBox3.Checked:=True
|
|
|
else bsSkinCheckRadioBox4.Checked:=True;
|
|
|
end;
|
|
|
// if bstype='<27><>·<EFBFBD><C2B7>Ʊ' then bsSkinCheckRadioBox6.checked:=true;
|
|
|
|
|
|
bsSkinCheckRadioBox6.Enabled:=false;
|
|
|
// if (bstype='<27><>·<EFBFBD><C2B7>Ʊ') or (bstype='') then bsSkinCheckRadioBox6.Enabled:=false;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_railway_add.bsSkinButton1Click(Sender: TObject);
|
|
|
var
|
|
|
i,k:Integer;
|
|
|
str:string;
|
|
|
begin
|
|
|
if (frm_op_railway_add_num=3) or (frm_op_railway_add_num=2) then
|
|
|
begin
|
|
|
k:=strToInt(Edit1.Text);
|
|
|
if bsSkinCheckRadioBox6.Checked and (k>0) then
|
|
|
begin
|
|
|
for k:=0 to k-1 do
|
|
|
begin
|
|
|
data1.DataSet.append;
|
|
|
for i := 0 to (data1.DataSet.DataSource.DataSet.fieldcount-1) do
|
|
|
begin
|
|
|
data1.DataSet[data1.DataSet.DataSource.DataSet.fields[i].FieldName]:=
|
|
|
data1.DataSet.DataSource.DataSet[data1.DataSet.DataSource.DataSet.fields[i].FieldName];
|
|
|
end;
|
|
|
str:=get_id;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=str;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=str;
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
if bsSkinCheckRadioBox7.Checked then
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD>ĵ<EFBFBD>'
|
|
|
else
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><>ͨ<EFBFBD><CDA8>';
|
|
|
if bsSkinCheckRadioBox4.Checked then
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=bsSkinCheckRadioBox4.Caption;
|
|
|
if bsSkinCheckRadioBox2.Checked then
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=bsSkinCheckRadioBox2.Caption;
|
|
|
if bsSkinCheckRadioBox3.Checked then
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=bsSkinCheckRadioBox3.Caption;
|
|
|
|
|
|
if bsSkinCheckRadioBox1.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox1.Caption;
|
|
|
if bsSkinCheckRadioBox5.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox5.Caption;
|
|
|
if bsSkinCheckRadioBox6.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox6.Caption; //<2F><>·<EFBFBD><C2B7>Ʊ
|
|
|
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=bsSkinCheckRadioBox10.Checked;
|
|
|
data1.DataSet['½<><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=bsSkinCheckRadioBox8.Checked;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=bsSkinCheckRadioBox9.Checked;
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=wwDBDateTimePicker1.date;
|
|
|
data1.DataSet['<27>ܴ<EFBFBD>']:=WeekofYear(wwDBDateTimePicker1.date);
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
|
|
|
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
data1.DataSet['<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo15.DisplayValue;
|
|
|
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
// data1.DataSet['<27><><EFBFBD><EFBFBD>Ա']:=employee;
|
|
|
// data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
// data1.DataSet['<27>ͷ<EFBFBD>Ա']:=employee;
|
|
|
// data1.DataSet['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>']:=department;
|
|
|
// data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=department;
|
|
|
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD>Դ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
// data1.DataSet['<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>']:=employee;
|
|
|
// data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>1']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>2']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>3']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>4']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>5']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>6']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>7']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>8']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>9']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>10']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><>TEU']:=0;
|
|
|
data1.DataSet['<27><>װ<EFBFBD><D7B0>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>Ա']:='';
|
|
|
data1.DataSet['<27><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27>ֲ<EFBFBD><D6B2><EFBFBD>']:='';
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>˰']:=0;
|
|
|
data1.DataSet['<27><>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD>ͨ<EFBFBD><CDA8>']:=0;
|
|
|
data1.DataSet['ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27><>ע']:='';
|
|
|
data1.DataSet['<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>˰']:=0;
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD>ͨ<EFBFBD><CDA8>']:=0;
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=0;
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD>ĺ<EFBFBD>']:='';
|
|
|
data1.DataSet['<27>ɽ<EFBFBD><C9BD><EFBFBD>ʽ']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27>ܼ<EFBFBD>']:='';
|
|
|
// data1.DataSet['<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
// data1.DataSet['<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27><><EFBFBD>쵥<EFBFBD><ECB5A5>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=null;
|
|
|
data1.DataSet['<27><>֤ʱ<D6A4><CAB1>']:=null;
|
|
|
|
|
|
if bsSkinCheckRadioBox6.Checked then
|
|
|
data1.DataSet['ί<>б<EFBFBD><D0B1><EFBFBD>']:=PNO;
|
|
|
data1.DataSet.Post;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
data1.DataSet.append;
|
|
|
for i := 0 to (data1.DataSet.DataSource.DataSet.fieldcount-1) do
|
|
|
begin
|
|
|
data1.DataSet[data1.DataSet.DataSource.DataSet.fields[i].FieldName]:=
|
|
|
data1.DataSet.DataSource.DataSet[data1.DataSet.DataSource.DataSet.fields[i].FieldName];
|
|
|
end;
|
|
|
str:=get_id;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=str;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=str;
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
if bsSkinCheckRadioBox7.Checked then
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD>ĵ<EFBFBD>'
|
|
|
else
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><>ͨ<EFBFBD><CDA8>';
|
|
|
if bsSkinCheckRadioBox4.Checked then
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=bsSkinCheckRadioBox4.Caption;
|
|
|
if bsSkinCheckRadioBox2.Checked then
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=bsSkinCheckRadioBox2.Caption;
|
|
|
if bsSkinCheckRadioBox3.Checked then
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=bsSkinCheckRadioBox3.Caption;
|
|
|
|
|
|
if bsSkinCheckRadioBox1.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox1.Caption;
|
|
|
if bsSkinCheckRadioBox5.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox5.Caption;
|
|
|
if bsSkinCheckRadioBox6.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox6.Caption; //<2F><>·<EFBFBD><C2B7>Ʊ
|
|
|
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=bsSkinCheckRadioBox10.Checked;
|
|
|
data1.DataSet['½<><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=bsSkinCheckRadioBox8.Checked;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=bsSkinCheckRadioBox9.Checked;
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=wwDBDateTimePicker1.date;
|
|
|
data1.DataSet['<27>ܴ<EFBFBD>']:=WeekofYear(wwDBDateTimePicker1.date);
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
|
|
|
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
data1.DataSet['<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo15.DisplayValue;
|
|
|
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD>Դ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>1']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>2']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>3']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>4']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>5']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>6']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>7']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>8']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>9']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>10']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><>TEU']:=0;
|
|
|
data1.DataSet['<27><>װ<EFBFBD><D7B0>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>Ա']:='';
|
|
|
data1.DataSet['<27><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27>ֲ<EFBFBD><D6B2><EFBFBD>']:='';
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>˰']:=0;
|
|
|
data1.DataSet['<27><>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD>ͨ<EFBFBD><CDA8>']:=0;
|
|
|
data1.DataSet['ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27><>ע']:='';
|
|
|
data1.DataSet['<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>˰']:=0;
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD>ͨ<EFBFBD><CDA8>']:=0;
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=0;
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD>ĺ<EFBFBD>']:='';
|
|
|
data1.DataSet['<27>ɽ<EFBFBD><C9BD><EFBFBD>ʽ']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27>ܼ<EFBFBD>']:='';
|
|
|
// data1.DataSet['<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
// data1.DataSet['<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27><><EFBFBD>쵥<EFBFBD><ECB5A5>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=null;
|
|
|
data1.DataSet['<27><>֤ʱ<D6A4><CAB1>']:=null;
|
|
|
|
|
|
if bsSkinCheckRadioBox6.Checked then
|
|
|
data1.DataSet['ί<>б<EFBFBD><D0B1><EFBFBD>']:=PNO;
|
|
|
end;
|
|
|
end else begin
|
|
|
data1.DataSet.Insert;
|
|
|
str:=get_id;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=str;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=str;
|
|
|
if bsSkinCheckRadioBox7.Checked then
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD>ĵ<EFBFBD>'
|
|
|
else
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><>ͨ<EFBFBD><CDA8>';
|
|
|
|
|
|
if bsSkinCheckRadioBox4.Checked then
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=bsSkinCheckRadioBox4.Caption;
|
|
|
if bsSkinCheckRadioBox2.Checked then
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=bsSkinCheckRadioBox2.Caption;
|
|
|
if bsSkinCheckRadioBox3.Checked then
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=bsSkinCheckRadioBox3.Caption;
|
|
|
|
|
|
if bsSkinCheckRadioBox1.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox1.Caption;
|
|
|
if bsSkinCheckRadioBox5.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox5.Caption;
|
|
|
if bsSkinCheckRadioBox6.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox6.Caption;
|
|
|
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=bsSkinCheckRadioBox10.Checked;
|
|
|
data1.DataSet['½<><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=bsSkinCheckRadioBox8.Checked;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=bsSkinCheckRadioBox9.Checked;
|
|
|
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=wwDBDateTimePicker1.date;
|
|
|
data1.DataSet['<27>ܴ<EFBFBD>']:=WeekofYear(wwDBDateTimePicker1.date);
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
|
|
|
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
data1.DataSet['<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo15.DisplayValue;
|
|
|
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
// data1.DataSet['<27><><EFBFBD><EFBFBD>Ա']:=employee;
|
|
|
// data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
// data1.DataSet['<27>ͷ<EFBFBD>Ա']:=employee;
|
|
|
// data1.DataSet['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>']:=department;
|
|
|
// data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=department;
|
|
|
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD>Դ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>1']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>2']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>3']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>4']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>5']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>6']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>7']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>8']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>9']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>10']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><>TEU']:=0;
|
|
|
data1.DataSet['<27><>װ<EFBFBD><D7B0>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>Ա']:='';
|
|
|
data1.DataSet['<27><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27>ֲ<EFBFBD><D6B2><EFBFBD>']:='';
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>˰']:=0;
|
|
|
data1.DataSet['<27><>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD>ͨ<EFBFBD><CDA8>']:=0;
|
|
|
data1.DataSet['ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27><>ע']:='';
|
|
|
data1.DataSet['<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>˰']:=0;
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD>ͨ<EFBFBD><CDA8>']:=0;
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=0;
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD>ĺ<EFBFBD>']:='';
|
|
|
data1.DataSet['<27>ɽ<EFBFBD><C9BD><EFBFBD>ʽ']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27>ܼ<EFBFBD>']:='';
|
|
|
data1.DataSet['<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27><><EFBFBD>쵥<EFBFBD><ECB5A5>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=null;
|
|
|
data1.DataSet['<27><>֤ʱ<D6A4><CAB1>']:=null;
|
|
|
|
|
|
if bsSkinCheckRadioBox6.Checked then
|
|
|
data1.DataSet['ί<>б<EFBFBD><D0B1><EFBFBD>']:=PNO;
|
|
|
end;
|
|
|
|
|
|
// data1.DataSet.Post;
|
|
|
|
|
|
if frm_op_railway_add_num=1 then
|
|
|
begin
|
|
|
frm_op_railway.Notebook1.PageIndex:=1;
|
|
|
frm_op_railway.bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
end;
|
|
|
if frm_op_railway_add_num=2 then
|
|
|
begin
|
|
|
frm_op_railway.Notebook1.PageIndex:=1;
|
|
|
frm_op_railway.bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ';
|
|
|
end;
|
|
|
if frm_op_railway_add_num=3 then
|
|
|
begin
|
|
|
frm_op_railway.Notebook1.PageIndex:=1;
|
|
|
frm_op_railway.bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ';
|
|
|
frm_op_railway.t_op_railway1.Enabled:=false;
|
|
|
frm_op_railway.t_op_railway1.DataSet:=frm_op_railway.t_op_railway_fen;
|
|
|
frm_op_railway.t_op_railway1.Enabled:=true;
|
|
|
end;
|
|
|
|
|
|
{
|
|
|
frm_op_railway.Notebook1.PageIndex:=1;
|
|
|
frm_op_railway.bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
}
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_railway_add.bsSkinButton3Click(Sender: TObject);
|
|
|
var
|
|
|
afield : variant;
|
|
|
i: Integer;
|
|
|
str:string;
|
|
|
begin
|
|
|
if data1.DataSet.IsEmpty then
|
|
|
begin
|
|
|
showmessage('û<>и<EFBFBD><D0B8><EFBFBD>ĸ<EFBFBD>壬<EFBFBD><E5A3AC><EFBFBD>ܸ<EFBFBD><DCB8><EFBFBD><EFBFBD>½<EFBFBD><C2BD><EFBFBD>');
|
|
|
exit;
|
|
|
end;
|
|
|
afield := vararraycreate([0,data1.DataSet.fieldcount-1],varvariant);
|
|
|
for i := 0 to (data1.DataSet.fieldcount-1) do
|
|
|
begin
|
|
|
afield[i] :=data1.DataSet.fields[i].value ;
|
|
|
end;
|
|
|
|
|
|
|
|
|
data1.DataSet.append;
|
|
|
for i := 0 to (data1.DataSet.fieldcount-1) do begin
|
|
|
data1.DataSet.fields[i].value := afield[i] ;
|
|
|
end;
|
|
|
|
|
|
if bsSkinCheckRadioBox7.Checked then
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><EFBFBD>ĵ<EFBFBD>'
|
|
|
else
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><>ͨ<EFBFBD><CDA8>';
|
|
|
|
|
|
if bsSkinCheckRadioBox4.Checked then
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=bsSkinCheckRadioBox4.Caption;
|
|
|
if bsSkinCheckRadioBox2.Checked then
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=bsSkinCheckRadioBox2.Caption;
|
|
|
if bsSkinCheckRadioBox3.Checked then
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=bsSkinCheckRadioBox3.Caption;
|
|
|
|
|
|
if bsSkinCheckRadioBox1.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox1.Caption;
|
|
|
if bsSkinCheckRadioBox5.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox5.Caption;
|
|
|
if bsSkinCheckRadioBox6.Checked then
|
|
|
data1.DataSet['װ<>˷<EFBFBD>ʽ']:=bsSkinCheckRadioBox6.Caption;
|
|
|
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=bsSkinCheckRadioBox10.Checked;
|
|
|
data1.DataSet['½<><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=bsSkinCheckRadioBox8.Checked;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=bsSkinCheckRadioBox9.Checked;
|
|
|
|
|
|
|
|
|
str:=get_id;
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=str;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=str;
|
|
|
if not bsSkinCheckRadioBox6.Checked then
|
|
|
if not (Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring)='<27>ֶ<EFBFBD><D6B6>༭') then
|
|
|
data1.DataSet['ί<>б<EFBFBD><D0B1><EFBFBD>']:='';
|
|
|
|
|
|
if (bsSkinCheckRadioBox7.Checked) and (trim(data1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString)<>'<27><>·<EFBFBD><C2B7>Ʊ') then
|
|
|
data1.DataSet['ί<>б<EFBFBD><D0B1><EFBFBD>']:=PNO+'*';
|
|
|
data1.DataSet['ҵ<><D2B5>״̬']:='<27><><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
|
|
|
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
data1.DataSet['<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>']:=RxDBLookupCombo15.DisplayValue;
|
|
|
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
// data1.DataSet['<27><><EFBFBD><EFBFBD>Ա']:=employee;
|
|
|
// data1.DataSet['<27>ͷ<EFBFBD>Ա']:=employee;
|
|
|
// data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=department;
|
|
|
// data1.DataSet['<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>']:=employee;
|
|
|
// data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=wwDBDateTimePicker1.date;
|
|
|
data1.DataSet['<27>ܴ<EFBFBD>']:=WeekofYear(wwDBDateTimePicker1.date);
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>1']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>2']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>3']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>4']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>5']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>6']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>7']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>8']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>9']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>10']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><>TEU']:=0;
|
|
|
data1.DataSet['<27><>װ<EFBFBD><D7B0>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>Ա']:='';
|
|
|
data1.DataSet['<27><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27>ֲ<EFBFBD><D6B2><EFBFBD>']:='';
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>˰']:=0;
|
|
|
data1.DataSet['<27><>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD>ͨ<EFBFBD><CDA8>']:=0;
|
|
|
data1.DataSet['ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27><>ע']:='';
|
|
|
data1.DataSet['<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>˰']:=0;
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD>ͨ<EFBFBD><CDA8>']:=0;
|
|
|
data1.DataSet['<27>Ƿ<EFBFBD><C7B7><EFBFBD>ӡ']:=0;
|
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD>ĺ<EFBFBD>']:='';
|
|
|
data1.DataSet['<27>ɽ<EFBFBD><C9BD><EFBFBD>ʽ']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:='';
|
|
|
data1.DataSet['<27>ܼ<EFBFBD>']:='';
|
|
|
// data1.DataSet['<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
data1.DataSet['<27><><EFBFBD>쵥<EFBFBD><ECB5A5>']:='';
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=null;
|
|
|
data1.DataSet['<27><>֤ʱ<D6A4><CAB1>']:=null;
|
|
|
|
|
|
data1.DataSet['ctnid']:=0;
|
|
|
|
|
|
|
|
|
// data1.DataSet['ʼ<><CABC><EFBFBD><EFBFBD>']:=get_parameters_value(18,'TSINGTAO');
|
|
|
if frm_op_railway_add_num=1 then
|
|
|
begin
|
|
|
frm_op_railway.Notebook1.PageIndex:=1;
|
|
|
frm_op_railway.bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
end;
|
|
|
if frm_op_railway_add_num=2 then
|
|
|
begin
|
|
|
frm_op_railway.Notebook1.PageIndex:=1;
|
|
|
frm_op_railway.bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ';
|
|
|
end;
|
|
|
if frm_op_railway_add_num=3 then
|
|
|
begin
|
|
|
frm_op_railway.Notebook1.PageIndex:=1;
|
|
|
frm_op_railway.bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ';
|
|
|
frm_op_railway.t_op_railway1.Enabled:=false;
|
|
|
frm_op_railway.t_op_railway1.DataSet:=frm_op_railway.t_op_railway_fen;
|
|
|
frm_op_railway.t_op_railway1.Enabled:=true;
|
|
|
end;
|
|
|
close;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_railway_add.bsSkinButton4Click(Sender: TObject);
|
|
|
var
|
|
|
Ext,adate,bsno,corp,vslvoy:String;
|
|
|
ExcelTemplet:Variant;
|
|
|
i,j:integer;
|
|
|
M,D,Y:Word;
|
|
|
imp:boolean;
|
|
|
begin
|
|
|
if OpenDialog1.Execute then begin
|
|
|
Ext:=lowercase(ExtractFileExt(OpenDialog1.FileName));
|
|
|
if Ext='.xls' then begin
|
|
|
ExcelTemplet:= CreateOleObject('Excel.Application');
|
|
|
try
|
|
|
ExcelTemplet.Workbooks.Open(OpenDialog1.FileName);
|
|
|
I:=2;
|
|
|
imp:=true;
|
|
|
while VartoStr(ExcelTemplet.ActiveSheet.Cells[I,4].Value)<>'' do begin
|
|
|
corp:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,4].Value);
|
|
|
if not frm_data_share.t_crm_client_all.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',corp,[]) then begin
|
|
|
MessageDlg('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>:'+corp+' ϵͳ<CFB5>в<EFBFBD><D0B2><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD><EFBFBD>Ӵ˿ͻ<CBBF><CDBB><EFBFBD>',mtWarning,[mbYes],0);
|
|
|
imp:=false;
|
|
|
end;
|
|
|
i:=i+1;
|
|
|
end;
|
|
|
|
|
|
if imp then
|
|
|
begin
|
|
|
I:=2;
|
|
|
while VartoStr(ExcelTemplet.ActiveSheet.Cells[I,4].Value)<>'' do
|
|
|
begin
|
|
|
aDate:=VarTostr(ExcelTemplet.ActiveSheet.Cells[i,10].Value);
|
|
|
corp:=VartoStr(ExcelTemplet.ActiveSheet.Cells[I,4].Value);
|
|
|
|
|
|
with frm_op_railway do
|
|
|
begin
|
|
|
t_op_railway.insert;
|
|
|
t_op_railway['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
t_op_railway['<27><><EFBFBD><EFBFBD>']:=get_id;
|
|
|
t_op_railway['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_id;
|
|
|
t_op_railway['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=date;
|
|
|
t_op_railway['<27>ܴ<EFBFBD>']:=WeekofYear(date);
|
|
|
t_op_railway['<27><><EFBFBD><EFBFBD>']:=0;
|
|
|
t_op_railway['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
|
|
|
t_op_railway['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_op_railway['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
t_op_railway['<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>']:=subComp;
|
|
|
t_op_railway['<27><><EFBFBD><EFBFBD>Ա']:=employee;
|
|
|
t_op_railway['<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>']:=employee;
|
|
|
t_op_railway['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_op_railway['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_op_railway['<27>ͷ<EFBFBD>Ա']:=employee;
|
|
|
t_op_railway['ҵ<><D2B5><EFBFBD><EFBFBD>Դ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
t_op_railway['<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>']:=department;
|
|
|
t_op_railway['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=department;
|
|
|
t_op_railway['װ<>˷<EFBFBD>ʽ']:='<27><>·<EFBFBD><C2B7>Ʊ';
|
|
|
t_op_railway['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><>ͨ<EFBFBD><CDA8>';
|
|
|
t_op_railway['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:='<27><><EFBFBD><EFBFBD>';
|
|
|
t_op_railway['<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>']:=VarTostr(ExcelTemplet.ActiveSheet.Cells[i,1].Value);
|
|
|
t_op_railway['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=VarTostr(ExcelTemplet.ActiveSheet.Cells[i,2].Value);
|
|
|
t_op_railway['ί<>б<EFBFBD><D0B1><EFBFBD>']:=VarTostr(ExcelTemplet.ActiveSheet.Cells[i,3].Value);
|
|
|
t_op_railway['ί<>е<EFBFBD>λ']:=VarTostr(ExcelTemplet.ActiveSheet.Cells[i,4].Value);
|
|
|
t_op_railway['<27><><EFBFBD><EFBFBD>']:=VarTostr(ExcelTemplet.ActiveSheet.Cells[i,5].Value);
|
|
|
t_op_railway['<27><><EFBFBD><EFBFBD>']:=VarTostr(ExcelTemplet.ActiveSheet.Cells[i,6].Value);
|
|
|
t_op_railway['<27><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>']:='<27><>Ӫ<EFBFBD><D3AA>λ:'+VarTostr(ExcelTemplet.ActiveSheet.Cells[i,7].Value)
|
|
|
+' <20><><EFBFBD><EFBFBD>Ʊ<EFBFBD><C6B1>:'+VarTostr(ExcelTemplet.ActiveSheet.Cells[i,8].Value)
|
|
|
+' <20><><EFBFBD><EFBFBD>:'+VarTostr(ExcelTemplet.ActiveSheet.Cells[i,9].Value);
|
|
|
t_op_railway['<27>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>']:=aDate;
|
|
|
t_op_railway['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=aDate;
|
|
|
t_op_railway.post;
|
|
|
end;
|
|
|
i:=i+1;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
ExcelTemplet.DisplayAlerts := false;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
|
|
ExcelTemplet.Quit;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD>', mtConfirmation, [mbYes],0);
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
end.
|