mainunit.cpp

来自「该软件为计算机公司进销存管理系统。方便公司管理人员对进货、出货和库存产品的管理和」· C++ 代码 · 共 146 行

CPP
146
字号
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "MainUnit.h"
#include "LoginUnit.h"
#include "SqbUnit.h"
#include "JhUnit.h"
#include "CpxxbUnit.h"
#include "GhbUnit.h"
#include "SelDateUnit.h"
#include "SelMonthUnit.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TMainForm *MainForm;
//---------------------------------------------------------------------------
__fastcall TMainForm::TMainForm(TComponent* Owner)
    : TForm(Owner)
{
}
//---------------------------------------------------------------------------










void __fastcall TMainForm::LoginActionExecute(TObject *Sender)
{
    try
    {
        LoginForm = new TLoginForm(NULL);
        LoginForm->ShowModal();
        delete LoginForm;
    }
    catch(...)
    {
        ShowMessage("程序异常");
    }
}
//---------------------------------------------------------------------------

void __fastcall TMainForm::SqbActionExecute(TObject *Sender)
{
    try
    {
        SqbForm = new TSqbForm(NULL);
        SqbForm->ShowModal();
        delete SqbForm;
    }
    catch(...)
    {
        ShowMessage("程序异常");
    }
    
}
//---------------------------------------------------------------------------

void __fastcall TMainForm::CpxxActionExecute(TObject *Sender)
{
    try
    {
        CpxxbForm = new TCpxxbForm(NULL);
        CpxxbForm->ShowModal();
        delete CpxxbForm;
    }
    catch(...)
    {
        ShowMessage("程序异常");
    }    
}
//---------------------------------------------------------------------------

void __fastcall TMainForm::JhActionExecute(TObject *Sender)
{
    try
    {
        JhForm = new TJhForm(NULL);
        JhForm->ShowModal();
        delete JhForm;
    }
    catch(...)
    {
        ShowMessage("程序异常");
    }    
}
//---------------------------------------------------------------------------

void __fastcall TMainForm::ShActionExecute(TObject *Sender)
{
    try
    {
        GhbForm = new TGhbForm(NULL);
        GhbForm->ShowModal();
        delete GhbForm;
    }
    catch(...)
    {
        ShowMessage("程序异常");
    }    
}
//---------------------------------------------------------------------------

void __fastcall TMainForm::RbbActionExecute(TObject *Sender)
{
    try
    {
        SelDateForm = new TSelDateForm(NULL);
        SelDateForm->ShowModal();
        delete SelDateForm;
    }
    catch(...)
    {
        ShowMessage("程序异常");
    }    
}
//---------------------------------------------------------------------------

void __fastcall TMainForm::YbbActionExecute(TObject *Sender)
{
    try
    {
        SelMonthForm = new TSelMonthForm(NULL);
        SelMonthForm->ShowModal();
        delete SelMonthForm;
    }
    catch(...)
    {
        ShowMessage("程序异常");
    }    
}
//---------------------------------------------------------------------------

void __fastcall TMainForm::ExitActionExecute(TObject *Sender)
{
     Close();
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

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