📄 tongji.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Tongji.h"
#include "DM1.h"
#include "Wait.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TFormTongji *FormTongji;
//---------------------------------------------------------------------------
__fastcall TFormTongji::TFormTongji(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TFormTongji::BitBtn1Click(TObject *Sender)
{
try
{
StrToDateTime(Trim(MaskEditYf->Text) + "-01");
}
catch(...)
{
ShowMessage("请输入正确的月份!");
MaskEditYf->SetFocus();
return;
}
DataModal1->ADOSPYue->Parameters->ParamByName("@yuefen")->Value = FormatDateTime("yyyy-mm",StrToDateTime(Trim(MaskEditYf->Text) + "-01"));
DataModal1->ADOSPYue->Parameters->ParamByName("@ksrq")->Value = FormatDateTime("yyyy-mm-dd",DateTimePickerKs->DateTime);
DataModal1->ADOSPYue->Parameters->ParamByName("@jsrq")->Value = FormatDateTime("yyyy-mm-dd",DateTimePickerJs->DateTime);
DataModal1->ADOSPYue->Prepared = true;
TFormWait *FormWait = new TFormWait(this);
FormWait->ProgressBar1->Visible = false;
FormWait->Caption = "正在进行统计,请稍候。。。";
FormWait->Show();
try
{
DataModal1->ADOSPYue->ExecProc();
}
catch(Exception &exception)
{
FormWait->Close();
delete FormWait;
ShowMessage("统计出错!\n出错原因:" + exception.Message);
return;
}
FormWait->Close();
delete FormWait;
ShowMessage("统计完成!");
MaskEditYf->Clear();
}
//---------------------------------------------------------------------------
void __fastcall TFormTongji::FormCreate(TObject *Sender)
{
DateTimePickerKs->DateTime = Now();
DateTimePickerJs->DateTime = Now();
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -