|
|
unit u_piliang_seae_state;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, bsSkinCtrls, BusinessSkinForm, dxExEdtr, dxDBTLCl, dxGrClms,
|
|
|
dxDBGrid, dxTL, dxDBCtrl, dxCntner, DB, ADODB, Grids, DBGrids,
|
|
|
kbmMemTable, ExtCtrls, XPMenu, Menus;
|
|
|
|
|
|
type
|
|
|
Tfrm_piliang_seae_state = class(TForm)
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column5: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column6: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column7: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column13: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column14: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column15: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column16: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column19: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column20: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1TEU: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column63: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column64: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column65: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column66: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column67: TdxDBGridMaskColumn;
|
|
|
t_op_seae: TADOStoredProc;
|
|
|
t_op_state: TkbmMemTable;
|
|
|
Panel1: TPanel;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
bsSkinButton11: TbsSkinButton;
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridCheckColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridDateColumn;
|
|
|
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn3: TdxDBGridMaskColumn;
|
|
|
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
|
|
|
dxDBGridDateColumn1: TdxDBGridDateColumn;
|
|
|
dxDBGrid1Column8: TdxDBGridColumn;
|
|
|
PopupMenu1: TPopupMenu;
|
|
|
N1: TMenuItem;
|
|
|
XPMenu1: TXPMenu;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
bsSkinSplitter1: TbsSkinSplitter;
|
|
|
t_op_state1: TDataSource;
|
|
|
t_op_seae1: TDataSource;
|
|
|
t_op_stateField2: TStringField;
|
|
|
t_op_stateField3: TBooleanField;
|
|
|
t_op_stateField4: TDateTimeField;
|
|
|
t_op_stateField5: TStringField;
|
|
|
t_op_stateField6: TStringField;
|
|
|
t_op_stateField7: TStringField;
|
|
|
t_op_stateField8: TDateTimeField;
|
|
|
t_op_stateField9: TIntegerField;
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
t_op_state2: TADOQuery;
|
|
|
bsSkinButton8: TbsSkinButton;
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
procedure t_op_stateAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_op_stateBeforeDelete(DataSet: TDataSet);
|
|
|
procedure bsSkinButton11Click(Sender: TObject);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
procedure bsSkinButton7Click(Sender: TObject);
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure t_op_state2AfterInsert(DataSet: TDataSet);
|
|
|
procedure bsSkinButton8Click(Sender: TObject);
|
|
|
private
|
|
|
procedure add_state_menu(n1:TPopupMenu);
|
|
|
procedure add_state(Sender:TObject);
|
|
|
procedure add_all(Sender:TObject);
|
|
|
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_piliang_seae_state: Tfrm_piliang_seae_state;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main, my_sys_function, u_data_share, u_op_state_add,
|
|
|
u_piliang_send_msg;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_piliang_seae_state.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_piliang_seae_state.bsSkinButton1Click(Sender: TObject);
|
|
|
var
|
|
|
Pnt:Tpoint;
|
|
|
begin
|
|
|
Pnt:=bsSkinButton1.ClientToScreen(Point(0,bsSkinButton1.Height));
|
|
|
PopupMenu1.Popup(Pnt.x,Pnt.y);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_piliang_seae_state.add_state_menu(n1:TPopupMenu);
|
|
|
var
|
|
|
nn:Tmenuitem;
|
|
|
i:integer;
|
|
|
begin
|
|
|
nn:=Tmenuitem.Create(application);
|
|
|
with nn do
|
|
|
begin
|
|
|
caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬ ';
|
|
|
onclick:=add_all;
|
|
|
n1.Items.Add(nn);
|
|
|
end;
|
|
|
|
|
|
i:=0;
|
|
|
frm_data_share.t_code_state.first;
|
|
|
while not frm_data_share.t_code_state.eof do
|
|
|
begin
|
|
|
i:=i+1;
|
|
|
|
|
|
nn:=Tmenuitem.Create(application);
|
|
|
with nn do
|
|
|
begin
|
|
|
caption:='-';
|
|
|
n1.Items.Add(nn);
|
|
|
end;
|
|
|
|
|
|
nn:=Tmenuitem.Create(application);
|
|
|
with nn do
|
|
|
begin
|
|
|
caption:=frm_data_share.t_code_state.fieldbyname('ҵ<><D2B5>״̬').asstring;
|
|
|
nn.Hint:=frm_data_share.t_code_state.fieldbyname('˳<><CBB3>').asstring;
|
|
|
onclick:=add_state;
|
|
|
n1.Items.Add(nn);
|
|
|
end;
|
|
|
frm_data_share.t_code_state.next;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_piliang_seae_state.add_state(Sender:TObject);
|
|
|
var
|
|
|
menu_skins:Tmenuitem;
|
|
|
begin
|
|
|
menu_skins:= Sender as Tmenuitem;
|
|
|
try
|
|
|
modify_all:=true;
|
|
|
t_op_state.Append;
|
|
|
t_op_state['ҵ<><D2B5>״̬']:=menu_skins.caption;
|
|
|
try
|
|
|
t_op_state['˳<><CBB3>']:=strtoint(menu_skins.Hint);
|
|
|
except
|
|
|
t_op_state['˳<><CBB3>']:=0;
|
|
|
end;
|
|
|
t_op_state.post;
|
|
|
finally
|
|
|
modify_all:=false;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_piliang_seae_state.add_all(Sender:TObject);
|
|
|
var
|
|
|
menu_skins:Tmenuitem;
|
|
|
begin
|
|
|
menu_skins:= Sender as Tmenuitem;
|
|
|
try
|
|
|
modify_all:=true;
|
|
|
frm_data_share.t_code_state.first;
|
|
|
while not frm_data_share.t_code_state.eof do
|
|
|
begin
|
|
|
t_op_state.Append;
|
|
|
t_op_state['ҵ<><D2B5>״̬']:=frm_data_share.t_code_state.fieldbyname('ҵ<><D2B5>״̬').asstring;
|
|
|
t_op_state['˳<><CBB3>']:=frm_data_share.t_code_state.fieldbyname('˳<><CBB3>').asinteger;
|
|
|
t_op_state.post;
|
|
|
frm_data_share.t_code_state.next;
|
|
|
end;
|
|
|
finally
|
|
|
modify_all:=false;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_piliang_seae_state.bsSkinButton6Click(Sender: TObject);
|
|
|
begin
|
|
|
try
|
|
|
frm_op_state_add:=tfrm_op_state_add.Create (self);
|
|
|
frm_data_share.t_code_state_project.Filtered:=false;
|
|
|
frm_data_share.t_code_state_project.requery;
|
|
|
frm_data_share.t_code_state_project.Filter:='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+'<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'+'''';
|
|
|
frm_data_share.t_code_state_project.Filtered:=true;
|
|
|
frm_op_state_add.DataSource1.DataSet:=t_op_state;
|
|
|
frm_op_state_add.ShowModal;
|
|
|
finally
|
|
|
frm_op_state_add.Free;
|
|
|
frm_op_state_add:=nil;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_piliang_seae_state.t_op_stateAfterInsert(DataSet: TDataSet);
|
|
|
begin
|
|
|
t_op_state['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_op_state['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_piliang_seae_state.t_op_stateBeforeDelete(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if t_op_state.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').asboolean then
|
|
|
begin
|
|
|
showmessage('ҵ<><D2B5>״̬<D7B4>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
abort;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_piliang_seae_state.bsSkinButton11Click(Sender: TObject);
|
|
|
var
|
|
|
str:string;
|
|
|
begin
|
|
|
str:=t_op_state.fieldbyname('ҵ<><D2B5>״̬').asstring;
|
|
|
if t_op_state.IsEmpty then
|
|
|
exit;
|
|
|
t_op_seae.First;
|
|
|
while not t_op_seae.Eof do begin
|
|
|
try
|
|
|
modify_all:=true;
|
|
|
t_op_seae.edit;
|
|
|
t_op_seae['ҵ<><D2B5>״̬']:=str;
|
|
|
t_op_seae['<27><><EFBFBD><EFBFBD>ǰ״̬']:=str;
|
|
|
t_op_seae.Post;
|
|
|
finally
|
|
|
modify_all:=false;
|
|
|
end;
|
|
|
t_op_seae.Next;
|
|
|
end;
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_piliang_seae_state.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
frm_data_share.t_code_state.Filtered:=false;
|
|
|
frm_data_share.t_code_state.Filter:='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+'<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'+'''';
|
|
|
frm_data_share.t_code_state.Filtered:=true;
|
|
|
PopupMenu1.Items.Clear;
|
|
|
add_state_menu(PopupMenu1);
|
|
|
if (yctx<>'<27><><EFBFBD><EFBFBD>') then bsSkinButton8.Visible:=false;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_piliang_seae_state.bsSkinButton9Click(Sender: TObject);
|
|
|
var
|
|
|
book1:Tbookmark;
|
|
|
begin
|
|
|
|
|
|
if t_op_state.isempty then
|
|
|
exit;
|
|
|
if not t_op_state.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').asboolean then
|
|
|
begin
|
|
|
t_op_state.edit;
|
|
|
t_op_state['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=1;
|
|
|
t_op_state['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=date;
|
|
|
t_op_state['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_op_state.post;
|
|
|
end;
|
|
|
|
|
|
book1:=t_op_state.GetBookmark;
|
|
|
|
|
|
t_op_seae.First;
|
|
|
while not t_op_seae.Eof do begin
|
|
|
t_op_state2.Open;
|
|
|
t_op_state.First;
|
|
|
while not t_op_state.Eof do begin
|
|
|
if t_op_state2.Locate('ҵ<><D2B5>״̬',t_op_state['ҵ<><D2B5>״̬'],[]) then begin
|
|
|
t_op_state2.Edit;
|
|
|
t_op_state2['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=t_op_state['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_state['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=t_op_state['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>'];
|
|
|
t_op_state2['<27><>ע']:=t_op_state['<27><>ע'];
|
|
|
t_op_state2['¼<><C2BC><EFBFBD><EFBFBD>']:=t_op_state['¼<><C2BC><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_state['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2.Post;
|
|
|
end else begin
|
|
|
t_op_state2.insert;
|
|
|
t_op_state2['ҵ<><D2B5>״̬']:=t_op_state['ҵ<><D2B5>״̬'];
|
|
|
t_op_state2['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=t_op_state['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=t_op_state['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>'];
|
|
|
t_op_state2['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_state['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2['<27><>ע']:=t_op_state['<27><>ע'];
|
|
|
t_op_state2['¼<><C2BC><EFBFBD><EFBFBD>']:=t_op_state['¼<><C2BC><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_state['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2.Post;
|
|
|
end;
|
|
|
t_op_state.Next;
|
|
|
end;
|
|
|
t_op_state2.close;
|
|
|
t_op_seae.next;
|
|
|
end;
|
|
|
t_op_state.GotoBookmark(book1);
|
|
|
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϣ<EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_piliang_seae_state.bsSkinButton7Click(Sender: TObject);
|
|
|
var
|
|
|
book1:Tbookmark;
|
|
|
begin
|
|
|
if t_op_state.isempty then
|
|
|
exit;
|
|
|
if t_op_state.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').asboolean then
|
|
|
begin
|
|
|
t_op_state.edit;
|
|
|
t_op_state['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=0;
|
|
|
t_op_state['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=null;
|
|
|
t_op_state['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=null;
|
|
|
t_op_state.post;
|
|
|
end;
|
|
|
book1:=t_op_state.GetBookmark;
|
|
|
|
|
|
t_op_seae.First;
|
|
|
while not t_op_seae.Eof do begin
|
|
|
t_op_state2.Open;
|
|
|
t_op_state.First;
|
|
|
while not t_op_state.Eof do begin
|
|
|
if t_op_state2.Locate('ҵ<><D2B5>״̬',t_op_state['ҵ<><D2B5>״̬'],[]) then begin
|
|
|
t_op_state2.Edit;
|
|
|
t_op_state2['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=t_op_state['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_state['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=t_op_state['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>'];
|
|
|
t_op_state2['<27><>ע']:=t_op_state['<27><>ע'];
|
|
|
t_op_state2['¼<><C2BC><EFBFBD><EFBFBD>']:=t_op_state['¼<><C2BC><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_state['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2.Post;
|
|
|
end else begin
|
|
|
t_op_state2.insert;
|
|
|
t_op_state2['ҵ<><D2B5>״̬']:=t_op_state['ҵ<><D2B5>״̬'];
|
|
|
t_op_state2['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=t_op_state['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=t_op_state['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>'];
|
|
|
t_op_state2['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_state['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2['<27><>ע']:=t_op_state['<27><>ע'];
|
|
|
t_op_state2['¼<><C2BC><EFBFBD><EFBFBD>']:=t_op_state['¼<><C2BC><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_state['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2.Post;
|
|
|
end;
|
|
|
t_op_state.Next;
|
|
|
end;
|
|
|
t_op_state2.close;
|
|
|
t_op_seae.next;
|
|
|
end;
|
|
|
t_op_state.GotoBookmark(book1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_piliang_seae_state.bsSkinButton4Click(Sender: TObject);
|
|
|
begin
|
|
|
if t_op_state.isempty then
|
|
|
exit;
|
|
|
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)<>IDOK then
|
|
|
exit;
|
|
|
if dxDBGrid1.SelectedCount>=1 then
|
|
|
begin
|
|
|
while dxDBGrid1.SelectedCount>0 do
|
|
|
begin
|
|
|
t_op_state.GotoBookmark(pointer(dxDBGrid1.selectedrows[0]));
|
|
|
t_op_seae.First;
|
|
|
while not t_op_seae.Eof do begin
|
|
|
t_op_state2.Open;
|
|
|
if t_op_state2.Locate('ҵ<><D2B5>״̬',t_op_state['ҵ<><D2B5>״̬'],[]) then begin
|
|
|
t_op_state2.Delete;
|
|
|
end;
|
|
|
t_op_state2.close;
|
|
|
t_op_seae.next;
|
|
|
end;
|
|
|
t_op_state.Delete;
|
|
|
end;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
t_op_seae.First;
|
|
|
while not t_op_seae.Eof do begin
|
|
|
t_op_state2.Open;
|
|
|
if t_op_state2.Locate('ҵ<><D2B5>״̬',t_op_state['ҵ<><D2B5>״̬'],[]) then begin
|
|
|
t_op_state2.Delete;
|
|
|
end;
|
|
|
t_op_state2.close;
|
|
|
t_op_seae.next;
|
|
|
end;
|
|
|
t_op_state.Delete;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_piliang_seae_state.bsSkinButton2Click(Sender: TObject);
|
|
|
begin
|
|
|
t_op_seae.First;
|
|
|
while not t_op_seae.Eof do begin
|
|
|
t_op_state2.Open;
|
|
|
t_op_state.First;
|
|
|
while not t_op_state.Eof do begin
|
|
|
if t_op_state2.Locate('ҵ<><D2B5>״̬',t_op_state['ҵ<><D2B5>״̬'],[]) then begin
|
|
|
t_op_state2.Edit;
|
|
|
t_op_state2['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=t_op_state['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_state['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=t_op_state['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>'];
|
|
|
t_op_state2['<27><>ע']:=t_op_state['<27><>ע'];
|
|
|
t_op_state2['¼<><C2BC><EFBFBD><EFBFBD>']:=t_op_state['¼<><C2BC><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_state['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2.Post;
|
|
|
end else begin
|
|
|
t_op_state2.insert;
|
|
|
t_op_state2['ҵ<><D2B5>״̬']:=t_op_state['ҵ<><D2B5>״̬'];
|
|
|
t_op_state2['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=t_op_state['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=t_op_state['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>'];
|
|
|
t_op_state2['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_state['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2['<27><>ע']:=t_op_state['<27><>ע'];
|
|
|
t_op_state2['¼<><C2BC><EFBFBD><EFBFBD>']:=t_op_state['¼<><C2BC><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_state['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
t_op_state2.Post;
|
|
|
end;
|
|
|
t_op_state.Next;
|
|
|
end;
|
|
|
t_op_state2.close;
|
|
|
t_op_seae.next;
|
|
|
end;
|
|
|
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϣ<EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_piliang_seae_state.t_op_state2AfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_op_state2['<27><><EFBFBD><EFBFBD>']:=t_op_seae['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_piliang_seae_state.bsSkinButton8Click(Sender: TObject);
|
|
|
begin
|
|
|
|
|
|
if (yctx<>'<27><><EFBFBD><EFBFBD>') or (trim(get_parameters_value(134,'<27><>'))='<27><>') then begin
|
|
|
end else
|
|
|
frm_piliang_send_msg:=Tfrm_piliang_send_msg.Create(self);
|
|
|
piliangsend:=false;
|
|
|
frm_piliang_send_msg.transtype:=1;
|
|
|
frm_piliang_send_msg.t_msg_mold.Close;
|
|
|
frm_piliang_send_msg.t_msg_mold.sql.text:='select * from t_sys_msgmold where <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>=''<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'' ';
|
|
|
frm_piliang_send_msg.t_msg_mold.open;
|
|
|
t_op_seae.First;
|
|
|
while not t_op_seae.Eof do begin
|
|
|
|
|
|
if (yctx<>'<27><><EFBFBD><EFBFBD>') or (trim(get_parameters_value(134,'<27><>'))='<27><>') then begin
|
|
|
end else begin
|
|
|
frm_data_share.t_crm_client_all.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_op_seae['ί<>е<EFBFBD>λ'],[]);
|
|
|
frm_piliang_send_msg.t_crm_client_link.Open;
|
|
|
frm_piliang_send_msg.memmsg.open;
|
|
|
frm_piliang_send_msg.memmsg.insert;
|
|
|
frm_piliang_send_msg.memmsg.FieldByName('<27>ռ<EFBFBD><D5BC><EFBFBD>λ').AsString:=t_op_seae.fieldbyname('ί<>е<EFBFBD>λ').AsString;
|
|
|
frm_piliang_send_msg.memmsg.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
frm_piliang_send_msg.memmsg.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString:=t_op_seae.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').AsString;
|
|
|
frm_piliang_send_msg.memmsg.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString;
|
|
|
frm_piliang_send_msg.memmsg.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString;
|
|
|
frm_piliang_send_msg.memmsg.FieldByName('<27><><EFBFBD>ͷ<EFBFBD>ʽ').AsString:=trim(get_parameters_value(134,'<27><>'));
|
|
|
if not frm_piliang_send_msg.t_crm_client_link.IsEmpty then begin
|
|
|
frm_piliang_send_msg.t_crm_client_link.first;
|
|
|
frm_piliang_send_msg.t_crm_client_link.Locate('Ĭ<><C4AC><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>',true,[]);
|
|
|
frm_piliang_send_msg.memmsg.FieldByName('<27>ռ<EFBFBD><D5BC><EFBFBD>').AsString:=frm_piliang_send_msg.t_crm_client_link.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
|
|
|
|
if (trim(get_parameters_value(134,'<27><>'))='Ĭ<><C4AC>') and (frm_piliang_send_msg.t_crm_client_link.fieldbyname('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD>ѷ<EFBFBD>ʽ').AsString<>'') then begin
|
|
|
if trim(frm_piliang_send_msg.t_crm_client_link.fieldbyname('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD>ѷ<EFBFBD>ʽ').AsString)='MSN' then
|
|
|
frm_piliang_send_msg.memmsg.FieldByName('<27><><EFBFBD>ͺ<EFBFBD><CDBA><EFBFBD>').AsString:=frm_piliang_send_msg.t_crm_client_link.fieldbyname('MSN').AsString;
|
|
|
if trim(frm_piliang_send_msg.t_crm_client_link.fieldbyname('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD>ѷ<EFBFBD>ʽ').AsString)='<27>ʼ<EFBFBD>' then
|
|
|
frm_piliang_send_msg.memmsg.FieldByName('<27><><EFBFBD>ͺ<EFBFBD><CDBA><EFBFBD>').AsString:=frm_piliang_send_msg.t_crm_client_link.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
if trim(frm_piliang_send_msg.t_crm_client_link.fieldbyname('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD>ѷ<EFBFBD>ʽ').AsString)='<27><><EFBFBD><EFBFBD>' then
|
|
|
frm_piliang_send_msg.memmsg.FieldByName('<27><><EFBFBD>ͺ<EFBFBD><CDBA><EFBFBD>').AsString:=frm_piliang_send_msg.t_crm_client_link.fieldbyname('<27>ֻ<EFBFBD>').AsString;
|
|
|
end else begin
|
|
|
if trim(get_parameters_value(134,'<27><>'))='MSN' then
|
|
|
frm_piliang_send_msg.memmsg.FieldByName('<27><><EFBFBD>ͺ<EFBFBD><CDBA><EFBFBD>').AsString:=frm_piliang_send_msg.t_crm_client_link.fieldbyname('MSN').AsString;
|
|
|
if trim(get_parameters_value(134,'<27><>'))='<27>ʼ<EFBFBD>' then
|
|
|
frm_piliang_send_msg.memmsg.FieldByName('<27><><EFBFBD>ͺ<EFBFBD><CDBA><EFBFBD>').AsString:=frm_piliang_send_msg.t_crm_client_link.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
if trim(get_parameters_value(134,'<27><>'))='<27><><EFBFBD><EFBFBD>' then
|
|
|
frm_piliang_send_msg.memmsg.FieldByName('<27><><EFBFBD>ͺ<EFBFBD><CDBA><EFBFBD>').AsString:=frm_piliang_send_msg.t_crm_client_link.fieldbyname('<27>ֻ<EFBFBD>').AsString;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
frm_piliang_send_msg.memmsg.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=getstrfromdataset(t_op_seae,frm_piliang_send_msg.t_msg_mold.fieldbyname('ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
|
|
|
{
|
|
|
frm_piliang_send_msg.memmsg.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=frm_data_share.t_sys_company.fieldbyname('ȫ<><C8AB>').AsString+'<27><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>˾ί<CBBE><CEAF><EFBFBD><EFBFBD>˾'
|
|
|
+'<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>:'+t_op_seae.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+','
|
|
|
+'<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>:'+t_op_seae.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+t_op_seae.Fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+#10#13+
|
|
|
'ҵ<><D2B5>״̬<D7B4>Ѹ<EFBFBD><D1B8><EFBFBD>Ϊ'+str;
|
|
|
}
|
|
|
|
|
|
frm_piliang_send_msg.memmsg.post;
|
|
|
end;
|
|
|
|
|
|
t_op_seae.Next;
|
|
|
end;
|
|
|
|
|
|
if (yctx<>'<27><><EFBFBD><EFBFBD>') or (trim(get_parameters_value(134,'<27><>'))='<27><>') then begin
|
|
|
end else begin
|
|
|
frm_piliang_send_msg.ShowModal;
|
|
|
FreeAndNil(frm_piliang_send_msg);
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end.
|