You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

132 lines
3.8 KiB
Plaintext

unit u_code_send_head;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxExEdtr, bsSkinCtrls, ExtCtrls, RxLookup, BusinessSkinForm,
StdCtrls, Mask, DBCtrls, dxTL, dxDBCtrl, dxDBGrid, dxCntner, DB;
type
Tfrm_code_send_head = class(TForm)
dxDBGrid1: TdxDBGrid;
bsBusinessSkinForm1: TbsBusinessSkinForm;
Panel1: TPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
dxDBGrid1HEAD_TO: TdxDBGridMaskColumn;
dxDBGrid1HEAD_ATTN: TdxDBGridMaskColumn;
DataSource1: TDataSource;
DataSource2: TDataSource;
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure bsSkinButton6Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_code_send_head: Tfrm_code_send_head;
code_send_head_num:integer;
implementation
uses u_data_share, my_sys_function, u_op_letter, u_op_truck;
{$R *.dfm}
procedure Tfrm_code_send_head.bsSkinButton1Click(Sender: TObject);
begin
frm_data_share.t_code_send_head.insert;
end;
procedure Tfrm_code_send_head.bsSkinButton2Click(Sender: TObject);
begin
table_post(frm_data_share.t_code_send_head);
end;
procedure Tfrm_code_send_head.bsSkinButton4Click(Sender: TObject);
begin
table_delete(frm_data_share.t_code_send_head);
end;
procedure Tfrm_code_send_head.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(frm_data_share.t_code_send_head);
end;
procedure Tfrm_code_send_head.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_code_send_head.FormShow(Sender: TObject);
begin
frm_data_share.t_code_send_head.requery;
end;
procedure Tfrm_code_send_head.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
begin
CanClose:=frm_close_query(frm_data_share.t_code_send_head);
end;
procedure Tfrm_code_send_head.bsSkinButton6Click(Sender: TObject);
begin
if frm_data_share.t_code_send_head.IsEmpty then
exit;
case code_send_head_num of
1:
begin
frm_op_letter.t_op_letter.edit;
frm_op_letter.t_op_letter['HEAD_TO']:=frm_data_share.t_code_send_head['HEAD_TO'];
frm_op_letter.t_op_letter['HEAD_ATTN']:=frm_data_share.t_code_send_head['HEAD_ATTN'];
frm_op_letter.t_op_letter.post;
end;
2:
begin
frm_data_share.t_sys_report_head.edit;
frm_data_share.t_sys_report_head['̨ͷTO']:=frm_data_share.t_code_send_head['HEAD_TO'];
frm_data_share.t_sys_report_head['̨ͷATTN']:=frm_data_share.t_code_send_head['HEAD_ATTN'];
frm_data_share.t_sys_report_head.post;
end;
3:
begin
DataSource1.DataSet.edit;
DataSource1.DataSet['HEAD_TO']:=frm_data_share.t_code_send_head['HEAD_TO'];
DataSource1.DataSet['HEAD_ATTN']:=frm_data_share.t_code_send_head['HEAD_ATTN'];
DataSource1.DataSet.post;
end;
4:
begin
{
frm_op_truck.t_op_letter.edit;
frm_op_truck.t_op_letter['HEAD_TO']:=frm_data_share.t_code_send_head['HEAD_TO'];
frm_op_truck.t_op_letter['HEAD_ATTN']:=frm_data_share.t_code_send_head['HEAD_ATTN'];
frm_op_truck.t_op_letter.post;
}
end;
5:
begin
DataSource2.DataSet.edit;
DataSource2.DataSet['̨ͷTO']:=frm_data_share.t_code_send_head['HEAD_TO'];
DataSource2.DataSet['̨ͷATTN']:=frm_data_share.t_code_send_head['HEAD_ATTN'];
DataSource2.DataSet.post;
end;
end;
close;
end;
end.