|
|
|
|
unit u_op_airtruck_add;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
Dialogs, DB, BusinessSkinForm, StdCtrls, wwdbdatetimepicker, bsSkinCtrls;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
Tfrm_op_airtruck_add = class(TForm)
|
|
|
|
|
Label1: TLabel;
|
|
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
|
|
data1: TDataSource;
|
|
|
|
|
bsSkinCheckRadioBox7: TbsSkinCheckRadioBox;
|
|
|
|
|
ComboBox1: TComboBox;
|
|
|
|
|
Label2: TLabel;
|
|
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
|
|
private
|
|
|
|
|
{ Private declarations }
|
|
|
|
|
public
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
frm_op_airtruck_add: Tfrm_op_airtruck_add;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses u_op_airtruck, u_main, my_sys_function;
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_airtruck_add.bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_airtruck_add.FormShow(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
wwDBDateTimePicker1.MinDate:=Logininfo.endday+1;
|
|
|
|
|
wwDBDateTimePicker1.Date:=date;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_airtruck_add.bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
data1.DataSet.Insert;
|
|
|
|
|
if Trim(ComboBox1.Text)<>'' then
|
|
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=ComboBox1.Text
|
|
|
|
|
else data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><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>';
|
|
|
|
|
}
|
|
|
|
|
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>']:=subComp;
|
|
|
|
|
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>Ա']:=employee;
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=department;
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
|
|
data1.DataSet['<27>ͷ<EFBFBD>Ա']:=employee;
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_parameters_value(19,'TSINGTAO');
|
|
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD>Դ']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
frm_op_airtruck.notebook1.pageindex:=1;
|
|
|
|
|
frm_op_airtruck.bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
|
|
frm_op_airtruck.bsSkinTabSheet1.Show;
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_airtruck_add.bsSkinButton3Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
afield : variant;
|
|
|
|
|
i: Integer;
|
|
|
|
|
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 Trim(ComboBox1.Text)<>'' then
|
|
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=ComboBox1.Text
|
|
|
|
|
else data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><><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>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
data1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='';
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>']:='';
|
|
|
|
|
data1.DataSet['ҵ<><D2B5>״̬']:='<27><><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>';
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
|
|
|
|
|
|
|
|
|
|
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
|
|
data1.DataSet['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
|
|
data1.DataSet['<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>']:=subComp;
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD>Ա']:=employee;
|
|
|
|
|
data1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=department;
|
|
|
|
|
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><EFBFBD><EFBFBD>']:=get_parameters_value(19,'TSINGTAO');
|
|
|
|
|
frm_op_airtruck.notebook1.pageindex:=1;
|
|
|
|
|
frm_op_airtruck.bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
|
|
|
|
|
frm_op_airtruck.bsSkinTabSheet1.Show;
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|