⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 selmonthunit.cpp

📁 该软件为计算机公司进销存管理系统。方便公司管理人员对进货、出货和库存产品的管理和维护。
💻 CPP
字号:
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "SelMonthUnit.h"
#include "DModUnit.h"
#include "YbbPreUnit.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TSelMonthForm *SelMonthForm;
//---------------------------------------------------------------------------
__fastcall TSelMonthForm::TSelMonthForm(TComponent* Owner)
    : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TSelMonthForm::FormShow(TObject *Sender)
{
    try
    {
        TDateTime T;
        unsigned short year, month, day ;
        T = Now();
        T.DecodeDate(&year, &month, &day);
        EditY->Text = IntToStr(year);
        ComboBox1->ItemIndex = month - 1;
    }
    catch(...)
    {
        ;
    }


}
//---------------------------------------------------------------------------
void __fastcall TSelMonthForm::BitBtn1Click(TObject *Sender)
{
    try
    {
        AnsiString SQLStr;
        int Year,Month;
        Year = StrToInt(EditY->Text);
        Month = ComboBox1->ItemIndex + 1;
        DMod->WriteDataToYbb(Year,Month);
        DMod->Query1->Close();
        DMod->Query1->SQL->Clear();
        SQLStr = "select cpjc,sqjcsl,sqjcje,bqgjsl,bqgjje,diaoru,duijin,";
        SQLStr = SQLStr + "bqxssl,bqxsje,diaochu,duichu,bqjcsl,bqjcje,bqgjje cb,";
        SQLStr = SQLStr + "(bqxsje-bqgjje)lr,zpv  from ybb";

        DMod->Query1->SQL->Add(SQLStr);
        DMod->Query1->Open();
        if(!DMod->Query1->Eof){
            YbbPreForm = new TYbbPreForm(NULL);
            YbbPreForm->DateLabel->Caption = IntToStr(Year) + "年" + IntToStr(Month) + "月" ;
            YbbPreForm->QuickRep1->Preview();
            delete YbbPreForm;
        }
        else{
            ShowMessage("没有相关数据");
        }
        Close();
    }
    catch(...)
    {
        ShowMessage("不能正确生成月报表");
    }


}
//---------------------------------------------------------------------------
void __fastcall TSelMonthForm::BitBtn2Click(TObject *Sender)
{
    Close();
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

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