📄 seldateunit.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "SelDateUnit.h"
#include "DModUnit.h"
#include "RbbPreUnit.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TSelDateForm *SelDateForm;
//---------------------------------------------------------------------------
__fastcall TSelDateForm::TSelDateForm(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TSelDateForm::FormShow(TObject *Sender)
{
DateTimePicker1->Date = Now();
}
//---------------------------------------------------------------------------
void __fastcall TSelDateForm::Button1Click(TObject *Sender)
{
unsigned short Year, Month, Day;
try
{
DateTimePicker1->Date.DecodeDate(&Year,&Month,&Day);
DMod->WriteDataToRbb(DateTimePicker1->Date.DateString());
DMod->Query1->Close();
DMod->Query1->SQL->Clear();
DMod->Query1->SQL->Add("select * from rbb");
DMod->Query1->Open();
if(!DMod->Query1->Eof){
RbbPreForm = new TRbbPreForm(NULL);
RbbPreForm->DateLabel->Caption = IntToStr(Year) + "年" + IntToStr(Month) + "月" + IntToStr(Day) + "日";
RbbPreForm->QuickRep1->Preview();
delete RbbPreForm;
}
else{
ShowMessage("没有相关数据");
}
Close();
}
catch(...)
{
ShowMessage("不能正确生成日报表");
}
}
//---------------------------------------------------------------------------
void __fastcall TSelDateForm::Button2Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void __fastcall TSelDateForm::BitBtn1Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -