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
4.2 KiB
Plaintext

11 months ago
unit u_code_truck_client;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxExEdtr, BusinessSkinForm, StdCtrls, DBCtrls, Mask, dxTL,DB,
dxDBCtrl, dxDBGrid, dxCntner, bsSkinCtrls, RxLookup, ExtCtrls;
type
Tfrm_code_truck_client = class(TForm)
Label2: TLabel;
dxDBGrid1: TdxDBGrid;
DBEdit2: TDBEdit;
bsBusinessSkinForm1: TbsBusinessSkinForm;
dxDBGrid1Column1: TdxDBGridMaskColumn;
Label1: TLabel;
DBEdit1: TDBEdit;
Label3: TLabel;
DBEdit3: TDBEdit;
RxDBLookupCombo1: TRxDBLookupCombo;
Label4: TLabel;
Panel1: TPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
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);
procedure RxDBLookupCombo1Change(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_code_truck_client: Tfrm_code_truck_client;
code_truck_client_num:integer;
implementation
uses u_data_share, u_op_letter, my_sys_function, u_op_truck;
{$R *.dfm}
procedure Tfrm_code_truck_client.bsSkinButton1Click(Sender: TObject);
begin
frm_data_share.t_code_truck_client.insert;
end;
procedure Tfrm_code_truck_client.bsSkinButton2Click(Sender: TObject);
begin
table_post(frm_data_share.t_code_truck_client);
end;
procedure Tfrm_code_truck_client.bsSkinButton4Click(Sender: TObject);
begin
table_delete(frm_data_share.t_code_truck_client);
end;
procedure Tfrm_code_truck_client.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(frm_data_share.t_code_truck_client);
end;
procedure Tfrm_code_truck_client.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_code_truck_client.FormShow(Sender: TObject);
begin
frm_data_share.t_code_truck_client.requery;
end;
procedure Tfrm_code_truck_client.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
begin
CanClose:=frm_close_query(frm_data_share.t_code_truck_client);
end;
procedure Tfrm_code_truck_client.bsSkinButton6Click(Sender: TObject);
begin
if frm_data_share.t_code_truck_client.IsEmpty then
exit;
case code_truck_client_num of
1:
begin
frm_op_letter.t_op_letter_pc.edit;
frm_op_letter.t_op_letter_pc['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_truck_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
frm_op_letter.t_op_letter_pc['<27><><EFBFBD>ҵ<EFBFBD>ַ']:=frm_data_share.t_code_truck_client['<27><><EFBFBD>ҵ<EFBFBD>ַ'];
frm_op_letter.t_op_letter_pc['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>']:=frm_data_share.t_code_truck_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>'];
frm_op_letter.t_op_letter_pc['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>绰']:=frm_data_share.t_code_truck_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>绰'];
frm_op_letter.t_op_letter_pc.post;
end;
2:
begin
frm_op_truck.t_op_letter_pc.edit;
frm_op_letter.t_op_letter_pc['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_truck_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
frm_op_truck.t_op_letter_pc['<27><><EFBFBD>ҵ<EFBFBD>ַ']:=frm_data_share.t_code_truck_client['<27><><EFBFBD>ҵ<EFBFBD>ַ'];
frm_op_truck.t_op_letter_pc['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>']:=frm_data_share.t_code_truck_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>'];
frm_op_truck.t_op_letter_pc['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>绰']:=frm_data_share.t_code_truck_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>绰'];
frm_op_truck.t_op_letter_pc.post;
end;
end;
close;
end;
procedure Tfrm_code_truck_client.RxDBLookupCombo1Change(Sender: TObject);
begin
if frm_data_share.t_code_truck_client.State in [dsinsert,dsedit] then
begin
if frm_data_share.t_crm_client.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',RxDBLookupCombo1.DisplayValues[1],[])then
begin
frm_data_share.t_code_truck_client['<27><><EFBFBD>ҵ<EFBFBD>ַ']:=frm_data_share.t_crm_client.fieldbyname('ͨѶ<CDA8><D1B6>ַ').AsString;
frm_data_share.t_code_truck_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>']:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').asstring;
frm_data_share.t_code_truck_client['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>绰']:=frm_data_share.t_crm_client.fieldbyname('<27><><EFBFBD>˵绰').asstring;
end;
end;
end;
end.