unit7.cpp
来自「电费管理程序」· C++ 代码 · 共 109 行
CPP
109 行
//---------------------------------------------------------------------------
#include <vcl.h>
#include <dos.h>
#pragma hdrstop
#include "Unit7.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm7 *Form7;
//---------------------------------------------------------------------------
__fastcall TForm7::TForm7(TComponent* Owner)
: TForm(Owner)
{
DModule->Table3->Active=true;
AnsiString zhan=DModule->Table3Station->AsString;
LabelStation->Caption=zhan;
struct date d;
getdate(&d);
LabelYear->Caption=AnsiString(d.da_year);
LabelYue->Caption=AnsiString((int)d.da_mon);
DModule->Table3->Active=false;
}
//---------------------------------------------------------------------------
void __fastcall TForm7::Text5Print(TObject *sender, AnsiString &Value)
{
// Value="a test";
switch(DModule->Table4FENLEI->AsInteger)
{
case 0:
Value="农业用电";
break;
case 1:
Value="非普工业";
break;
case 2:
Value="生活照明";
break;
case 3:
Value="非生活照明";
break;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm7::LabelOperatorPrint(TObject *sender,AnsiString &Value)
{
DModule->Table3->Active=true;
AnsiString oper=DModule->Table3Service->AsString;
Value="操作员: "+oper;
DModule->Table3->Active=false;
}
//---------------------------------------------------------------------------
void __fastcall TForm7::LabelWriterPrint(TObject *sender,
AnsiString &Value)
{
DModule->Table3->Active=true;
AnsiString oper=DModule->Table3ChaoBiao->AsString;
Value="抄表员: "+oper;
DModule->Table3->Active=false;
}
//---------------------------------------------------------------------------
void __fastcall TForm7::LabelShenhePrint(TObject *sender,
AnsiString &Value)
{
DModule->Table3->Active=true;
AnsiString oper=DModule->Table3ShenHe->AsString;
Value="审核员: "+oper;
DModule->Table3->Active=false;
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?