⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unit_queryaccountadddec.pas

📁 一个不错的源程序DELPHI开发的,功能比较好的客户管理系统
💻 PAS
字号:
unit Unit_QueryAccountAddDec;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Unit_custbrowsebase_P, ImgList, Menus, Db, DBTables, ComCtrls, StdCtrls,
  Grids, DBGrids, TFlatCheckBoxUnit, TFlatSpinEditUnit, ToolWin,
  TFlatEditUnit, TFlatComboBoxUnit, TFlatButtonUnit, ExtCtrls;

type
  TFRM_QueryAccountAddDec = class(TForm_custbrowsebase_P)
    Label6: TLabel;
    Label8: TLabel;
    cbGR_CalcMonth: TFlatCheckBox;
    spiGR_CalcMonthYear: TFlatSpinEditInteger;
    spiGR_CalcMonthMon: TFlatSpinEditInteger;
    Label9: TLabel;
    Label11: TLabel;
    cbGR_TotalRate: TFlatCheckBox;
    spiGR_TotalRateBegin: TFlatSpinEditInteger;
    spiGR_TotalRateEnd: TFlatSpinEditInteger;
    procedure cbGR_ZWSJClick(Sender: TObject);
    procedure cbGR_TotalRateClick(Sender: TObject);
  private
    { Private declarations }
  protected
        procedure pro_initother(sender:tobject);override;
        procedure pro_GR_getsqlwhere(sender:tobject);override;
        procedure pro_GR_getid(sender:tobject);override;

  public
    { Public declarations }
  end;

var
  FRM_QueryAccountAddDec: TFRM_QueryAccountAddDec;

implementation

{$R *.DFM}

procedure TFRM_QueryAccountAddDec.cbGR_ZWSJClick(Sender: TObject);
begin
  inherited;
 if cbGR_CalcMonth.Checked then
      begin
        spiGR_CalcMonthYear.colorflat:=clwindow;
        spiGR_CalcMonthMon.colorflat:=clwindow;
        spiGR_CalcMonthYear.Enabled:=true;
        spiGR_CalcMonthMon.Enabled:=true;
      end
  else
      begin
        spiGR_CalcMonthYear.colorflat:=clActiveBorder;
        spiGR_CalcMonthMon.colorflat:=clActiveBorder;
        spiGR_CalcMonthYear.Enabled:=false;
        spiGR_CalcMonthMon.Enabled:=false;
      end;
end;

procedure TFRM_QueryAccountAddDec.cbGR_TotalRateClick(Sender: TObject);
begin
  inherited;
 if cbGR_TotalRate.Checked then
      begin
        spiGR_TotalRateBegin.colorflat:=clwindow;
        spiGR_TotalRateEnd.colorflat:=clwindow;
        spiGR_TotalRateBegin.Enabled:=true;
        spiGR_TotalRateEnd.Enabled:=true;
      end
  else
      begin
        spiGR_TotalRateBegin.colorflat:=clActiveBorder;
        spiGR_TotalRateEnd.colorflat:=clActiveBorder;
        spiGR_TotalRateBegin.Enabled:=false;
        spiGR_TotalRateEnd.Enabled:=false;
      end;
end;

procedure TFRM_QueryAccountAddDec.pro_GR_getid(sender: tobject);
begin
  inherited;

end;

procedure TFRM_QueryAccountAddDec.pro_GR_getsqlwhere(sender: tobject);
var
    tmpstr,tmpstr_calcMonth:string;
begin
  inherited;
tmpstr_calcMonth:=inttostr(spiGR_CalcMonthMon.value);
if length(tmpstr_calcMonth)=1 then
    tmpstr_calcMonth:='0'+tmpstr_calcMonth;
//
if edGR_SID.Text<>'' then
      tmpstr:=tmpstr+' and '+'t.SID='+''''+edGR_SID.Text+'''';
if lGR_cityno<>'' then
        tmpstr:=tmpstr+' and '+'t.cityno='+lGR_cityno;
if lGR_off_no_home<>'' then
        tmpstr:=tmpstr+' and '+'t.off_no_home='+lGR_off_no_home;
if lGR_GH<>'' then
        tmpstr:=tmpstr+' and '+'t.WK_NO='+''''+lGR_GH+'''';

//
if cbGR_CalcMonth.Checked then
        tmpstr:=tmpstr+' and t.CalcMonth='+''''+inttostr(spiGR_CalcMonthYear.value)+tmpstr_calcMonth+'''';

if cbGR_TotalRate.Checked then
        tmpstr:=tmpstr+' and t.TotalRate between '+inttostr(spiGR_TotalRateBegin.value)+' and '+inttostr(spiGR_TotalRateEnd.value);
GR_sqlwhere:=GR_sqlwhere+tmpstr;
end;

procedure TFRM_QueryAccountAddDec.pro_initother(sender: tobject);
begin
  inherited;
spiGR_CalcMonthYear.Value:=strtoint(formatdatetime('yyyy',now));
spiGR_CalcMonthMon.Value:=strtoint(formatdatetime('mm',now));
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -