📄 dworkload.cpp
字号:
// DWorkload.cpp: implementation of the CDWorkload class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "MyProject.h"
#include "DWorkload.h"
#include "ExternDllHeader.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CDWorkload::CDWorkload()
{
}
CDWorkload::~CDWorkload()
{
}
void CDWorkload::Init()
{
this->SetWindowText("运输工作量分析");
this->m_StaClew.SetWindowText("回厂日期");
CString sSQL;
sSQL.Format("SELECT 车号,SUM(行程) AS 行程 FROM 派车回厂确认表 GROUP BY 车号");
rst.Open(sSQL,adCmdText);
this->Invalidate();
this->DlgReport.SetRecordset(rst);
this->DlgChart.SetRecordset(rst,"车号","行程","公里",1);
}
void CDWorkload::OnButquery()
{
CString sSQL,sDate1,sDate2,sClew;
CTime date1,date2;
m_DtDate1.GetTime(date1);
m_DtDate2.GetTime(date2);
sDate1=CTimeToCString(date1);
sDate2=CTimeToCString(date2);
sSQL.Format("SELECT 车号,SUM(行程) AS 行程 FROM 派车回厂确认表 WHERE 回厂时间 BETWEEN '%s' AND '%s' GROUP BY 车号",sDate1,sDate2);
rst.Open(sSQL,adCmdText);
this->DlgReport.m_Grid.DeleteAllItems();
this->DlgReport.m_Grid.AddCellValue(rst);
this->DlgChart.SetRecordset(rst,"车号","行程","公里",1);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -