prepreg.cpp

来自「某公司资料管理系统」· C++ 代码 · 共 60 行

CPP
60
字号
//---------------------------------------------------------------------------

#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 + =
减小字号Ctrl + -
显示快捷键?