unit u_fee_list; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DB, RxMemDS, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid, BusinessSkinForm, bsSkinCtrls; 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; procedure bsSkinButton2Click(Sender: TObject); procedure FormShow(Sender: TObject); procedure bsSkinButton1Click(Sender: TObject); 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 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['费用名称']:=DataSource1.DataSet['费用名称']; t_fee_list['客户名称']:=DataSource1.DataSet['客户名称']; t_fee_list['金额']:=DataSource1.DataSet['金额']; t_fee_list['币别']:=DataSource1.DataSet['币别']; t_fee_list['汇率']:=DataSource1.DataSet['汇率']; t_fee_list['顺序']:=DataSource1.DataSet['顺序']; t_fee_list.post; DataSource1.DataSet.next; end; finally DataSource1.DataSet.GotoBookmark(book1); DataSource1.DataSet.EnableControls; end; end; procedure Tfrm_fee_list.bsSkinButton1Click(Sender: TObject); var book1:Tbookmark; begin if t_fee_list.State=dsedit then t_fee_list.post; t_fee_list.first; 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['顺序']:=t_fee_list['顺序']; DataSource1.DataSet.post; end; t_fee_list.next; end; finally modify_all:=false; DataSource1.DataSet.GotoBookmark(book1); DataSource1.DataSet.EnableControls; end; close; end; end.