?? dsupervisory.cpp
字號:
// DSuperVisory.cpp : implementation file
//
#include "stdafx.h"
#include "MyProject.h"
#include "DSuperVisory.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDSuperVisory dialog
CDSuperVisory::CDSuperVisory(CWnd* pParent /*=NULL*/)
: CDialog(CDSuperVisory::IDD, pParent)
{
//{{AFX_DATA_INIT(CDSuperVisory)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CDSuperVisory::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDSuperVisory)
DDX_Control(pDX, ID_STAZD, m_StaZD);
DDX_Control(pDX, ID_STATG, m_StaTG);
DDX_Control(pDX, ID_STASJ, m_StaSJ);
DDX_Control(pDX, ID_STASD, m_StaSD);
DDX_Control(pDX, ID_STACY, m_StaCY);
DDX_Control(pDX, ID_STABA, m_StaBA);
DDX_Control(pDX, IDC_CHKZD, m_ChkZD);
DDX_Control(pDX, IDC_CHKTG, m_ChkTG);
DDX_Control(pDX, IDC_CHKSJ, m_ChkSJ);
DDX_Control(pDX, IDC_CHKSD, m_ChkSD);
DDX_Control(pDX, IDC_CHKCY, m_ChkCY);
DDX_Control(pDX, IDC_CHKBA, m_ChkBA);
DDX_Control(pDX, IDC_LIST1, m_List);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDSuperVisory, CDialog)
//{{AFX_MSG_MAP(CDSuperVisory)
ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDSuperVisory message handlers
void CDSuperVisory::OnOK()
{
// TODO: Add extra validation here
//CDialog::OnOK();
}
void CDSuperVisory::OnCancel()
{
// TODO: Add extra cleanup here
CDialog::OnCancel();
}
BOOL CDSuperVisory::OnInitDialog()
{
CDialog::OnInitDialog();
RxRecordset rst;
rst.Open(" SELECT * FROM 報關單表 WHERE 報關單類別 NOT LIKE '%%備案%%'",adCmdText);
for(int i=0;i<rst.GetRecordCount();i++)
{
rst.Move(i);
this->m_List.AddString(rst.GetFieldValue("報關業務編號"));
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CDSuperVisory::OnButton1()
{
RxRecordset rst;
CString sSQL;
CString sText;
this->m_List.GetText(m_List.GetCurSel(),sText);
this->m_ChkZD.SetCheck(1);
sSQL.Format("SELECT * FROM 報關單表 WHERE 報關業務編號='%s'",sText);
rst.Open(sSQL,adCmdText);
this->m_StaZD.SetWindowText(rst.GetFieldValue("錄入時間"));
//處理審單
this->m_ChkSD.SetCheck(atoi(rst.GetFieldValue("審核標志")));
if(this->m_ChkSD.GetCheck()==1)
this->m_StaSD.SetWindowText(rst.GetFieldValue("審核時間"));
//處理備案清單
sSQL.Format("SELECT * FROM 報關單表 WHERE 報關業務編號='%s'",rst.GetFieldValue("備案號"));
rst.Open(sSQL,adCmdText);
if(rst.GetRecordCount()<1)
this->m_ChkBA.SetCheck(0);
else
{
this->m_ChkBA.SetCheck(1);
CString bb=rst.GetFieldValue("進口日期");
this->m_StaBA.SetWindowText(bb);
}
//處理三檢
sSQL.Format("SELECT * FROM 三檢表 WHERE 報關業務編號='%s'",sText);
rst.Open(sSQL,adCmdText);
if(rst.GetRecordCount()<1)
this->m_ChkSJ.SetCheck(0);
else
{
this->m_ChkSJ.SetCheck(atoi(rst.GetFieldValue("結束標志")));
if(m_ChkSJ.GetCheck()==1)
this->m_StaSJ.SetWindowText(rst.GetFieldValue("結束時間"));
}
//處理查驗
sSQL.Format("SELECT * FROM 查驗表 WHERE 報關業務編號='%s'",sText);
rst.Open(sSQL,adCmdText);
if(rst.GetRecordCount()<1)
this->m_ChkCY.SetCheck(0);
else
{
this->m_ChkCY.SetCheck(atoi(rst.GetFieldValue("結束標志")));
if(m_ChkCY.GetCheck()==1)
this->m_StaCY.SetWindowText(rst.GetFieldValue("結束時間"));
}
//處理通關
sSQL.Format("SELECT * FROM 通關表 WHERE 報關業務編號='%s'",sText);
rst.Open(sSQL,adCmdText);
if(rst.GetRecordCount()<1)
this->m_ChkTG.SetCheck(0);
else
{
this->m_ChkTG.SetCheck(atoi(rst.GetFieldValue("現場放行標志")));
if(m_ChkTG.GetCheck()==1)
this->m_StaTG.SetWindowText(rst.GetFieldValue("現場放行時間"));
}
//
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -