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.

924 lines
29 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

unit u_op_sate;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid, DB,
ADODB, dxDBTLCl, dxGrClms, bsdbctrls,
RxLookup, StdCtrls, Mask, DBCtrls, wwdbedit, Wwdotdot, Wwdbcomb, Menus,
XPMenu, ExtCtrls;
type
Tfra_op_state = class(TFrame)
t_op_state1: TDataSource;
t_op_state: TADOQuery;
Panel1: TPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
edit_state: TEdit;
PopupMenu1: TPopupMenu;
bsSkinButton11: TbsSkinButton;
N1: TMenuItem;
bsSkinButton5: TbsSkinButton;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridCheckColumn;
dxDBGrid1Column3: TdxDBGridDateColumn;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid1Column5: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridMaskColumn;
dxDBGrid1Column7: TdxDBGridDateColumn;
bsSkinButton6: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
dxDBGrid1Column8: TdxDBGridColumn;
XPMenu1: TXPMenu;
bsSkinButton8: TbsSkinButton;
dxDBGrid1Column9: TdxDBGridColumn;
dxDBGrid1Column11: TdxDBGridDateColumn;
dxDBGrid1Column10: TdxDBGridDateColumn;
procedure t_op_stateAfterInsert(DataSet: TDataSet);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure t_op_stateBeforePost(DataSet: TDataSet);
procedure Panel1Resize(Sender: TObject);
procedure t_op_stateBeforeDelete(DataSet: TDataSet);
procedure add_state_menu(n1:TPopupMenu);
procedure add_state(Sender:TObject);
procedure t_op_stateBeforeInsert(DataSet: TDataSet);
procedure FrameEnter(Sender: TObject);
procedure add_all(Sender:TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure dxDBGrid1Column1CustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure updateCancelbook;
end;
implementation
uses u_main, u_data_share, my_sys_function, u_op_state_add, u_send_msg;
{$R *.dfm}
procedure Tfra_op_state.add_state(Sender:TObject);
var
menu_skins:Tmenuitem;
begin
//<2F><><EFBFBD>ݲ˵<DDB2><CBB5><EFBFBD><EFBFBD><EFBFBD>״̬
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 Tfra_op_state.add_all(Sender:TObject);
var
menu_skins:Tmenuitem;
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬
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 Tfra_op_state.add_state_menu(n1:TPopupMenu);
var
nn:Tmenuitem;
i:integer;
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4>˵<EFBFBD>
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 Tfra_op_state.t_op_stateAfterInsert(DataSet: TDataSet);
begin
t_op_state['<27><><EFBFBD><EFBFBD>']:=t_op_state.DataSource.DataSet['<27><><EFBFBD><EFBFBD>'];
t_op_state['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_op_state['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
t_op_state['ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>']:=0;
end;
procedure Tfra_op_state.bsSkinButton1Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton1.ClientToScreen(Point(0,bsSkinButton1.Height));
PopupMenu1.Popup(Pnt.x,Pnt.y);
end;
procedure Tfra_op_state.bsSkinButton2Click(Sender: TObject);
begin
table_post(t_op_state);
end;
procedure Tfra_op_state.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(t_op_state);
end;
procedure Tfra_op_state.t_op_stateBeforePost(DataSet: TDataSet);
begin
table_before_post(t_op_state,'ҵ<><D2B5>״̬');
end;
procedure Tfra_op_state.Panel1Resize(Sender: TObject);
var
i:integer;
begin
i:=round(Panel1.Width/9);
bsSkinButton1.Width:=i;
bsSkinButton2.Width:=i;
bsSkinButton4.Width:=i;
bsSkinButton11.Width:=i;
bsSkinButton5.Width:=i;
bsSkinButton7.Width:=i;
bsSkinButton6.Width:=i;
bsSkinButton8.Width:=i;
end;
procedure Tfra_op_state.t_op_stateBeforeDelete(DataSet: TDataSet);
begin
if not t_op_state.FieldByName('ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>').AsBoolean then
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
else
begin
showmessage('ϵͳ<CFB5>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5>״̬<D7B4><CCAC>'+t_op_state.FieldByName('ҵ<><D2B5>״̬').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
abort;
end;
end;
procedure Tfra_op_state.t_op_stateBeforeInsert(DataSet: TDataSet);
begin
if t_op_state.DataSource.DataSet.State=dsinsert then
t_op_state.DataSource.DataSet.post;
if not modify_all then
begin
abort;
end;
end;
procedure Tfra_op_state.FrameEnter(Sender: TObject);
begin
case strtoint(edit_state.text) of
1:
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;
end;
2:
begin
frm_data_share.t_code_state.Filtered:=false;
frm_data_share.t_code_state.Filter:='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+'<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'+'''';
frm_data_share.t_code_state.Filtered:=true;
end;
3:
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;
end;
4:
begin
frm_data_share.t_code_state.Filtered:=false;
frm_data_share.t_code_state.Filter:='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+'<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'+'''';
frm_data_share.t_code_state.Filtered:=true;
end;
5:
begin
frm_data_share.t_code_state.Filtered:=false;
frm_data_share.t_code_state.Filter:='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+'<27><><EFBFBD>ܳ<EFBFBD>'+'''';
frm_data_share.t_code_state.Filtered:=true;
end;
6:
begin
frm_data_share.t_code_state.Filtered:=false;
frm_data_share.t_code_state.Filter:='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+'<27><>·<EFBFBD><C2B7><EFBFBD><EFBFBD>'+'''';
frm_data_share.t_code_state.Filtered:=true;
end;
7:
begin
frm_data_share.t_code_state.Filtered:=false;
frm_data_share.t_code_state.Filter:='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+'<27><><EFBFBD>Ϲ<EFBFBD><CFB9><EFBFBD>'+'''';
frm_data_share.t_code_state.Filtered:=true;
end;
end;
PopupMenu1.Items.Clear;
add_state_menu(PopupMenu1);
if (yctx<>'<27><><EFBFBD><EFBFBD>') then bsSkinButton8.Visible:=false;
end;
procedure Tfra_op_state.updateCancelbook;
var aAdoQuery:TAdoQuery;
s:string;
begin
s:='';
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;
sql.clear;
sql.add('update t_op_ctn set <20><><EFBFBD><EFBFBD>=0 where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_state.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
ExecSQL;
t_op_state.DataSource.DataSet.Edit;
t_op_state.DataSource.DataSet['<27><><EFBFBD><EFBFBD>1']:=0;
t_op_state.DataSource.DataSet['<27><><EFBFBD><EFBFBD>2']:=0;
t_op_state.DataSource.DataSet['<27><><EFBFBD><EFBFBD>3']:=0;
t_op_state.DataSource.DataSet['<27><><EFBFBD><EFBFBD>4']:=0;
t_op_state.DataSource.DataSet['<27><><EFBFBD><EFBFBD>5']:=0;
t_op_state.DataSource.DataSet['<27><><EFBFBD><EFBFBD>6']:=0;
t_op_state.DataSource.DataSet['<27><><EFBFBD><EFBFBD>7']:=0;
t_op_state.DataSource.DataSet['<27><><EFBFBD><EFBFBD>8']:=0;
t_op_state.DataSource.DataSet['<27><><EFBFBD><EFBFBD>9']:=0;
t_op_state.DataSource.DataSet['<27><><EFBFBD><EFBFBD>10']:=0;
t_op_state.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_op_state.DataSource.DataSet['<27><>TEU']:=0;
t_op_state.DataSource.DataSet['<27><>װ<EFBFBD><D7B0>']:='';
t_op_state.DataSource.DataSet['<27>Ʒѱ<C6B7>׼']:='';
t_op_state.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:='';
t_op_state.DataSource.DataSet['<27>ϼ<EFBFBD>20']:=0;
t_op_state.DataSource.DataSet['<27>ϼ<EFBFBD>40']:=0;
t_op_state.DataSource.DataSet['<27>ϼ<EFBFBD>40H']:=0;
t_op_state.DataSource.DataSet['<27>ϼ<EFBFBD>45']:=0;
Close;
sql.clear;
sql.add('select distinct <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ from t_op_ctn where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_state.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
Open;First;
while not Eof do
begin
if s='' then
s:=fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring+'*0'
else
s:=s+fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring+'*0';
Next;
end;
t_op_state.DataSource.DataSet['<27><>װ<EFBFBD><D7B0>']:=s;
t_op_state.DataSource.DataSet['ǩ<><C7A9><EFBFBD><EFBFBD>ʽ']:='<27>޵<EFBFBD>';
t_op_state.DataSource.DataSet['<27><>վ']:='<27><> <20><>';
t_op_state.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='<27><> <20><>';
t_op_state.DataSource.DataSet['<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>']:='<27><> <20><>';
t_op_state.DataSource.DataSet['<27><><EFBFBD>ѷ<EFBFBD>ʽ']:='FREE';
{
if Pos('HK:',t_op_state.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString)>0 then
begin
t_op_state.DataSource.DataSet['<27><>վ']:='<27><> <20><> <20><>';
end;
}
t_op_state.DataSource.DataSet.Post;
finally
Free;
end;
end;
procedure Tfra_op_state.bsSkinButton11Click(Sender: TObject);
var
str:string;
i:integer;
begin
//״̬<D7B4><CCAC><EFBFBD>µ<EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>Ϣ<EFBFBD>У<EFBFBD><D0A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
str:=t_op_state.fieldbyname('ҵ<><D2B5>״̬').asstring;
if t_op_state.IsEmpty then
exit;
table_post(t_op_state);
try
// frm_main.db.BeginTrans;
modify_all:=true;
t_op_state.DataSource.DataSet.edit;
t_op_state.DataSource.DataSet['<27><><EFBFBD><EFBFBD>ǰ״̬']:=str;
t_op_state.DataSource.DataSet['ҵ<><D2B5>״̬']:=str;
if str='<27>ѷ<EFBFBD><D1B7><EFBFBD>' then
begin
if t_op_state.DataSource.DataSet.FindField('ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')<>nil then
begin
if not t_op_state.fieldbyname('ȷ<><C8B7>ʱ<EFBFBD><CAB1>').IsNull then
t_op_state.DataSource.DataSet.FieldByName('ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=t_op_state.fieldbyname('ȷ<><C8B7>ʱ<EFBFBD><CAB1>').AsDateTime
else t_op_state.DataSource.DataSet.FieldByName('ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=Date;
end;
end;
t_op_state.DataSource.DataSet.Post;
if strtobool(get_parameters_value(195,'false'))
and (UpperCase(t_op_state.DataSource.DataSet.Name)='T_OP_SEAE')
and (t_op_state.DataSource.DataSet.fieldbyname('ҵ<><D2B5>״̬').asstring<>'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
and (str='<27>˲<EFBFBD>')
then
updateCancelbook;
if strtobool(get_parameters_value(154,'false')) then
begin
frm_main.qryweb.close;
frm_main.qryweb.sql.clear;
case strtoint(edit_state.text) of
1:
begin
frm_main.qryweb.sql.add('select * from t_op_seae where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
frm_main.qryweb.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_state.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
frm_main.qryweb.open;
end;
2,7:
begin
frm_main.qryweb.sql.add('select * from t_op_seai where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
frm_main.qryweb.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_state.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
frm_main.qryweb.open;
end;
3:
begin
frm_main.qryweb.sql.add('select * from t_op_aire where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
frm_main.qryweb.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_state.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
frm_main.qryweb.open;
end;
4:
begin
frm_main.qryweb.sql.add('select * from t_op_airi where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
frm_main.qryweb.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_state.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
frm_main.qryweb.open;
end;
end;
if frm_main.qryweb.IsEmpty then exit;
frm_main.qryweb.close;
frm_main.qryweb.sql.clear;
frm_main.qryweb.sql.add('select * from t_op_state where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
frm_main.qryweb.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_state.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
frm_main.qryweb.open;
t_op_state.First;
while not t_op_state.Eof do
begin
if t_op_state.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').AsBoolean then
begin
t_op_state.edit;
t_op_state['ȷ<><C8B7>ʱ<EFBFBD><CAB1>']:=date;
t_op_state['ȷ<><C8B7><EFBFBD><EFBFBD>']:=employee;
t_op_state.post;
if frm_main.qryweb.Locate('OS',t_op_state.fieldbyname('OS').AsInteger,[]) then
begin
{
frm_main.qryweb.Edit;
for i:=0 to frm_main.qryweb.FieldCount-1 do begin
if frm_main.qryweb.Fields[i].FieldName<>'OS' then
frm_main.qryweb.Fields[i].Value:=t_op_state.fieldbyname(frm_main.qryweb.Fields[i].FieldName).Value;
end;
frm_main.qryweb.post;
}
end
else
begin
frm_main.qryweb.Insert;
t_op_state.edit;
t_op_state['ȷ<><C8B7>ʱ<EFBFBD><CAB1>']:=date;
t_op_state['ȷ<><C8B7><EFBFBD><EFBFBD>']:=employee;
t_op_state.post;
for i:=0 to frm_main.qryweb.FieldCount-1 do
begin
frm_main.qryweb.Fields[i].Value:=t_op_state.fieldbyname(frm_main.qryweb.Fields[i].FieldName).Value;
end;
frm_main.qryweb.post;
end;
end;
t_op_state.Next;
end;
end;
// frm_main.db.CommitTrans;
except
on e:Exception do
begin
ShowMessage(e.Message);
end;
{
if frm_main.db.InTransaction then begin
MessageDlg('<27>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>رյ<D8B1>ǰҵ<C7B0><D2B5><EFBFBD><EFBFBD><EFBFBD>ԣ<EFBFBD>',mterror,[mbok],0);
frm_main.db.RollbackTrans;
end;
}
end;
modify_all:=false;
end;
{
procedure Tfra_op_state.bsSkinButton11Click(Sender: TObject);
var
str:string;
i:integer;
begin
//״̬<D7B4><CCAC><EFBFBD>µ<EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>Ϣ<EFBFBD>У<EFBFBD><D0A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
str:=t_op_state.fieldbyname('ҵ<><D2B5>״̬').asstring;
if t_op_state.IsEmpty then
exit;
table_post(t_op_state);
try
frm_main.db.BeginTrans;
modify_all:=true;
t_op_state.DataSource.DataSet.edit;
t_op_state.DataSource.DataSet['<27><><EFBFBD><EFBFBD>ǰ״̬']:=str;
t_op_state.DataSource.DataSet['ҵ<><D2B5>״̬']:=str;
t_op_state.DataSource.DataSet.Post;
if strtobool(get_parameters_value(154,'false')) then
begin
case strtoint(edit_state.text) of
1:begin
frm_main.qryweb.close;
frm_main.qryweb.sql.clear;
frm_main.qryweb.sql.add('select * from t_op_seae where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
frm_main.qryweb.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_state.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
frm_main.qryweb.open;
end;
2:begin
frm_main.qryweb.close;
frm_main.qryweb.sql.clear;
frm_main.qryweb.sql.add('select * from t_op_seai where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
frm_main.qryweb.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_state.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
frm_main.qryweb.open;
SubmitToWebMasterBills(t_op_state.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString,'t_op_seai');
end;
7:begin
frm_main.qryweb.close;
frm_main.qryweb.sql.clear;
frm_main.qryweb.sql.add('select * from t_op_seai where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
frm_main.qryweb.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_state.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
frm_main.qryweb.open;
SubmitToWebMasterBills(t_op_state.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString,'t_op_seai');
end;
end;
// if frm_main.qryweb.IsEmpty then exit;
frm_main.qryweb.close;
frm_main.qryweb.sql.clear;
frm_main.qryweb.sql.add('select * from t_op_state where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
frm_main.qryweb.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_state.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
frm_main.qryweb.open;
t_op_state.First;
while not t_op_state.Eof do
begin
if t_op_state.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').AsBoolean then
begin
if frm_main.qryweb.Locate('OS',t_op_state.fieldbyname('OS').AsInteger,[]) then
begin
frm_main.qryweb.Edit;
for i:=0 to frm_main.qryweb.FieldCount-1 do
begin
if frm_main.qryweb.Fields[i].FieldName<>'OS' then
frm_main.qryweb.Fields[i].Value:=t_op_state.fieldbyname(frm_main.qryweb.Fields[i].FieldName).Value;
end;
frm_main.qryweb.post;
end
else
begin
frm_main.qryweb.Insert;
t_op_state.edit;
t_op_state['ȷ<><C8B7>ʱ<EFBFBD><CAB1>']:=date;
t_op_state['ȷ<><C8B7><EFBFBD><EFBFBD>']:=employee;
t_op_state.post;
for i:=0 to frm_main.qryweb.FieldCount-1 do
begin
if frm_main.qryweb.Fields[i].FieldName<>'OS' then
frm_main.qryweb.Fields[i].Value:=t_op_state.fieldbyname(frm_main.qryweb.Fields[i].FieldName).Value;
frm_main.qryweb['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=1;
frm_main.qryweb['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=date;
frm_main.qryweb['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
end;
frm_main.qryweb.post;
end;
end
else
begin
if frm_main.qryweb.Locate('OS',t_op_state.fieldbyname('OS').AsInteger,[]) then
begin
frm_main.qryweb.Edit;
for i:=0 to frm_main.qryweb.FieldCount-1 do begin
if frm_main.qryweb.Fields[i].FieldName<>'OS' then
frm_main.qryweb.Fields[i].Value:=t_op_state.fieldbyname(frm_main.qryweb.Fields[i].FieldName).Value;
end;
frm_main.qryweb.post;
end
else
begin
frm_main.qryweb.Insert;
t_op_state.edit;
t_op_state['ȷ<><C8B7>ʱ<EFBFBD><CAB1>']:=date;
t_op_state['ȷ<><C8B7><EFBFBD><EFBFBD>']:=employee;
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;
for i:=0 to frm_main.qryweb.FieldCount-1 do
begin
if frm_main.qryweb.Fields[i].FieldName<>'OS' then
frm_main.qryweb.Fields[i].Value:=t_op_state.fieldbyname(frm_main.qryweb.Fields[i].FieldName).Value;
frm_main.qryweb['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>']:=1;
frm_main.qryweb['<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>']:=date;
frm_main.qryweb['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
end;
frm_main.qryweb.post;
end;
end;
t_op_state.Next;
end;
end
else
begin
t_op_state.First;
while not t_op_state.Eof do
begin
t_op_state.edit;
t_op_state['ȷ<><C8B7>ʱ<EFBFBD><CAB1>']:=date;
t_op_state['ȷ<><C8B7><EFBFBD><EFBFBD>']:=employee;
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;
t_op_state.Next;
end;
end;
// bsSkinButton7Click(Sender);
frm_main.db.CommitTrans;
finally
if frm_main.db.InTransaction then
begin
MessageDlg('<27>ϴ<EFBFBD>״̬ʱ<CCAC><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>رյ<D8B1>ǰҵ<C7B0><D2B5><EFBFBD><EFBFBD><EFBFBD>ԣ<EFBFBD>',mterror,[mbok],0);
frm_main.db.RollbackTrans;
end;
modify_all:=false;
end;
end;
}
procedure Tfra_op_state.bsSkinButton7Click(Sender: TObject);
begin
//״̬<D7B4><CCAC><EFBFBD><EFBFBD>
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;
end;
procedure Tfra_op_state.bsSkinButton6Click(Sender: TObject);
begin
if not if_open('409') then
begin
showmessage('<27><>û<EFBFBD><C3BB>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD>ɵ<EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>,<2C><><EFBFBD><EFBFBD>ϵϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>Ա,Ȩ<><C8A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>--->ȡ<><C8A1>״̬');
exit;
end;
//״̬ȡ<CCAC><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
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;
end;
procedure Tfra_op_state.dxDBGrid1Column1CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
//<2F>б<EFBFBD><D0B1><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>ɫ
case strtoint(edit_state.text) of
1:
begin
AColor:=dxgrid_color('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>',ANode.Strings[dxDBGrid1Column1.Index]);
end;
2:
begin
AColor:=dxgrid_color('<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>',ANode.Strings[dxDBGrid1Column1.Index]);
end;
3:
begin
AColor:=dxgrid_color('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>',ANode.Strings[dxDBGrid1Column1.Index]);
end;
4:
begin
AColor:=dxgrid_color('<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>',ANode.Strings[dxDBGrid1Column1.Index]);
end;
5:
begin
AColor:=dxgrid_color('<27><><EFBFBD>ܳ<EFBFBD>',ANode.Strings[dxDBGrid1Column1.Index]);
end;
6:
begin
AColor:=dxgrid_color('<27><>·<EFBFBD><C2B7><EFBFBD><EFBFBD>',ANode.Strings[dxDBGrid1Column1.Index]);
end;
7:
begin
AColor:=dxgrid_color('<27><><EFBFBD>Ϲ<EFBFBD><CFB9><EFBFBD>',ANode.Strings[dxDBGrid1Column1.Index]);
end;
end;
AFont.Color:=clblack;
end;
procedure Tfra_op_state.bsSkinButton5Click(Sender: TObject);
begin
//״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if t_op_state.DataSource.DataSet=nil then
exit;
if t_op_state.DataSource.DataSet.state=dsinsert then
t_op_state.DataSource.DataSet.post;
try
frm_op_state_add:=tfrm_op_state_add.Create (self);
case strtoint(edit_state.text) of
1:
begin
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;
end;
2:
begin
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><CBBD><EFBFBD>'+'''';
frm_data_share.t_code_state_project.Filtered:=true;
end;
3:
begin
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;
end;
4:
begin
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><CBBD><EFBFBD>'+'''';
frm_data_share.t_code_state_project.Filtered:=true;
end;
5:
begin
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>'+'''';
frm_data_share.t_code_state_project.Filtered:=true;
end;
6:
begin
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><C2B7><EFBFBD><EFBFBD>'+'''';
frm_data_share.t_code_state_project.Filtered:=true;
end;
7:
begin
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><CFB9><EFBFBD>'+'''';
frm_data_share.t_code_state_project.Filtered:=true;
end;
end;
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 Tfra_op_state.bsSkinButton4Click(Sender: TObject);
begin
if not if_open('410') then
begin
showmessage('<27><>û<EFBFBD><C3BB>ɾ<EFBFBD><C9BE>״̬<D7B4><CCAC>Ȩ<EFBFBD>ޣ<EFBFBD>,<2C><><EFBFBD><EFBFBD>ϵϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>Ա,Ȩ<><C8A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>--->ɾ<><C9BE>״̬');
exit;
end;
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_state.Delete;
end;
end
else
begin
t_op_state.Delete;
end;
end;
procedure Tfra_op_state.bsSkinButton8Click(Sender: TObject);
begin
//<2F><><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>
if (yctx<>'<27><><EFBFBD><EFBFBD>') then exit;
if (trim(get_parameters_value(134,'<27><>'))='<27><>') then exit;
frm_send_msg:=Tfrm_send_msg.Create(self);
frm_send_msg.transtype:=strtoint(edit_state.text);
case strtoint(edit_state.text) of
1:
begin
frm_send_msg.t_msg_mold.Close;
frm_send_msg.t_msg_mold.sql.text:='select * from t_sys_msgmold where <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>=''<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'' ';
frm_send_msg.t_msg_mold.open;
frm_send_msg.t_msg_mold_new.Close;
frm_send_msg.t_msg_mold_new.sql.text:='select * from t_sys_msgmold where <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>=''<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'' ';
frm_send_msg.t_msg_mold_new.open;
frm_send_msg.ADOQuery1:=TADOQuery(t_op_state.DataSource.DataSet);
end;
2:
begin
frm_send_msg.t_msg_mold.Close;
frm_send_msg.t_msg_mold.sql.text:='select * from t_sys_msgmold where <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>=''<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'' ';
frm_send_msg.t_msg_mold.open;
frm_send_msg.t_msg_mold_new.Close;
frm_send_msg.t_msg_mold_new.sql.text:='select * from t_sys_msgmold where <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>=''<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'' ';
frm_send_msg.t_msg_mold_new.open;
frm_send_msg.ADOQuery1:=TADOQuery(t_op_state.DataSource.DataSet);
end;
3:
begin
frm_send_msg.t_msg_mold.Close;
frm_send_msg.t_msg_mold.sql.text:='select * from t_sys_msgmold where <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>=''<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'' ';
frm_send_msg.t_msg_mold.open;
frm_send_msg.t_msg_mold_new.Close;
frm_send_msg.t_msg_mold_new.sql.text:='select * from t_sys_msgmold where <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>=''<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'' ';
frm_send_msg.t_msg_mold_new.open;
frm_send_msg.ADOQuery1:=TADOQuery(t_op_state.DataSource.DataSet);
end;
4:
begin
frm_send_msg.t_msg_mold.Close;
frm_send_msg.t_msg_mold.sql.text:='select * from t_sys_msgmold where <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>=''<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'' ';
frm_send_msg.t_msg_mold.open;
frm_send_msg.t_msg_mold_new.Close;
frm_send_msg.t_msg_mold_new.sql.text:='select * from t_sys_msgmold where <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>=''<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'' ';
frm_send_msg.t_msg_mold_new.open;
frm_send_msg.ADOQuery1:=TADOQuery(t_op_state.DataSource.DataSet);
end;
end;
try
frm_data_share.t_crm_client_all.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_op_state.DataSource.DataSet['ί<>е<EFBFBD>λ'],[]);
frm_send_msg.t_crm_client_link.Open;
frm_send_msg.memmsg.open;
frm_send_msg.memmsg.insert;
frm_send_msg.memmsg.FieldByName('<27>ռ<EFBFBD><D5BC><EFBFBD>λ').AsString:=t_op_state.DataSource.DataSet['ί<>е<EFBFBD>λ'];
if not frm_send_msg.t_crm_client_link.IsEmpty then begin
frm_send_msg.t_crm_client_link.Locate('Ĭ<><C4AC><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>',true,[]);
frm_send_msg.memmsg.FieldByName('<27>ռ<EFBFBD><D5BC><EFBFBD>').AsString:=frm_send_msg.t_crm_client_link.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
end;
frm_send_msg.memmsg.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=getstrfromdataset(t_op_state.DataSource.DataSet,frm_send_msg.t_msg_mold.fieldbyname('ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
{
frm_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_state.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+','
+'<27><><EFBFBD><EFBFBD><E1B5A5>:'+t_op_state.DataSource.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+t_op_state.DataSource.DataSet.Fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+#10#13+
<><D2B5>״̬Ϊ'+str;
}
if (trim(get_parameters_value(134,'<27><>'))='Ĭ<><C4AC>') and (frm_send_msg.t_crm_client_link.fieldbyname('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD>ѷ<EFBFBD>ʽ').AsString<>'') then begin
if trim(frm_send_msg.t_crm_client_link.fieldbyname('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD>ѷ<EFBFBD>ʽ').AsString)='MSN' then
frm_send_msg.checkboxMSN.Checked:=true;
if trim(frm_send_msg.t_crm_client_link.fieldbyname('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD>ѷ<EFBFBD>ʽ').AsString)='<27>ʼ<EFBFBD>' then
frm_send_msg.checkboxMAIL.Checked:=true;
if trim(frm_send_msg.t_crm_client_link.fieldbyname('Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD>ѷ<EFBFBD>ʽ').AsString)='<27><><EFBFBD><EFBFBD>' then
frm_send_msg.checkboxMSG.Checked:=true;
end else begin
if trim(get_parameters_value(134,'<27><>'))='MSN' then
frm_send_msg.checkboxMSN.Checked:=true;
if trim(get_parameters_value(134,'<27><>'))='<27>ʼ<EFBFBD>' then
frm_send_msg.checkboxMAIL.Checked:=true;
if trim(get_parameters_value(134,'<27><>'))='<27><><EFBFBD><EFBFBD>' then
frm_send_msg.checkboxMSG.Checked:=true;
end;
frm_send_msg.ShowModal;
finally
FreeAndNil(frm_send_msg);
end;
end;
end.