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.

488 lines
16 KiB
Plaintext

unit u_fee_modify;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, BusinessSkinForm, bsSkinCtrls, DB, ADODB, StdCtrls, Mask,
DBCtrls, wwdblook, RxLookup;
type
Tfrm_fee_modify = class(TForm)
bsBusinessSkinForm1: TbsBusinessSkinForm;
bsSkinGroupBox1: TbsSkinGroupBox;
table_old1: TDataSource;
Label1: TLabel;
DBEdit1: TDBEdit;
Label2: TLabel;
DBEdit2: TDBEdit;
Label3: TLabel;
DBEdit3: TDBEdit;
Label4: TLabel;
DBEdit4: TDBEdit;
Label5: TLabel;
DBEdit5: TDBEdit;
Label6: TLabel;
DBEdit6: TDBEdit;
Label7: TLabel;
DBEdit7: TDBEdit;
Label8: TLabel;
DBEdit8: TDBEdit;
Label9: TLabel;
DBEdit9: TDBEdit;
bsSkinGroupBox2: TbsSkinGroupBox;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
Label14: TLabel;
Label15: TLabel;
Label16: TLabel;
Label17: TLabel;
Label18: TLabel;
DBEdit14: TDBEdit;
DBEdit15: TDBEdit;
DBEdit16: TDBEdit;
DBEdit18: TDBEdit;
wwDBLookupCombo5: TwwDBLookupCombo;
wwDBLookupCombo4: TwwDBLookupCombo;
wwDBLookupCombo3: TwwDBLookupCombo;
Label19: TLabel;
DBEdit10: TDBEdit;
table_new1: TDataSource;
table1: TDataSource;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
RxDBLookupCombo1: TRxDBLookupCombo;
RxDBLookupCombo2: TRxDBLookupCombo;
Label20: TLabel;
DBEdit11: TDBEdit;
Label21: TLabel;
DBEdit12: TDBEdit;
Label22: TLabel;
Label23: TLabel;
DBEdit13: TDBEdit;
DBEdit17: TDBEdit;
Label26: TLabel;
Label27: TLabel;
DBEdit21: TDBEdit;
DBEdit22: TDBEdit;
Label24: TLabel;
DBEdit19: TDBEdit;
Label25: TLabel;
DBEdit20: TDBEdit;
Label28: TLabel;
DBEdit23: TDBEdit;
Label29: TLabel;
DBEdit24: TDBEdit;
Label30: TLabel;
DBEdit25: TDBEdit;
Label32: TLabel;
DBEdit27: TDBEdit;
Label31: TLabel;
DBEdit26: TDBEdit;
Label33: TLabel;
DBEdit28: TDBEdit;
DBCheckBox1: TDBCheckBox;
DBCheckBox2: TDBCheckBox;
procedure FormCreate(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure wwDBLookupCombo5Change(Sender: TObject);
procedure wwDBLookupCombo4Change(Sender: TObject);
procedure DBEdit14Change(Sender: TObject);
procedure RxDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
procedure wwDBLookupCombo5KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo2KeyPress(Sender: TObject; var Key: Char);
procedure wwDBLookupCombo4KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit15KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit14KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit16KeyPress(Sender: TObject; var Key: Char);
procedure wwDBLookupCombo3KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit18KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo2Enter(Sender: TObject);
procedure wwDBLookupCombo3Change(Sender: TObject);
procedure DBEdit12KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit20Change(Sender: TObject);
procedure DBEdit24Change(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_fee_modify: Tfrm_fee_modify;
frm_fee_modify_ok:boolean;
implementation
uses u_main, u_data_share, my_sys_function;
{$R *.dfm}
procedure Tfrm_fee_modify.FormCreate(Sender: TObject);
begin
frm_fee_modify_ok:=false;
end;
procedure Tfrm_fee_modify.bsSkinButton1Click(Sender: TObject);
var OldAmt,Amt:double;
begin
if DBEdit10.Text='' then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>ԭ<EFBFBD>򣡣<EFBFBD>');
exit;
end;
if DBEdit24.Text='' then
begin
showmessage('˰<>ʲ<EFBFBD><CAB2><EFBFBD>Ϊ<EFBFBD><CEAA>,<2C><><EFBFBD><EFBFBD>Ϊ0<CEAA><30><EFBFBD><EFBFBD>');
exit;
end;
if DBEdit16.Text='' then
begin
showmessage('˰<>ʲ<EFBFBD><CAB2><EFBFBD>Ϊ<EFBFBD><CEAA>,<2C><><EFBFBD><EFBFBD>Ϊ0<CEAA><30><EFBFBD><EFBFBD>');
exit;
end;
try
shenmodify:=True;
if table_new1.DataSet.State=dsedit then
table_new1.DataSet.post;
if not strtobool(get_parameters_value(227,'false')) then
begin
modify_all:=true;
table1.DataSet.Edit;
table1.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>';
table1.DataSet.post;
end
else
begin
OldAmt:=table_old1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*table_old1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
Amt:=table_new1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat*table_new1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
if table_old1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString='<27><>' then
begin
if Amt>=OldAmt then
begin
modify_all:=true;
table1.DataSet.edit;
table1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=table_new1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
table1.DataSet['<27><><EFBFBD>㵥λ']:=table_new1.DataSet['<27><><EFBFBD>㵥λ'];
table1.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=table_new1.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
table1.DataSet['<27><>׼']:=table_new1.DataSet['<27><>׼'];
table1.DataSet['<27><><EFBFBD><EFBFBD>']:=table_new1.DataSet['<27><><EFBFBD><EFBFBD>'];
table1.DataSet['<27><><EFBFBD><EFBFBD>']:=table_new1.DataSet['<27><><EFBFBD><EFBFBD>'];
table1.DataSet['<27><><EFBFBD><EFBFBD>']:=table_new1.DataSet['<27><><EFBFBD><EFBFBD>'];
table1.DataSet['<27>ұ<EFBFBD>']:=table_new1.DataSet['<27>ұ<EFBFBD>'];
table1.DataSet['<27><><EFBFBD><EFBFBD>']:=table_new1.DataSet['<27><><EFBFBD><EFBFBD>'];
table1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=table_new1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>'];
table1.DataSet['˰<><CBB0>']:=table_new1.DataSet['˰<><CBB0>'];
table1.DataSet['˰<><CBB0>']:=table_new1.DataSet['˰<><CBB0>'];
table1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=table_new1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>'];
table1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=table_new1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>'];
table1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=table_new1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>'];
table1.DataSet['<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>']:=table_new1.DataSet['<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>'];
table1.DataSet['<27>Ƿ<EFBFBD><C7B7>渶']:=table_new1.DataSet['<27>Ƿ<EFBFBD><C7B7>渶'];
table1.DataSet['<27><>ע']:=table_new1.DataSet['<27><>ע'];
table1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=table_new1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
table1.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'; //'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
table1.DataSet['<27><>״̬']:='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>';
table1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
table1.DataSet.Post;
table1.DataSet.Refresh;
table_new1.DataSet.Edit;
table_new1.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='<27><>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>';
table_new1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
table_new1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
table_new1.DataSet.post;
end
else
begin
modify_all:=true;
table1.DataSet.Edit;
table1.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>';
table1.DataSet.post;
end;
end
else
begin
if Amt>=OldAmt then
begin
modify_all:=true;
table1.DataSet.Edit;
table1.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>';
table1.DataSet.post;
end
else
begin
modify_all:=true;
table1.DataSet.edit;
table1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=table_new1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
table1.DataSet['<27><><EFBFBD>㵥λ']:=table_new1.DataSet['<27><><EFBFBD>㵥λ'];
table1.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=table_new1.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
table1.DataSet['<27><>׼']:=table_new1.DataSet['<27><>׼'];
table1.DataSet['<27><><EFBFBD><EFBFBD>']:=table_new1.DataSet['<27><><EFBFBD><EFBFBD>'];
table1.DataSet['<27><><EFBFBD><EFBFBD>']:=table_new1.DataSet['<27><><EFBFBD><EFBFBD>'];
table1.DataSet['<27><><EFBFBD><EFBFBD>']:=table_new1.DataSet['<27><><EFBFBD><EFBFBD>'];
table1.DataSet['<27>ұ<EFBFBD>']:=table_new1.DataSet['<27>ұ<EFBFBD>'];
table1.DataSet['<27><><EFBFBD><EFBFBD>']:=table_new1.DataSet['<27><><EFBFBD><EFBFBD>'];
table1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=table_new1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>'];
table1.DataSet['˰<><CBB0>']:=table_new1.DataSet['˰<><CBB0>'];
table1.DataSet['˰<><CBB0>']:=table_new1.DataSet['˰<><CBB0>'];
table1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=table_new1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>'];
table1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=table_new1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>'];
table1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=table_new1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>'];
table1.DataSet['<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>']:=table_new1.DataSet['<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>'];
table1.DataSet['<27>Ƿ<EFBFBD><C7B7>渶']:=table_new1.DataSet['<27>Ƿ<EFBFBD><C7B7>渶'];
table1.DataSet['<27><>ע']:=table_new1.DataSet['<27><>ע'];
table1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=table_new1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
table1.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'; //'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
table1.DataSet['<27><>״̬']:='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>';
table1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
table1.DataSet.Post;
table1.DataSet.Refresh;
table_new1.DataSet.Edit;
table_new1.DataSet['<27><><EFBFBD><EFBFBD>״̬']:='<27><>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>';
table_new1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=employee;
table_new1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
table_new1.DataSet.post;
end;
end;
end;
finally
if table1.DataSet.State=DsEdit then
table1.DataSet.Cancel;
frm_fee_modify_ok:=true;
close;
shenmodify:=false;
END;
end;
procedure Tfrm_fee_modify.bsSkinButton2Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_fee_modify.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
if not frm_fee_modify_ok then
begin
table_new1.DataSet.delete;
table_old1.DataSet.delete;
end;
end;
procedure Tfrm_fee_modify.wwDBLookupCombo5Change(Sender: TObject);
begin
if (table_new1.DataSet.state=dsinsert)or(table_new1.DataSet.state=dsedit) then
begin
if not wwDBLookupCombo5.LookupTable.IsEmpty then
if wwDBLookupCombo5.LookupTable.Locate('one',wwDBLookupCombo5.text,[])then
begin
table_new1.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=wwDBLookupCombo5.LookupTable.fieldbyname('three').asstring;
end;
end;
end;
procedure Tfrm_fee_modify.wwDBLookupCombo4Change(Sender: TObject);
begin
if (table_new1.DataSet.state=dsinsert)or(table_new1.DataSet.state=dsedit) then
begin
if not wwDBLookupCombo4.LookupTable.IsEmpty then
if wwDBLookupCombo4.LookupTable.Locate('one',wwDBLookupCombo4.text,[])then
begin
table_new1.DataSet['<27><><EFBFBD><EFBFBD>']:=wwDBLookupCombo4.LookupTable.fieldbyname('three').asfloat;
end;
end;
end;
procedure Tfrm_fee_modify.DBEdit14Change(Sender: TObject);
begin
if (table_new1.DataSet.state=dsinsert)or(table_new1.DataSet.state=dsedit) then
begin
try
DBEdit20.OnChange:=nil;
DBEdit24.OnChange:=nil;
table_new1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat:=strtofloat(DBEdit14.text)*strtofloat(DBEdit16.text)/100+strtofloat(DBEdit14.text);
if (strtofloat(DBEdit15.text)>0) and (strtofloat(DBEdit20.text)>0)then
table_new1.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),strtofloat(DBEdit15.text)*strtofloat(DBEdit20.text));
table_new1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),table_new1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+table_new1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*table_new1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
table_new1.DataSet.fieldbyname('<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>').asfloat:=table_new1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-table_new1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat;
table_new1.DataSet['˰<><CBB0>']:=s_w(strtoint(apointnum),strtofloat(DBEdit14.text)*strtofloat(DBEdit16.text)/100*strtofloat(DBEdit15.text));
table_new1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),strtofloat(DBEdit14.text)*strtofloat(DBEdit15.text));
finally
DBEdit20.OnChange:=DBEdit20Change;
DBEdit24.OnChange:=DBEdit24Change;
end;
end;
end;
procedure Tfrm_fee_modify.RxDBLookupCombo1KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBLookupCombo(Key,wwDBLookupCombo5);
end;
procedure Tfrm_fee_modify.wwDBLookupCombo5KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo2);
end;
procedure Tfrm_fee_modify.RxDBLookupCombo2KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBLookupCombo(Key,wwDBLookupCombo4);
end;
procedure Tfrm_fee_modify.wwDBLookupCombo4KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBEdit(Key,DBEdit15);
end;
procedure Tfrm_fee_modify.DBEdit15KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit14);
end;
procedure Tfrm_fee_modify.DBEdit14KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit16);
end;
procedure Tfrm_fee_modify.DBEdit16KeyPress(Sender: TObject; var Key: Char);
begin
key_wwDBLookupCombo(Key,wwDBLookupCombo3);
end;
procedure Tfrm_fee_modify.wwDBLookupCombo3KeyPress(Sender: TObject;
var Key: Char);
begin
if key=#13 then
begin
if (table_new1.DataSet.State=dsedit)or(table_new1.DataSet.State=dsinsert) then
begin
try
if frm_data_share.t_code_currency.locate('<27>ұ<EFBFBD>',wwDBLookupCombo3.Text,[]) then
table_new1.DataSet['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.FieldByName('<27><><EFBFBD><EFBFBD>').asfloat;
except
;
end;
end;
end;
key_DBEdit(Key,DBEdit18);
end;
procedure Tfrm_fee_modify.DBEdit18KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit12);
end;
procedure Tfrm_fee_modify.RxDBLookupCombo2Enter(Sender: TObject);
begin
if table_new1.DataSet.FieldByName('<27><><EFBFBD>㵥λ').asstring<>''then
client_filtered(table_new1.DataSet.FieldByName('<27><><EFBFBD>㵥λ').asstring);
end;
procedure Tfrm_fee_modify.wwDBLookupCombo3Change(Sender: TObject);
begin
if (table_new1.DataSet.State=dsedit)or(table_new1.DataSet.State=dsinsert) then
begin
try
if frm_data_share.t_code_currency.locate('<27>ұ<EFBFBD>',wwDBLookupCombo3.Text,[]) then
table_new1.DataSet['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_currency.FieldByName('<27><><EFBFBD><EFBFBD>').asfloat;
except
;
end;
end;
end;
procedure Tfrm_fee_modify.DBEdit12KeyPress(Sender: TObject; var Key: Char);
begin
key_DBEdit(Key,DBEdit10);
end;
procedure Tfrm_fee_modify.DBEdit20Change(Sender: TObject);
begin
if (table_new1.DataSet.state=dsinsert)or(table_new1.DataSet.state=dsedit) then
begin
try
DBEdit14.OnChange:=nil;
DBEdit15.OnChange:=nil;
DBEdit16.OnChange:=nil;
DBEdit21.OnChange:=nil;
if (strtofloat(DBEdit15.text)>0) and (strtofloat(DBEdit20.text)>0)then
table_new1.DataSet['<27><><EFBFBD><EFBFBD>']:=s_w(strtoint(get_parameters_value(65,'2')),strtofloat(DBEdit15.text)*strtofloat(DBEdit20.text));
table_new1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),table_new1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+table_new1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100)*table_new1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat/100);
table_new1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>']:=s_w(strtoint(apointnum),strtofloat(DBEdit20.text)/(1+table_new1.DataSet.fieldbyname('˰<><CBB0>').asfloat/100));
table_new1.DataSet.fieldbyname('<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>').asfloat:=table_new1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-table_new1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat;
table_new1.DataSet['˰<><CBB0>']:=s_w(strtoint(apointnum),strtofloat(DBEdit14.text)*strtofloat(DBEdit16.text)/100*strtofloat(DBEdit15.text));
table_new1.DataSet['<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>']:=s_w(strtoint(apointnum),strtofloat(DBEdit14.text)*strtofloat(DBEdit15.text));
finally
DBEdit14.OnChange:=DBEdit14Change;
DBEdit15.OnChange:=DBEdit14Change;
DBEdit16.OnChange:=DBEdit14Change;
DBEdit21.OnChange:=DBEdit14Change;
end;
end;
end;
procedure Tfrm_fee_modify.DBEdit24Change(Sender: TObject);
begin
if (table_new1.DataSet.state=dsinsert)or(table_new1.DataSet.state=dsedit) then
begin
try
DBEdit14.OnChange:=nil;
DBEdit15.OnChange:=nil;
DBEdit16.OnChange:=nil;
DBEdit20.OnChange:=nil;
DBEdit21.OnChange:=nil;
table_new1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),table_new1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat/(1+strtofloat(DBEdit24.text)/100)*strtofloat(DBEdit24.text)/100);
table_new1.DataSet.fieldbyname('<27><><EFBFBD>񲻺<EFBFBD>˰<EFBFBD><CBB0>').asfloat:=s_w(strtoint(apointnum),table_new1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat-table_new1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0>').asfloat)
finally
DBEdit14.OnChange:=DBEdit14Change;
DBEdit15.OnChange:=DBEdit14Change;
DBEdit16.OnChange:=DBEdit14Change;
DBEdit20.OnChange:=DBEdit20Change;
DBEdit21.OnChange:=DBEdit14Change;
end;
end;
end;
end.