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

📄 dcustomsauditing.cpp

📁 用VC+SQL实现的物流管理系统 “RxMediaPlayer” 文件夹中存放《物流综合管理系统》中《媒体播放平台》源程序 “数据库设置”文件夹中存放《物流综合管理系统》辅助工具《数据库设置》源程
💻 CPP
字号:
// DCustomsAuditing.cpp : implementation file
//

#include "stdafx.h"
#include "MyProject.h"
#include "DCustomsAuditing.h"
#include "ExternDllHeader.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDCustomsAuditing dialog


CDCustomsAuditing::CDCustomsAuditing(CWnd* pParent /*=NULL*/)
	: CDialog(CDCustomsAuditing::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDCustomsAuditing)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CDCustomsAuditing::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDCustomsAuditing)
	DDX_Control(pDX, IDC_LIST1, m_Grid);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDCustomsAuditing, CDialog)
	//{{AFX_MSG_MAP(CDCustomsAuditing)
	ON_NOTIFY(NM_DBLCLK, IDC_LIST1, OnDblclkList1)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDCustomsAuditing message handlers

void CDCustomsAuditing::OnOK() 
{
	// TODO: Add extra validation here
	//CDialog::OnOK();
}

void CDCustomsAuditing::OnCancel() 
{
	// TODO: Add extra cleanup here
	
	CDialog::OnCancel();
}

void CDCustomsAuditing::OnDblclkList1(NMHDR* pNMHDR, LRESULT* pResult) 
{
	CString sID,sSQL,sTime;
	sID=m_Grid.GetItemText(m_Grid.GetHotItem(),0);
	CTime time;
	time=time.GetCurrentTime();
	sTime=CTimeToCString(time);
	if(sID.IsEmpty())
		return;
	if(MessageBox("确定审核此条报关记录吗?","系统提示",MB_OKCANCEL|MB_ICONQUESTION)!=1)
		return;
	sSQL.Format("UPDATE 报关单表 SET 审核标志=1 ,审核时间='%s' WHERE 总业务编号='%s'",sTime,sID);
	RxRecordset rst;
	rst.Open(sSQL,adCmdText);
	sSQL.Format("SELECT * FROM 报关单表 WHERE 报关单类别 NOT LIKE '%%备案%%' AND 审核标志=0");
	rst.Open(sSQL,adCmdText);
	m_Grid.DeleteAllItems();
	m_Grid.AddCellValue(rst);
	*pResult = 0;
}

BOOL CDCustomsAuditing::OnInitDialog() 
{
	CDialog::OnInitDialog();
	m_Grid.m_bReadOnly=true;
	CString sSQL;
	sSQL.Format("SELECT * FROM 报关单表 WHERE 报关单类别 NOT LIKE '%%备案%%' AND 审核标志=0");
	RxRecordset rst;
	rst.Open(sSQL,adCmdText);
	this->m_Grid.SetDataBase(rst);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

⌨️ 快捷键说明

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