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.

1799 lines
68 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_ch_add_do;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ComCtrls, bsSkinTabs, bsSkinCtrls, wwdbdatetimepicker, StdCtrls, RxLookup,
dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid, ExtCtrls, DB, ADODB,
dxDBTLCl, dxGrClms, Menus, RxMemDS, Grids, DBGrids, XPMenu;
type
Tfra_ch_add_do = class(TFrame)
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinTabSheet2: TbsSkinTabSheet;
bsSkinTabSheet3: TbsSkinTabSheet;
bsSkinTabSheet4: TbsSkinTabSheet;
bsSkinPanel1: TbsSkinPanel;
bsSkinPanel2: TbsSkinPanel;
Edit4: TEdit;
Label1: TLabel;
Edit2: TEdit;
Edit3: TEdit;
Label2: TLabel;
Label3: TLabel;
Label8: TLabel;
Label10: TLabel;
wwDBDateTimePicker1: TwwDBDateTimePicker;
wwDBDateTimePicker3: TwwDBDateTimePicker;
Label5: TLabel;
Label11: TLabel;
wwDBDateTimePicker2: TwwDBDateTimePicker;
wwDBDateTimePicker4: TwwDBDateTimePicker;
Label9: TLabel;
RxDBLookupCombo2: TRxDBLookupCombo;
bsSkinButton10: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
dxDBGrid2: TdxDBGrid;
Panel1: TPanel;
dxDBGrid1: TdxDBGrid;
dxDBGrid3: TdxDBGrid;
t_op_seae: TADOQuery;
t_op_seae1: TDataSource;
dxDBGrid2Column1: TdxDBGridMaskColumn;
dxDBGrid2Column2: TdxDBGridMaskColumn;
dxDBGrid2Column3: TdxDBGridMaskColumn;
dxDBGrid2Column4: TdxDBGridMaskColumn;
dxDBGrid2Column5: TdxDBGridMaskColumn;
dxDBGrid2Column6: TdxDBGridDateColumn;
dxDBGrid2Column7: TdxDBGridMaskColumn;
dxDBGrid2Column8: TdxDBGridMaskColumn;
dxDBGrid2Column9: TdxDBGridDateColumn;
dxDBGrid2Column10: TdxDBGridMaskColumn;
dxDBGrid2Column11: TdxDBGridMaskColumn;
dxDBGrid2Column14: TdxDBGridMaskColumn;
dxDBGrid2Column15: TdxDBGridMaskColumn;
dxDBGrid2Column16: TdxDBGridMaskColumn;
dxDBGrid2Column17: TdxDBGridMaskColumn;
dxDBGrid2Column18: TdxDBGridColumn;
dxDBGrid2Column13: TdxDBGridColumn;
dxDBGrid2Column12: TdxDBGridColumn;
t_ch_fee1: TDataSource;
t_ch_fee: TADOQuery;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridColumn;
dxDBGrid1Column3: TdxDBGridColumn;
t_ch_fee_sum: TADOQuery;
t_ch_fee_sum1: TDataSource;
dxDBGrid3Column1: TdxDBGridMaskColumn;
dxDBGrid3Column2: TdxDBGridColumn;
dxDBGrid3Column3: TdxDBGridColumn;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
PopupMenu2: TPopupMenu;
MenuItem1: TMenuItem;
bs_text: TEdit;
dxDBGrid1Column5: TdxDBGridColumn;
do_ban1: TDataSource;
t_ch_fee_do: TADOQuery;
t_rate: TRxMemoryData;
XPMenu1: TXPMenu;
bsSkinPanel3: TbsSkinPanel;
Label4: TLabel;
Label6: TLabel;
Label7: TLabel;
Label12: TLabel;
Label13: TLabel;
Label14: TLabel;
Label15: TLabel;
Label16: TLabel;
Edit1: TEdit;
Edit5: TEdit;
Edit6: TEdit;
wwDBDateTimePicker5: TwwDBDateTimePicker;
wwDBDateTimePicker6: TwwDBDateTimePicker;
wwDBDateTimePicker7: TwwDBDateTimePicker;
wwDBDateTimePicker8: TwwDBDateTimePicker;
RxDBLookupCombo1: TRxDBLookupCombo;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinPanel4: TbsSkinPanel;
dxDBGrid4: TdxDBGrid;
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
dxDBGridMaskColumn2: TdxDBGridMaskColumn;
dxDBGridMaskColumn3: TdxDBGridMaskColumn;
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
dxDBGridMaskColumn5: TdxDBGridMaskColumn;
dxDBGridDateColumn1: TdxDBGridDateColumn;
dxDBGridDateColumn2: TdxDBGridDateColumn;
dxDBGridMaskColumn6: TdxDBGridMaskColumn;
dxDBGridColumn1: TdxDBGridColumn;
dxDBGridMaskColumn7: TdxDBGridMaskColumn;
dxDBGridMaskColumn8: TdxDBGridMaskColumn;
dxDBGridMaskColumn9: TdxDBGridMaskColumn;
dxDBGridMaskColumn10: TdxDBGridMaskColumn;
dxDBGridColumn2: TdxDBGridColumn;
dxDBGridColumn3: TdxDBGridColumn;
dxDBGridMaskColumn11: TdxDBGridMaskColumn;
dxDBGridMaskColumn12: TdxDBGridMaskColumn;
dxDBGridMaskColumn13: TdxDBGridMaskColumn;
Panel2: TPanel;
dxDBGrid5: TdxDBGrid;
dxDBGridMaskColumn14: TdxDBGridMaskColumn;
dxDBGridMaskColumn15: TdxDBGridMaskColumn;
dxDBGridColumn4: TdxDBGridColumn;
dxDBGridColumn5: TdxDBGridColumn;
dxDBGridColumn6: TdxDBGridColumn;
dxDBGrid6: TdxDBGrid;
dxDBGridMaskColumn16: TdxDBGridMaskColumn;
dxDBGridColumn7: TdxDBGridColumn;
dxDBGridColumn8: TdxDBGridColumn;
t_op_seai: TADOQuery;
t_op_seai1: TDataSource;
t_op_aire: TADOQuery;
t_op_aire1: TDataSource;
bsSkinPanel5: TbsSkinPanel;
Label17: TLabel;
Label18: TLabel;
Label19: TLabel;
Label20: TLabel;
Label21: TLabel;
Label22: TLabel;
Label23: TLabel;
Label24: TLabel;
Edit8: TEdit;
Edit9: TEdit;
Edit10: TEdit;
wwDBDateTimePicker9: TwwDBDateTimePicker;
wwDBDateTimePicker10: TwwDBDateTimePicker;
wwDBDateTimePicker11: TwwDBDateTimePicker;
wwDBDateTimePicker12: TwwDBDateTimePicker;
RxDBLookupCombo3: TRxDBLookupCombo;
bsSkinButton4: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinPanel6: TbsSkinPanel;
dxDBGrid7: TdxDBGrid;
dxDBGridMaskColumn17: TdxDBGridMaskColumn;
dxDBGridMaskColumn18: TdxDBGridMaskColumn;
dxDBGridMaskColumn19: TdxDBGridMaskColumn;
dxDBGridMaskColumn20: TdxDBGridMaskColumn;
dxDBGridMaskColumn21: TdxDBGridMaskColumn;
dxDBGridDateColumn3: TdxDBGridDateColumn;
dxDBGridDateColumn4: TdxDBGridDateColumn;
dxDBGridColumn9: TdxDBGridColumn;
dxDBGridMaskColumn24: TdxDBGridMaskColumn;
dxDBGridMaskColumn26: TdxDBGridMaskColumn;
dxDBGridColumn10: TdxDBGridColumn;
dxDBGridColumn11: TdxDBGridColumn;
dxDBGridMaskColumn27: TdxDBGridMaskColumn;
dxDBGridMaskColumn28: TdxDBGridMaskColumn;
dxDBGridMaskColumn29: TdxDBGridMaskColumn;
Panel3: TPanel;
dxDBGrid8: TdxDBGrid;
dxDBGridMaskColumn30: TdxDBGridMaskColumn;
dxDBGridMaskColumn31: TdxDBGridMaskColumn;
dxDBGridColumn12: TdxDBGridColumn;
dxDBGridColumn13: TdxDBGridColumn;
dxDBGridColumn14: TdxDBGridColumn;
dxDBGrid9: TdxDBGrid;
dxDBGridMaskColumn32: TdxDBGridMaskColumn;
dxDBGridColumn15: TdxDBGridColumn;
dxDBGridColumn16: TdxDBGridColumn;
edit_open: TEdit;
bsSkinPanel7: TbsSkinPanel;
Label25: TLabel;
Label26: TLabel;
Label27: TLabel;
Label28: TLabel;
Label29: TLabel;
Label30: TLabel;
Label31: TLabel;
Label32: TLabel;
Edit7: TEdit;
Edit11: TEdit;
Edit12: TEdit;
wwDBDateTimePicker13: TwwDBDateTimePicker;
wwDBDateTimePicker14: TwwDBDateTimePicker;
wwDBDateTimePicker15: TwwDBDateTimePicker;
wwDBDateTimePicker16: TwwDBDateTimePicker;
RxDBLookupCombo4: TRxDBLookupCombo;
bsSkinButton6: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
bsSkinPanel8: TbsSkinPanel;
dxDBGrid10: TdxDBGrid;
dxDBGridMaskColumn22: TdxDBGridMaskColumn;
dxDBGridMaskColumn23: TdxDBGridMaskColumn;
dxDBGridMaskColumn25: TdxDBGridMaskColumn;
dxDBGridMaskColumn33: TdxDBGridMaskColumn;
dxDBGridMaskColumn34: TdxDBGridMaskColumn;
dxDBGridDateColumn5: TdxDBGridDateColumn;
dxDBGridDateColumn6: TdxDBGridDateColumn;
dxDBGridColumn17: TdxDBGridColumn;
dxDBGridMaskColumn35: TdxDBGridMaskColumn;
dxDBGridMaskColumn36: TdxDBGridMaskColumn;
dxDBGridColumn18: TdxDBGridColumn;
dxDBGridColumn19: TdxDBGridColumn;
dxDBGridMaskColumn37: TdxDBGridMaskColumn;
dxDBGridMaskColumn38: TdxDBGridMaskColumn;
dxDBGridMaskColumn39: TdxDBGridMaskColumn;
Panel4: TPanel;
dxDBGrid11: TdxDBGrid;
dxDBGridMaskColumn40: TdxDBGridMaskColumn;
dxDBGridMaskColumn41: TdxDBGridMaskColumn;
dxDBGridColumn20: TdxDBGridColumn;
dxDBGridColumn21: TdxDBGridColumn;
dxDBGridColumn22: TdxDBGridColumn;
dxDBGrid12: TdxDBGrid;
dxDBGridMaskColumn42: TdxDBGridMaskColumn;
dxDBGridColumn23: TdxDBGridColumn;
dxDBGridColumn24: TdxDBGridColumn;
t_op_airi: TADOQuery;
t_op_airi1: TDataSource;
bsSkinPanel9: TbsSkinPanel;
bsSkinCheckRadioBox1: TbsSkinCheckRadioBox;
bsSkinCheckRadioBox2: TbsSkinCheckRadioBox;
bsSkinCheckRadioBox3: TbsSkinCheckRadioBox;
dxDBGrid4Column19: TdxDBGridColumn;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
N6: TMenuItem;
N7: TMenuItem;
N8: TMenuItem;
N9: TMenuItem;
dxDBGrid1Column6: TdxDBGridColumn;
dxDBGrid3Column4: TdxDBGridColumn;
dxDBGrid5Column6: TdxDBGridColumn;
dxDBGrid6Column4: TdxDBGridColumn;
dxDBGrid8Column6: TdxDBGridColumn;
dxDBGrid9Column4: TdxDBGridColumn;
dxDBGrid11Column6: TdxDBGridColumn;
dxDBGrid12Column4: TdxDBGridColumn;
N10: TMenuItem;
N11: TMenuItem;
dxDBGrid2Column19: TdxDBGridColumn;
dxDBGrid2Column20: TdxDBGridColumn;
dxDBGrid4Column20: TdxDBGridColumn;
dxDBGrid4Column21: TdxDBGridColumn;
dxDBGrid1Column7: TdxDBGridColumn;
dxDBGrid5Column7: TdxDBGridColumn;
dxDBGrid8Column7: TdxDBGridColumn;
dxDBGrid11Column7: TdxDBGridColumn;
dxDBGrid1Column8: TdxDBGridColumn;
bsSkinCheckRadioBox4: TbsSkinCheckRadioBox;
Label33: TLabel;
Edit13: TEdit;
Label34: TLabel;
Edit14: TEdit;
procedure bsSkinButton3Click(Sender: TObject);
procedure bs_textChange(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure MenuItem1Click(Sender: TObject);
procedure Edit4KeyPress(Sender: TObject; var Key: Char);
procedure FrameEnter(Sender: TObject);
procedure bsSkinPageControl1Change(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure N5Click(Sender: TObject);
procedure N7Click(Sender: TObject);
procedure N9Click(Sender: TObject);
procedure RxDBLookupCombo2KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo3KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo4KeyPress(Sender: TObject; var Key: Char);
procedure dxDBGrid2DblClick(Sender: TObject);
procedure dxDBGrid4DblClick(Sender: TObject);
procedure dxDBGrid7DblClick(Sender: TObject);
procedure dxDBGrid10DblClick(Sender: TObject);
procedure N11Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
implementation
uses u_main, my_sys_function, u_data_share;
{$R *.dfm}
procedure Tfra_ch_add_do.bsSkinButton3Click(Sender: TObject);
begin
RxDBLookupCombo2.ClearValue;
Edit4.text:='';
Edit3.Text:='';
Edit2.text:='';
wwDBDateTimePicker1.Clear;
wwDBDateTimePicker2.clear;
wwDBDateTimePicker3.clear;
wwDBDateTimePicker4.clear;
end;
procedure Tfra_ch_add_do.bs_textChange(Sender: TObject);
begin
if bs_text.text='' then
exit;
case strtoint(bs_text.text) of
1:
begin
dxDBGrid1Column3.Caption:='Ӧ<>ս<EFBFBD><D5BD><EFBFBD>';
dxDBGrid1Column4.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGrid1Column4.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGrid3Column2.Caption:='Ӧ<>ս<EFBFBD><D5BD><EFBFBD>';
dxDBGrid3Column3.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGrid3Column3.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn5.Caption:='Ӧ<>ս<EFBFBD><D5BD><EFBFBD>';
dxDBGridColumn6.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn6.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn7.Caption:='Ӧ<>ս<EFBFBD><D5BD><EFBFBD>';
dxDBGridColumn8.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn8.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn13.Caption:='Ӧ<>ս<EFBFBD><D5BD><EFBFBD>';
dxDBGridColumn14.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn14.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn15.Caption:='Ӧ<>ս<EFBFBD><D5BD><EFBFBD>';
dxDBGridColumn16.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn16.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn21.Caption:='Ӧ<>ս<EFBFBD><D5BD><EFBFBD>';
dxDBGridColumn22.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn22.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn23.Caption:='Ӧ<>ս<EFBFBD><D5BD><EFBFBD>';
dxDBGridColumn24.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn24.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGrid1Column6.Visible:=false;
dxDBGrid3Column4.Visible:=false;
dxDBGrid5Column6.Visible:=false;
dxDBGrid6Column4.Visible:=false;
dxDBGrid8Column6.Visible:=false;
dxDBGrid9Column4.Visible:=false;
dxDBGrid11Column6.Visible:=false;
dxDBGrid12Column4.Visible:=false;
end;
2:
begin
dxDBGrid1Column3.Caption:='Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGrid1Column4.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGrid1Column4.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGrid3Column2.Caption:='Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGrid3Column3.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGrid3Column3.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn5.Caption:='Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn6.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn6.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn7.Caption:='Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn8.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn8.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn13.Caption:='Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn14.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn14.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn15.Caption:='Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn16.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn16.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn21.Caption:='Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn22.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn22.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn23.Caption:='Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn24.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn24.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGrid1Column6.Visible:=true;
dxDBGrid3Column4.Visible:=true;
dxDBGrid5Column6.Visible:=true;
dxDBGrid6Column4.Visible:=true;
dxDBGrid8Column6.Visible:=true;
dxDBGrid9Column4.Visible:=true;
dxDBGrid11Column6.Visible:=true;
dxDBGrid12Column4.Visible:=true;
end;
3:
begin
dxDBGrid1Column3.Caption:='<27><><EFBFBD><EFBFBD>';
dxDBGrid1Column4.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGrid1Column4.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGrid3Column2.Caption:='<27><><EFBFBD><EFBFBD>';
dxDBGrid3Column3.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGrid3Column3.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn5.Caption:='<27><><EFBFBD><EFBFBD>';
dxDBGridColumn6.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn6.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn7.Caption:='<27><><EFBFBD><EFBFBD>';
dxDBGridColumn8.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn8.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn13.Caption:='<27><><EFBFBD><EFBFBD>';
dxDBGridColumn14.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn14.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn15.Caption:='<27><><EFBFBD><EFBFBD>';
dxDBGridColumn16.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn16.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn21.Caption:='<27><><EFBFBD><EFBFBD>';
dxDBGridColumn22.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn22.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn23.Caption:='<27><><EFBFBD><EFBFBD>';
dxDBGridColumn24.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn24.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGrid1Column6.Visible:=true;
dxDBGrid3Column4.Visible:=true;
dxDBGrid5Column6.Visible:=true;
dxDBGrid6Column4.Visible:=true;
dxDBGrid8Column6.Visible:=true;
dxDBGrid9Column4.Visible:=true;
dxDBGrid11Column6.Visible:=true;
dxDBGrid12Column4.Visible:=true;
end;
4:
begin
dxDBGrid1Column3.Caption:='<27><><EFBFBD><EFBFBD>';
dxDBGrid1Column4.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGrid1Column4.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGrid3Column2.Caption:='<27><><EFBFBD><EFBFBD>';
dxDBGrid3Column3.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGrid3Column3.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn5.Caption:='<27><><EFBFBD><EFBFBD>';
dxDBGridColumn6.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn6.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn7.Caption:='<27><><EFBFBD><EFBFBD>';
dxDBGridColumn8.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn8.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn13.Caption:='<27><><EFBFBD><EFBFBD>';
dxDBGridColumn14.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn14.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn15.Caption:='<27><><EFBFBD><EFBFBD>';
dxDBGridColumn16.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn16.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn21.Caption:='<27><><EFBFBD><EFBFBD>';
dxDBGridColumn22.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn22.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn23.Caption:='<27><><EFBFBD><EFBFBD>';
dxDBGridColumn24.Caption:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGridColumn24.FieldName:='δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
dxDBGrid1Column6.Visible:=true;
dxDBGrid3Column4.Visible:=true;
dxDBGrid5Column6.Visible:=true;
dxDBGrid6Column4.Visible:=true;
dxDBGrid8Column6.Visible:=true;
dxDBGrid9Column4.Visible:=true;
dxDBGrid11Column6.Visible:=true;
dxDBGrid12Column4.Visible:=true;
end;
end;
end;
procedure Tfra_ch_add_do.bsSkinButton10Click(Sender: TObject);
var
str_fee,str_op:widestring;
op_str,fee_str,sum_str:widestring;
begin
t_ch_fee.close;
t_ch_fee_sum.close;
t_op_seae.Close;
t_ch_fee.DataSource:=t_op_seae1;
t_ch_fee_sum.DataSource:=t_op_seae1;
case strtoint(bs_text.text) of
1:
begin
str_fee:='where <20><><EFBFBD><EFBFBD><><3E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' and <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''+','+''''+'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>'+''''
+','+''''+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+''''+','+''''+'<27><>ֹɾ<D6B9><C9BE>'+''''
+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''+')';
if not bsSkinCheckRadioBox4.Checked then
str_fee:=str_fee+' and <20>Ƿ<EFBFBD><C7B7>渶<>1 ';
end;
2:
begin
str_fee:='where '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end)<>0 '
+' and <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''+','+''''+'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>'+''''+','+''''+'<27><>ֹɾ<D6B9><C9BE>'+''''
+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''+')';
if not strtobool(get_parameters_value(46,'true')) then
str_fee:=str_fee+' and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+'''';
if not bsSkinCheckRadioBox4.Checked then
str_fee:=str_fee+' and <20>Ƿ<EFBFBD><C7B7>渶<>1 ';
end;
3:
begin
str_fee:='where '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end)<>0 '
+' and <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''+','+''''+'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>'+''''+','+''''+'<27><>ֹɾ<D6B9><C9BE>'+''''
+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''+')';
if not strtobool(get_parameters_value(46,'true')) then
str_fee:=str_fee+' and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+'''';
if not bsSkinCheckRadioBox4.Checked then
str_fee:=str_fee+' and <20>Ƿ<EFBFBD><C7B7>渶<>1 ';
end;
4:
begin
str_fee:='where '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end)<>0 '
+' and <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''+','+''''+'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>'+''''+','+''''+'<27><>ֹɾ<D6B9><C9BE>'+''''
+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''+')';
if not strtobool(get_parameters_value(46,'true')) then
str_fee:=str_fee+' and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+'''';
if not bsSkinCheckRadioBox4.Checked then
str_fee:=str_fee+' and <20>Ƿ<EFBFBD><C7B7>渶<>1 ';
end;
end;
if RxDBLookupCombo2.DisplayValues[1]<>''then
str_fee:=str_fee+' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
str_op:='';
if Edit4.text<>''then
str_op:=str_op+' and ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit4.text+'%'+'''';
if Edit2.text<>''then
str_op:=str_op+' and <20><><EFBFBD><EFBFBD><E1B5A5> like '+''''+'%'+Edit2.text+'%'+'''';
if Edit13.text<>''then
str_op:=str_op+' and <20><><EFBFBD><EFBFBD><ECB5A5> like '+''''+'%'+Edit13.text+'%'+'''';
if Edit3.text<>''then
str_op:=str_op+' and '+Label2.Caption+' like '+''''+'%'+Edit3.text+'%'+'''';
if wwDBDateTimePicker1.text<>''then
str_op:=str_op+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+'''';
if wwDBDateTimePicker2.text<>''then
str_op:=str_op+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.text+'''';
if wwDBDateTimePicker3.text<>''then
str_op:=str_op+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>>='+''''+wwDBDateTimePicker3.text+'''';
if wwDBDateTimePicker4.text<>''then
str_op:=str_op+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><='+''''+wwDBDateTimePicker4.text+'''';
str_op:='where <20><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from v_ch_fee '+str_fee+')'+str_op;
case strtoint(bs_text.text) of
1:
begin
str_op:=str_op+' and '+open_data('1002','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
2:
begin
str_op:=str_op+' and '+open_data('1004','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
end;
op_str:='select * from t_op_seae '+str_op
+default_sort(53,'t_op_seae','','desc');
case strtoint(bs_text.text) of
1:
begin
fee_str:='select CH_ID,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> order by CH_ID';
sum_str:='select <20>ұ<EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> group by <20>ұ<EFBFBD> order by <20>ұ<EFBFBD>';
end;
2:
begin
fee_str:='select <20><><EFBFBD><EFBFBD>,CH_ID,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>, δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>= '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> order by CH_ID';
sum_str:='select <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>';
end;
3:
begin
fee_str:='select <20><><EFBFBD><EFBFBD>,CH_ID,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>, δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>= '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> order by CH_ID';
sum_str:='select <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>';
end;
4:
begin
fee_str:='select <20><><EFBFBD><EFBFBD>,CH_ID,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>, δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>= '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> order by CH_ID';
sum_str:='select <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>';
end;
end;
t_ch_fee.Close;
t_ch_fee_sum.close;
t_op_seae.close;
t_op_seae.sql.clear;
t_op_seae.sql.add(op_str);
t_op_seae.open;
t_ch_fee.sql.clear;
t_ch_fee.sql.add(fee_str);
t_ch_fee.open;
t_ch_fee_sum.sql.clear;
t_ch_fee_sum.sql.add(sum_str);
t_ch_fee_sum.open;
end;
procedure Tfra_ch_add_do.N1Click(Sender: TObject);
var
i,j:integer;
begin
if bsSkinPanel9.Visible then
begin
if bsSkinCheckRadioBox1.Checked then
i:=2
else
i:=1;
if bsSkinCheckRadioBox3.Checked then
j:=1
else
j:=0;
end
else
begin
i:=0;
j:=0;
end;
t_rate.open;
if bsSkinTabSheet1.Showing then
begin
delete_do_type_num:=1;
shen_yewwu(t_op_seae,bs_text.Text,t_ch_fee,t_ch_fee_do,t_rate,do_ban1,dxDBGrid2,i,j);
end;
if bsSkinTabSheet2.Showing then
begin
delete_do_type_num:=2;
shen_yewwu(t_op_seai,bs_text.Text,t_ch_fee,t_ch_fee_do,t_rate,do_ban1,dxDBGrid4,i,j);
end;
if bsSkinTabSheet3.Showing then
begin
delete_do_type_num:=3;
shen_yewwu(t_op_aire,bs_text.Text,t_ch_fee,t_ch_fee_do,t_rate,do_ban1,dxDBGrid7,i,j);
end;
if bsSkinTabSheet4.Showing then
begin
delete_do_type_num:=4;
shen_yewwu(t_op_airi,bs_text.Text,t_ch_fee,t_ch_fee_do,t_rate,do_ban1,dxDBGrid10,i,j);
end;
t_rate.close;
t_ch_fee.Requery();
t_ch_fee_sum.Requery();
end;
procedure Tfra_ch_add_do.MenuItem1Click(Sender: TObject);
var
i,j:integer;
begin
if bsSkinPanel9.Visible then
begin
if bsSkinCheckRadioBox1.Checked then
i:=2
else
i:=1;
if bsSkinCheckRadioBox3.Checked then
j:=1
else
j:=0;
end
else
begin
i:=0;
j:=0;
end;
t_rate.open;
if bsSkinTabSheet1.Showing then
begin
delete_do_type_num:=1;
shen_fee_select(bs_text.text,t_op_seae,t_ch_fee,t_ch_fee_sum,t_ch_fee_do,t_rate,do_ban1,dxDBGrid1,i,j);
end;
if bsSkinTabSheet2.Showing then
begin
delete_do_type_num:=2;
shen_fee_select(bs_text.text,t_op_seai,t_ch_fee,t_ch_fee_sum,t_ch_fee_do,t_rate,do_ban1,dxDBGrid5,i,j);
end;
if bsSkinTabSheet3.Showing then
begin
delete_do_type_num:=3;
shen_fee_select(bs_text.text,t_op_aire,t_ch_fee,t_ch_fee_sum,t_ch_fee_do,t_rate,do_ban1,dxDBGrid8,i,j);
end;
if bsSkinTabSheet4.Showing then
begin
delete_do_type_num:=4;
shen_fee_select(bs_text.text,t_op_airi,t_ch_fee,t_ch_fee_sum,t_ch_fee_do,t_rate,do_ban1,dxDBGrid11,i,j);
end;
t_rate.close;
t_ch_fee.Requery();
t_ch_fee_sum.Requery();
end;
procedure Tfra_ch_add_do.Edit4KeyPress(Sender: TObject; var Key: Char);
begin
if key=#13 then
begin
key:=#0;
bsSkinButton10Click(Sender);
end;
end;
procedure Tfra_ch_add_do.FrameEnter(Sender: TObject);
begin
edit_open.Text:='12341234';
if strtobool(get_parameters_value(66,'false'))then
begin
Label2.Caption:='<27><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>';
Label6.Caption:='<27><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>';
end;
end;
procedure Tfra_ch_add_do.bsSkinPageControl1Change(Sender: TObject);
begin
if edit_open.Text='' then
exit;
t_ch_fee.close;
t_ch_fee_sum.close;
t_ch_fee.DataSource.DataSet.close;
end;
procedure Tfra_ch_add_do.bsSkinButton1Click(Sender: TObject);
var
str_fee,str_op:widestring;
op_str,fee_str,sum_str:widestring;
begin
t_ch_fee.close;
t_ch_fee_sum.close;
t_op_seai.Close;
t_ch_fee.DataSource:=t_op_seai1;
t_ch_fee_sum.DataSource:=t_op_seai1;
case strtoint(bs_text.text) of
1:
begin
str_fee:='where <20><><EFBFBD><EFBFBD><><3E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' and <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''+','+''''+'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>'+''''
+','+''''+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+''''+','+''''+'<27><>ֹɾ<D6B9><C9BE>'+''''
+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''+')';
if not bsSkinCheckRadioBox4.Checked then
str_fee:=str_fee+' and <20>Ƿ<EFBFBD><C7B7>渶<>1 ';
end;
2:
begin
str_fee:='where '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end)<>0 '
+' and <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''+','+''''+'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>'+''''+','+''''+'<27><>ֹɾ<D6B9><C9BE>'+''''
+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''+')';
if not strtobool(get_parameters_value(46,'true')) then
str_fee:=str_fee+' and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+'''';
if not bsSkinCheckRadioBox4.Checked then
str_fee:=str_fee+' and <20>Ƿ<EFBFBD><C7B7>渶<>1 ';
end;
3:
begin
str_fee:='where '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end)<>0 '
+' and <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''+','+''''+'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>'+''''+','+''''+'<27><>ֹɾ<D6B9><C9BE>'+''''
+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''+')';
if not strtobool(get_parameters_value(46,'true')) then
str_fee:=str_fee+' and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+'''';
if not bsSkinCheckRadioBox4.Checked then
str_fee:=str_fee+' and <20>Ƿ<EFBFBD><C7B7>渶<>1 ';
end;
4:
begin
str_fee:='where '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end)<>0 '
+' and <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''+','+''''+'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>'+''''+','+''''+'<27><>ֹɾ<D6B9><C9BE>'+''''
+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''+')';
if not strtobool(get_parameters_value(46,'true')) then
str_fee:=str_fee+' and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+'''';
if not bsSkinCheckRadioBox4.Checked then
str_fee:=str_fee+' and <20>Ƿ<EFBFBD><C7B7>渶<>1 ';
end;
end;
if RxDBLookupCombo1.DisplayValues[1]<>''then
str_fee:=str_fee+' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo1.DisplayValues[1]+'''';
str_op:='';
if Edit1.text<>''then
str_op:=str_op+' and ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit1.text+'%'+'''';
if Edit5.text<>''then
str_op:=str_op+' and <20><><EFBFBD><EFBFBD><E1B5A5> like '+''''+'%'+Edit5.text+'%'+'''';
if Edit14.text<>''then
str_op:=str_op+' and <20><><EFBFBD><EFBFBD><ECB5A5> like '+''''+'%'+Edit14.text+'%'+'''';
if Edit6.text<>''then
str_op:=str_op+' and '+Label6.Caption+' like '+''''+'%'+Edit6.text+'%'+'''';
if wwDBDateTimePicker5.text<>''then
str_op:=str_op+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker5.text+'''';
if wwDBDateTimePicker7.text<>''then
str_op:=str_op+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker7.text+'''';
if wwDBDateTimePicker6.text<>''then
str_op:=str_op+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>>='+''''+wwDBDateTimePicker6.text+'''';
if wwDBDateTimePicker8.text<>''then
str_op:=str_op+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><='+''''+wwDBDateTimePicker8.text+'''';
str_op:='where <20><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from v_ch_fee '+str_fee+')'+str_op;
case strtoint(bs_text.text) of
1:
begin
str_op:=str_op+' and '+open_data('1002','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
2:
begin
str_op:=str_op+' and '+open_data('1004','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
end;
op_str:='select * from t_op_seai '+str_op+default_sort(54,'t_op_seai','','desc');
case strtoint(bs_text.text) of
1:
begin
fee_str:='select CH_ID,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> order by CH_ID';
sum_str:='select <20>ұ<EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> group by <20>ұ<EFBFBD> order by <20>ұ<EFBFBD>';
end;
2:
begin
fee_str:='select <20><><EFBFBD><EFBFBD>,CH_ID,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>, δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>= '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> order by CH_ID';
sum_str:='select <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>';
end;
3:
begin
fee_str:='select <20><><EFBFBD><EFBFBD>,CH_ID,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>, δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>= '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> order by CH_ID';
sum_str:='select <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>';
end;
4:
begin
fee_str:='select <20><><EFBFBD><EFBFBD>,CH_ID,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>, δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>= '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> order by CH_ID';
sum_str:='select <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>';
end;
end;
t_ch_fee.Close;
t_ch_fee_sum.close;
t_op_seai.close;
t_op_seai.sql.clear;
t_op_seai.sql.add(op_str);
t_op_seai.open;
t_ch_fee.sql.clear;
t_ch_fee.sql.add(fee_str);
t_ch_fee.open;
t_ch_fee_sum.sql.clear;
t_ch_fee_sum.sql.add(sum_str);
t_ch_fee_sum.open;
end;
procedure Tfra_ch_add_do.bsSkinButton2Click(Sender: TObject);
begin
RxDBLookupCombo1.ClearValue;
Edit1.text:='';
Edit5.Text:='';
Edit6.text:='';
wwDBDateTimePicker5.Clear;
wwDBDateTimePicker6.clear;
wwDBDateTimePicker7.clear;
wwDBDateTimePicker8.clear;
end;
procedure Tfra_ch_add_do.bsSkinButton4Click(Sender: TObject);
var
str_fee,str_op:widestring;
op_str,fee_str,sum_str:widestring;
begin
t_ch_fee.close;
t_ch_fee_sum.close;
t_op_aire.Close;
t_ch_fee.DataSource:=t_op_aire1;
t_ch_fee_sum.DataSource:=t_op_aire1;
case strtoint(bs_text.text) of
1:
begin
str_fee:='where <20><><EFBFBD><EFBFBD><><3E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' and <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''+','+''''+'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>'+''''
+','+''''+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+''''+','+''''+'<27><>ֹɾ<D6B9><C9BE>'+''''
+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''+')';
if not bsSkinCheckRadioBox4.Checked then
str_fee:=str_fee+' and <20>Ƿ<EFBFBD><C7B7>渶<>1 ';
end;
2:
begin
str_fee:='where '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end)<>0 '
+' and <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''+','+''''+'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>'+''''+','+''''+'<27><>ֹɾ<D6B9><C9BE>'+''''
+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''+')';
if not strtobool(get_parameters_value(46,'true')) then
str_fee:=str_fee+' and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+'''';
if not bsSkinCheckRadioBox4.Checked then
str_fee:=str_fee+' and <20>Ƿ<EFBFBD><C7B7>渶<>1 ';
end;
3:
begin
str_fee:='where '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end)<>0 '
+' and <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''+','+''''+'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>'+''''+','+''''+'<27><>ֹɾ<D6B9><C9BE>'+''''
+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''+')';
if not strtobool(get_parameters_value(46,'true')) then
str_fee:=str_fee+' and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+'''';
if not bsSkinCheckRadioBox4.Checked then
str_fee:=str_fee+' and <20>Ƿ<EFBFBD><C7B7>渶<>1 ';
end;
4:
begin
str_fee:='where '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end)<>0 '
+' and <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''+','+''''+'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>'+''''+','+''''+'<27><>ֹɾ<D6B9><C9BE>'+''''
+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''+')';
if not strtobool(get_parameters_value(46,'true')) then
str_fee:=str_fee+' and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+'''';
if not bsSkinCheckRadioBox4.Checked then
str_fee:=str_fee+' and <20>Ƿ<EFBFBD><C7B7>渶<>1 ';
end;
end;
if RxDBLookupCombo3.DisplayValues[1]<>''then
str_fee:=str_fee+' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo3.DisplayValues[1]+'''';
str_op:='';
if Edit8.text<>''then
str_op:=str_op+' and ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit8.text+'%'+'''';
if Edit9.text<>''then
str_op:=str_op+' and <20><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD> like '+''''+'%'+Edit9.text+'%'+'''';
if Edit10.text<>''then
str_op:=str_op+' and <20><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD> like '+''''+'%'+Edit10.text+'%'+'''';
if wwDBDateTimePicker9.text<>''then
str_op:=str_op+' and һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker9.text+'''';
if wwDBDateTimePicker11.text<>''then
str_op:=str_op+' and һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker11.text+'''';
if wwDBDateTimePicker10.text<>''then
str_op:=str_op+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>>='+''''+wwDBDateTimePicker10.text+'''';
if wwDBDateTimePicker12.text<>''then
str_op:=str_op+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><='+''''+wwDBDateTimePicker12.text+'''';
str_op:='where <20><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from v_ch_fee '+str_fee+')'+str_op;
case strtoint(bs_text.text) of
1:
begin
str_op:=str_op+' and '+open_data('1002','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no');
end;
2:
begin
str_op:=str_op+' and '+open_data('1004','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no');
end;
end;
op_str:='select * from t_op_aire '+str_op+default_sort(55,'t_op_aire','','desc');
case strtoint(bs_text.text) of
1:
begin
fee_str:='select CH_ID,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> order by CH_ID';
sum_str:='select <20>ұ<EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> group by <20>ұ<EFBFBD> order by <20>ұ<EFBFBD>';
end;
2:
begin
fee_str:='select <20><><EFBFBD><EFBFBD>,CH_ID,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>, δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>= '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> order by CH_ID';
sum_str:='select <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>';
end;
3:
begin
fee_str:='select <20><><EFBFBD><EFBFBD>,CH_ID,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>, δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>= '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> order by CH_ID';
sum_str:='select <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>';
end;
4:
begin
fee_str:='select <20><><EFBFBD><EFBFBD>,CH_ID,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>, δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>= '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> order by CH_ID';
sum_str:='select <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>';
end;
end;
t_ch_fee.Close;
t_ch_fee_sum.close;
t_op_aire.close;
t_op_aire.sql.clear;
t_op_aire.sql.add(op_str);
t_op_aire.open;
t_ch_fee.sql.clear;
t_ch_fee.sql.add(fee_str);
t_ch_fee.open;
t_ch_fee_sum.sql.clear;
t_ch_fee_sum.sql.add(sum_str);
t_ch_fee_sum.open;
end;
procedure Tfra_ch_add_do.bsSkinButton5Click(Sender: TObject);
begin
RxDBLookupCombo3.ClearValue;
Edit8.text:='';
Edit9.Text:='';
Edit10.text:='';
wwDBDateTimePicker9.Clear;
wwDBDateTimePicker10.clear;
wwDBDateTimePicker11.clear;
wwDBDateTimePicker12.clear;
end;
procedure Tfra_ch_add_do.bsSkinButton6Click(Sender: TObject);
var
str_fee,str_op:widestring;
op_str,fee_str,sum_str:widestring;
begin
t_ch_fee.close;
t_ch_fee_sum.close;
t_op_airi.Close;
t_ch_fee.DataSource:=t_op_airi1;
t_ch_fee_sum.DataSource:=t_op_airi1;
case strtoint(bs_text.text) of
1:
begin
str_fee:='where <20><><EFBFBD><EFBFBD><><3E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' and <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''+','+''''+'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>'+''''
+','+''''+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+''''+','+''''+'<27><>ֹɾ<D6B9><C9BE>'+''''
+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''+')';
if not bsSkinCheckRadioBox4.Checked then
str_fee:=str_fee+' and <20>Ƿ<EFBFBD><C7B7>渶<>1 ';
end;
2:
begin
str_fee:='where '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end)<>0 '
+' and <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''+','+''''+'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>'+''''+','+''''+'<27><>ֹɾ<D6B9><C9BE>'+''''
+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''+')';
if not strtobool(get_parameters_value(46,'true')) then
str_fee:=str_fee+' and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+'''';
if not bsSkinCheckRadioBox4.Checked then
str_fee:=str_fee+' and <20>Ƿ<EFBFBD><C7B7>渶<>1 ';
end;
3:
begin
str_fee:='where '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end)<>0 '
+' and <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''+','+''''+'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>'+''''+','+''''+'<27><>ֹɾ<D6B9><C9BE>'+''''
+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''+')';
if not strtobool(get_parameters_value(46,'true')) then
str_fee:=str_fee+' and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+'''';
if not bsSkinCheckRadioBox4.Checked then
str_fee:=str_fee+' and <20>Ƿ<EFBFBD><C7B7>渶<>1 ';
end;
4:
begin
str_fee:='where '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end)<>0 '
+' and <20><><EFBFBD><EFBFBD>״̬ in ('+''''+'<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>'+''''+','+''''+'<27><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>'+''''+','+''''+'<27><>ֹɾ<D6B9><C9BE>'+''''
+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''+')';
if not strtobool(get_parameters_value(46,'true')) then
str_fee:=str_fee+' and <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+'''';
if not bsSkinCheckRadioBox4.Checked then
str_fee:=str_fee+' and <20>Ƿ<EFBFBD><C7B7>渶<>1 ';
end;
end;
if RxDBLookupCombo4.DisplayValues[1]<>''then
str_fee:=str_fee+' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo4.DisplayValues[1]+'''';
str_op:='';
if Edit7.text<>''then
str_op:=str_op+' and ί<>б<EFBFBD><D0B1><EFBFBD> like '+''''+'%'+Edit7.text+'%'+'''';
if Edit11.text<>''then
str_op:=str_op+' and <20><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD> like '+''''+'%'+Edit11.text+'%'+'''';
if Edit12.text<>''then
str_op:=str_op+' and <20><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD> like '+''''+'%'+Edit12.text+'%'+'''';
if wwDBDateTimePicker13.text<>''then
str_op:=str_op+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker13.text+'''';
if wwDBDateTimePicker15.text<>''then
str_op:=str_op+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker15.text+'''';
if wwDBDateTimePicker14.text<>''then
str_op:=str_op+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>>='+''''+wwDBDateTimePicker14.text+'''';
if wwDBDateTimePicker16.text<>''then
str_op:=str_op+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><='+''''+wwDBDateTimePicker16.text+'''';
str_op:='where <20><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from v_ch_fee '+str_fee+')'+str_op;
case strtoint(bs_text.text) of
1:
begin
str_op:=str_op+' and '+open_data('1002','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no');
end;
2:
begin
str_op:=str_op+' and '+open_data('1004','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no');
end;
end;
op_str:='select * from t_op_airi '+str_op+default_sort(56,'t_op_airi','','desc');
case strtoint(bs_text.text) of
1:
begin
fee_str:='select CH_ID,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> order by CH_ID';
sum_str:='select <20>ұ<EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> group by <20>ұ<EFBFBD> order by <20>ұ<EFBFBD>';
end;
2:
begin
fee_str:='select <20><><EFBFBD><EFBFBD>,CH_ID,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>, δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>= '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> order by CH_ID';
sum_str:='select <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>';
end;
3:
begin
fee_str:='select <20><><EFBFBD><EFBFBD>,CH_ID,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>, δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>= '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> order by CH_ID';
sum_str:='select <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>';
end;
4:
begin
fee_str:='select <20><><EFBFBD><EFBFBD>,CH_ID,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>, δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>= '
+'(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> order by CH_ID';
sum_str:='select <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>,sum(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>,sum(case <20><><EFBFBD><EFBFBD> when '+''''+'<27><>'+''''+' then (case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) end) end) '
+'else(case when <20><><EFBFBD><EFBFBD>>0 then '
+'(CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) end) else (CASE WHEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)>(<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) '
+'THEN (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) ELSE (<28><><EFBFBD><EFBFBD>-<2D><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>) end) end) '
+'end) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from v_ch_fee '
+str_fee+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> group by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD> order by <20><><EFBFBD><EFBFBD>,<2C>ұ<EFBFBD>';
end;
end;
t_ch_fee.Close;
t_ch_fee_sum.close;
t_op_airi.close;
t_op_airi.sql.clear;
t_op_airi.sql.add(op_str);
t_op_airi.open;
t_ch_fee.sql.clear;
t_ch_fee.sql.add(fee_str);
t_ch_fee.open;
t_ch_fee_sum.sql.clear;
t_ch_fee_sum.sql.add(sum_str);
t_ch_fee_sum.open;
end;
procedure Tfra_ch_add_do.bsSkinButton7Click(Sender: TObject);
begin
RxDBLookupCombo4.ClearValue;
Edit7.text:='';
Edit11.Text:='';
Edit12.text:='';
wwDBDateTimePicker13.Clear;
wwDBDateTimePicker14.clear;
wwDBDateTimePicker15.clear;
wwDBDateTimePicker16.clear;
end;
procedure Tfra_ch_add_do.N3Click(Sender: TObject);
var
i,j:integer;
begin
if bsSkinPanel9.Visible then
begin
if bsSkinCheckRadioBox1.Checked then
i:=2
else
i:=1;
if bsSkinCheckRadioBox3.Checked then
j:=1
else
j:=0;
end
else
begin
i:=0;
j:=0;
end;
t_rate.open;
if bsSkinTabSheet1.Showing then
begin
delete_do_type_num:=1;
shen_yewwu_cur(t_op_seae,bs_text.Text,t_ch_fee,t_ch_fee_do,t_rate,do_ban1,dxDBGrid2,i,j);
end;
if bsSkinTabSheet2.Showing then
begin
delete_do_type_num:=2;
shen_yewwu_cur(t_op_seai,bs_text.Text,t_ch_fee,t_ch_fee_do,t_rate,do_ban1,dxDBGrid4,i,j);
end;
if bsSkinTabSheet3.Showing then
begin
delete_do_type_num:=3;
shen_yewwu_cur(t_op_aire,bs_text.Text,t_ch_fee,t_ch_fee_do,t_rate,do_ban1,dxDBGrid7,i,j);
end;
if bsSkinTabSheet4.Showing then
begin
delete_do_type_num:=4;
shen_yewwu_cur(t_op_airi,bs_text.Text,t_ch_fee,t_ch_fee_do,t_rate,do_ban1,dxDBGrid10,i,j);
end;
t_rate.close;
t_ch_fee.Requery();
t_ch_fee_sum.Requery();
end;
procedure Tfra_ch_add_do.N5Click(Sender: TObject);
var
i,j:integer;
begin
if bsSkinPanel9.Visible then
begin
if bsSkinCheckRadioBox1.Checked then
i:=2
else
i:=1;
if bsSkinCheckRadioBox3.Checked then
j:=1
else
j:=0;
end
else
begin
i:=0;
j:=0;
end;
t_rate.open;
if bsSkinTabSheet1.Showing then
begin
delete_do_type_num:=1;
shen_fee_select_cur(bs_text.text,t_op_seae,t_ch_fee,t_ch_fee_sum,t_ch_fee_do,t_rate,do_ban1,dxDBGrid1,i,j);
end;
if bsSkinTabSheet2.Showing then
begin
delete_do_type_num:=2;
shen_fee_select_cur(bs_text.text,t_op_seai,t_ch_fee,t_ch_fee_sum,t_ch_fee_do,t_rate,do_ban1,dxDBGrid5,i,j);
end;
if bsSkinTabSheet3.Showing then
begin
delete_do_type_num:=3;
shen_fee_select_cur(bs_text.text,t_op_aire,t_ch_fee,t_ch_fee_sum,t_ch_fee_do,t_rate,do_ban1,dxDBGrid8,i,j);
end;
if bsSkinTabSheet4.Showing then
begin
delete_do_type_num:=4;
shen_fee_select_cur(bs_text.text,t_op_airi,t_ch_fee,t_ch_fee_sum,t_ch_fee_do,t_rate,do_ban1,dxDBGrid11,i,j);
end;
t_rate.close;
t_ch_fee.Requery();
t_ch_fee_sum.Requery();
end;
procedure Tfra_ch_add_do.N7Click(Sender: TObject);
var
i,j:integer;
begin
if bsSkinPanel9.Visible then
begin
if bsSkinCheckRadioBox1.Checked then
i:=2
else
i:=1;
if bsSkinCheckRadioBox3.Checked then
j:=1
else
j:=0;
end
else
begin
i:=0;
j:=0;
end;
t_rate.open;
if bsSkinTabSheet1.Showing then
begin
delete_do_type_num:=1;
shen_yewwu_fee(t_op_seae,bs_text.Text,t_ch_fee,t_ch_fee_do,t_rate,do_ban1,dxDBGrid2,i,j);
end;
if bsSkinTabSheet2.Showing then
begin
delete_do_type_num:=2;
shen_yewwu_fee(t_op_seai,bs_text.Text,t_ch_fee,t_ch_fee_do,t_rate,do_ban1,dxDBGrid4,i,j);
end;
if bsSkinTabSheet3.Showing then
begin
delete_do_type_num:=3;
shen_yewwu_fee(t_op_aire,bs_text.Text,t_ch_fee,t_ch_fee_do,t_rate,do_ban1,dxDBGrid7,i,j);
end;
if bsSkinTabSheet4.Showing then
begin
delete_do_type_num:=4;
shen_yewwu_fee(t_op_airi,bs_text.Text,t_ch_fee,t_ch_fee_do,t_rate,do_ban1,dxDBGrid10,i,j);
end;
t_rate.close;
t_ch_fee.Requery();
t_ch_fee_sum.Requery();
end;
procedure Tfra_ch_add_do.N9Click(Sender: TObject);
var
i,j:integer;
begin
if bsSkinPanel9.Visible then
begin
if bsSkinCheckRadioBox1.Checked then
i:=2
else
i:=1;
if bsSkinCheckRadioBox3.Checked then
j:=1
else
j:=0;
end
else
begin
i:=0;
j:=0;
end;
t_rate.open;
if bsSkinTabSheet1.Showing then
begin
delete_do_type_num:=1;
shen_fee_select_fee(bs_text.text,t_op_seae,t_ch_fee,t_ch_fee_sum,t_ch_fee_do,t_rate,do_ban1,dxDBGrid1,i,j);
end;
if bsSkinTabSheet2.Showing then
begin
delete_do_type_num:=2;
shen_fee_select_fee(bs_text.text,t_op_seai,t_ch_fee,t_ch_fee_sum,t_ch_fee_do,t_rate,do_ban1,dxDBGrid5,i,j);
end;
if bsSkinTabSheet3.Showing then
begin
delete_do_type_num:=3;
shen_fee_select_fee(bs_text.text,t_op_aire,t_ch_fee,t_ch_fee_sum,t_ch_fee_do,t_rate,do_ban1,dxDBGrid8,i,j);
end;
if bsSkinTabSheet4.Showing then
begin
delete_do_type_num:=4;
shen_fee_select_fee(bs_text.text,t_op_airi,t_ch_fee,t_ch_fee_sum,t_ch_fee_do,t_rate,do_ban1,dxDBGrid11,i,j);
end;
t_rate.close;
t_ch_fee.Requery();
t_ch_fee_sum.Requery();
end;
procedure Tfra_ch_add_do.RxDBLookupCombo2KeyPress(Sender: TObject;
var Key: Char);
begin
if key=#13 then
begin
key:=#0;
bsSkinButton10Click(Sender);
end;
end;
procedure Tfra_ch_add_do.RxDBLookupCombo1KeyPress(Sender: TObject;
var Key: Char);
begin
if key=#13 then
begin
key:=#0;
bsSkinButton1Click(Sender);
end;
end;
procedure Tfra_ch_add_do.RxDBLookupCombo3KeyPress(Sender: TObject;
var Key: Char);
begin
if key=#13 then
begin
key:=#0;
bsSkinButton4Click(Sender);
end;
end;
procedure Tfra_ch_add_do.RxDBLookupCombo4KeyPress(Sender: TObject;
var Key: Char);
begin
if key=#13 then
begin
key:=#0;
bsSkinButton6Click(Sender);
end;
end;
procedure Tfra_ch_add_do.dxDBGrid2DblClick(Sender: TObject);
begin
fee_view(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
end;
procedure Tfra_ch_add_do.dxDBGrid4DblClick(Sender: TObject);
begin
fee_view(t_op_seai.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
end;
procedure Tfra_ch_add_do.dxDBGrid7DblClick(Sender: TObject);
begin
fee_view(t_op_aire.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
end;
procedure Tfra_ch_add_do.dxDBGrid10DblClick(Sender: TObject);
begin
fee_view(t_op_airi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
end;
procedure Tfra_ch_add_do.N11Click(Sender: TObject);
begin
if t_ch_fee.IsEmpty then
exit;
t_rate.open;
if bsSkinTabSheet1.Showing then
begin
delete_do_type_num:=1;
shen_fee_select_fee_fen(bs_text.text,t_op_seae,t_ch_fee,t_ch_fee_sum,t_ch_fee_do,t_rate,do_ban1);
end;
if bsSkinTabSheet2.Showing then
begin
delete_do_type_num:=2;
shen_fee_select_fee_fen(bs_text.text,t_op_seai,t_ch_fee,t_ch_fee_sum,t_ch_fee_do,t_rate,do_ban1);
end;
if bsSkinTabSheet3.Showing then
begin
delete_do_type_num:=3;
shen_fee_select_fee_fen(bs_text.text,t_op_aire,t_ch_fee,t_ch_fee_sum,t_ch_fee_do,t_rate,do_ban1);
end;
if bsSkinTabSheet4.Showing then
begin
delete_do_type_num:=4;
shen_fee_select_fee_fen(bs_text.text,t_op_airi,t_ch_fee,t_ch_fee_sum,t_ch_fee_do,t_rate,do_ban1);
end;
t_rate.close;
t_ch_fee.Requery();
t_ch_fee_sum.Requery();
end;
end.