📄 prepreg.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Prepreg.h"
#include "DataModule.h"
#include "PrepregRep.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TPrepregForm *PrepregForm;
//---------------------------------------------------------------------------
__fastcall TPrepregForm::TPrepregForm(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TPrepregForm::FormShow(TObject *Sender)
{
try
{
if (!MastData->Database->InTransaction)
{
MastData->Database->StartTransaction();
}
MastData->Prepreg->Open();
}
catch(...)
{
MessageBox(NULL,"您的权限不够,不能查询P片资料表..","提示",MB_OK);
}
}
//---------------------------------------------------------------------------
void __fastcall TPrepregForm::FormCloseQuery(TObject *Sender,
bool &CanClose)
{
if(MastData->Prepreg->State==dsEdit||MastData->Prepreg->State==dsInsert)
{
if(MessageBox(NULL,"P片资料没有存盘,是否保存?", "警告", MB_YESNO) == IDYES)
MastData->PrepregAfterPost(MastData->Prepreg);
else
MastData->PrepregAfterCancel(MastData->Prepreg);
}
CanClose=true;
}
//---------------------------------------------------------------------------
void __fastcall TPrepregForm::BitBtn3Click(TObject *Sender)
{
PrepregRepForm->QuickRep1->Preview();
}
//---------------------------------------------------------------------------
void __fastcall TPrepregForm::BitBtn2Click(TObject *Sender)
{
PrepregRepForm->QuickRep1->Print();
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -