gklist.cpp

来自「民航飞机生产管理系统,实现了飞机定检坚控,小时卡起落卡等的坚控,并能生成工作任务」· C++ 代码 · 共 60 行

CPP
60 行
字号

//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "gklist.h"
#include "dm.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm9 *Form9;
extern AnsiString danwei;
//---------------------------------------------------------------------------
__fastcall TForm9::TForm9(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm9::FormCreate(TObject *Sender)
{
dw->Caption="单位:"+danwei;

 AnsiString djmc;
 if(Tag==1)
 djmc="本次C";
 else
 djmc="本次A";
 float zgs=0,dgs;
                  for(int i=0;i<DataModule1->gk90->RecordCount;i++)
                  {dgs=DataModule1->gk90Field->AsFloat;
                  zgs=zgs+dgs;
                  DataModule1->gk90->Next();
                  }
                  gs->Caption=djmc+"检工作共需工卡工时:"+FormatFloat("###.###",zgs)+"    实际工时:"+FormatFloat("###.###",zgs*12);
                  DataModule1->gk90->First();
}
//---------------------------------------------------------------------------


void __fastcall TForm9::QuickRep1BeforePrint(TCustomQuickRep *Sender,
      bool &PrintReport)
{
float zgs=0;
float dgs;
 for(int i=0;i<DataModule1->gk90->RecordCount;i++)
                  {dgs=DataModule1->gk90Field->AsFloat;
                  zgs=zgs+dgs;
                  DataModule1->gk90->Next();
                  }
     DataModule1->gk90->First();
if(DataModule1->gk90->FieldByName("间隔")->AsString=="1C")
gs->Caption="本次C检工作共需工卡工时:"+FormatFloat("###.###",zgs)+"    实际工时:"+FormatFloat("###.###",zgs*12);
else
gs->Caption="本次A检工作共需工卡工时:"+FormatFloat("###.###",zgs)+"    实际工时:"+FormatFloat("###.###",zgs*12);

}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

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