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.

145 lines
3.9 KiB
Plaintext

11 months ago
unit u_fee_list;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, RxMemDS, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid,
BusinessSkinForm, bsSkinCtrls, Grids, DBGridEh;
type
Tfrm_fee_list = class(TForm)
t_fee_list: TRxMemoryData;
t_fee_list1: TDataSource;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid1Column5: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridMaskColumn;
dxDBGrid1Column7: TdxDBGridMaskColumn;
bsBusinessSkinForm1: TbsBusinessSkinForm;
DataSource1: TDataSource;
bsSkinPanel1: TbsSkinPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
dxDBGrid1Column8: TdxDBGridColumn;
DBGridEh1: TDBGridEh;
procedure bsSkinButton2Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure DBGridEh1TitleBtnClick(Sender: TObject; ACol: Integer;
Column: TColumnEh);
procedure t_fee_listAfterPost(DataSet: TDataSet);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_fee_list: Tfrm_fee_list;
implementation
uses u_main;
{$R *.dfm}
procedure Tfrm_fee_list.bsSkinButton2Click(Sender: TObject);
begin
CLOSE;
end;
procedure Tfrm_fee_list.FormShow(Sender: TObject);
var
book1:Tbookmark;
begin
t_fee_list.Open;
book1:=DataSource1.DataSet.GetBookmark;
try
modify_all:=true;
DataSource1.DataSet.DisableControls;
DataSource1.DataSet.First;
while not DataSource1.DataSet.Eof do
begin
t_fee_list.Append;
t_fee_list['CH_ID']:=DataSource1.DataSet['CH_ID'];
t_fee_list['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=DataSource1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_fee_list['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>']:=DataSource1.DataSet['<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'];
t_fee_list['<27><><EFBFBD><EFBFBD>']:=DataSource1.DataSet['<27><><EFBFBD><EFBFBD>'];
t_fee_list['<27>ұ<EFBFBD>']:=DataSource1.DataSet['<27>ұ<EFBFBD>'];
t_fee_list['<27><><EFBFBD><EFBFBD>']:=DataSource1.DataSet['<27><><EFBFBD><EFBFBD>'];
t_fee_list['˳<><CBB3>']:=DataSource1.DataSet['˳<><CBB3>'];
t_fee_list['<27>Ƿ<EFBFBD><C7B7>渶']:=DataSource1.DataSet['<27>Ƿ<EFBFBD><C7B7>渶'];
t_fee_list['˰<><CBB0>']:=DataSource1.DataSet['˰<><CBB0>'];
t_fee_list.post;
DataSource1.DataSet.next;
end;
finally
modify_all:=false;
DataSource1.DataSet.GotoBookmark(book1);
DataSource1.DataSet.EnableControls;
end;
end;
procedure Tfrm_fee_list.bsSkinButton1Click(Sender: TObject);
var
book1:Tbookmark;
i:integer;
begin
if t_fee_list.State=dsedit then
t_fee_list.post;
t_fee_list.first;
i:=1;
try
modify_all:=true;
book1:=DataSource1.DataSet.GetBookmark;
DataSource1.DataSet.DisableControls;
while not t_fee_list.eof do
begin
if DataSource1.DataSet.Locate('CH_ID',t_fee_list['CH_ID'],[])then
begin
DataSource1.DataSet.edit;
DataSource1.DataSet['˳<><CBB3>']:=i;
DataSource1.DataSet.post;
end;
t_fee_list.next;
i:=i+1;
end;
finally
modify_all:=false;
DataSource1.DataSet.GotoBookmark(book1);
DataSource1.DataSet.EnableControls;
end;
close;
end;
procedure Tfrm_fee_list.DBGridEh1TitleBtnClick(Sender: TObject;
ACol: Integer; Column: TColumnEh);
begin
case column.Title.SortMarker of
smNoneEh : begin
column.Title.SortMarker:=smDownEh;
t_fee_list.SortOnFields(column.FieldName,true,true);
end;
smDownEh : begin
column.Title.SortMarker:=smUpEh;
t_fee_list.SortOnFields(column.FieldName,true,false);
end;
smUpEh : begin
column.Title.SortMarker:=smDownEh;
t_fee_list.SortOnFields(column.FieldName,true,true);
end;
end;
end;
procedure Tfrm_fee_list.t_fee_listAfterPost(DataSet: TDataSet);
begin
if not modify_all then
t_fee_list.SortOnFields('˳<><CBB3>',true,false);
end;
end.