亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? invoicedlg.cpp

?? 一個企業訂單管理流程的例子
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
// InvoiceDlg.cpp : implementation file

#include "stdafx.h"
#include "Invoice.h"
#include "InvoiceDlg.h"
#include "Mdb.h"
#include "MdbDlg.h"
#include "io.h"
#include "PrintSetup.h"
#include "OlddatDlg.h"
#include "MdbSaveDat.h"
#include "PswDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

#define SAVE_MDBDATA_MAXNO 50000
#define REPORT_DAT_MAXNO 200
/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About
CString ttt0[SAVE_MDBDATA_MAXNO],ttt1[SAVE_MDBDATA_MAXNO],ttt2[SAVE_MDBDATA_MAXNO];
int m_ttt_maxno;

//////////
//////////////報表數據
struct REPORT_DATA{
	CString order_form; 
	CString goods_num;
  	CString goods_mode;
  	double   goods_unitprice;
	long    goods_maxno;
	double   goods_maxprice;
	CString remark;
}report_data[REPORT_DAT_MAXNO];
long report_data_maxno=0;

//////////

class CAboutDlg : public CDialog
{
public:
	CAboutDlg();

// Dialog Data
	//{{AFX_DATA(CAboutDlg)
	enum { IDD = IDD_ABOUTBOX };
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CAboutDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	//{{AFX_MSG(CAboutDlg)
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
	//{{AFX_DATA_INIT(CAboutDlg)
	//}}AFX_DATA_INIT
}

void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CAboutDlg)
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
	//{{AFX_MSG_MAP(CAboutDlg)
		// No message handlers
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CInvoiceDlg dialog

CInvoiceDlg::CInvoiceDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CInvoiceDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CInvoiceDlg)
	m_out_goodsmode = _T("");
 	m_out_goodsno =  _T("");
	m_out_goodsnum = _T("");
	m_out_orderform = _T("");
	m_out_remark = _T("");
	m_out_client = _T("");
	m_out_createtableman = _T("");
	m_out_goodsprice = _T("");
	m_out_goodsunitprice = _T("");
	//}}AFX_DATA_INIT
	// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
	m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

void CInvoiceDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CInvoiceDlg)
	DDX_Control(pDX, IDC_LIST_MDBOUT, m_list_mdbout);
	DDX_Control(pDX, IDC_LIST_ZTOUT, m_list_resultout);
	DDX_Text(pDX, IDC_OUT_GOODS_MODE, m_out_goodsmode);
	DDX_Text(pDX, IDC_OUT_GOODS_NO, m_out_goodsno);
	DDX_Text(pDX, IDC_OUT_GOODS_NUM, m_out_goodsnum);
	DDX_Text(pDX, IDC_OUT_ORDER_FORM, m_out_orderform);
	DDX_Text(pDX, IDC_OUT_REMARK, m_out_remark);
	DDX_Text(pDX, IDC_OUT_CLIENT, m_out_client);
	DDX_Text(pDX, IDC_OUT_CREATTABLEMAN, m_out_createtableman);
	DDX_Text(pDX, IDC_OUT_GOODS_PRICE, m_out_goodsprice);
	DDX_Text(pDX, IDC_OUT_UNIT_PRICE, m_out_goodsunitprice);
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CInvoiceDlg, CDialog)
	//{{AFX_MSG_MAP(CInvoiceDlg)
	ON_WM_SYSCOMMAND()
	ON_WM_PAINT()
	ON_WM_QUERYDRAGICON()
	ON_BN_CLICKED(IDC_BUTTON_QUERY, OnQuery)
	ON_BN_CLICKED(IDC_BUTTON_CLEARLIST, OnClearlist)
	ON_BN_CLICKED(IDC_BUTTON_OUT_INSERT, OnOutInsert)
	ON_BN_CLICKED(IDC_BUTTON_OUT_DELETE, OnOutDelete)
	ON_BN_CLICKED(IDC_BUTTON_OUT_REVIEW, OnPrint)
	ON_BN_CLICKED(IDC_BUTTON_OUT_CHANGE, OnOutChange)
	ON_BN_CLICKED(IDC_BUTTON_DOMDB, OnDoMdb)
	ON_NOTIFY(NM_CLICK, IDC_LIST_ZTOUT, OnClickListResultout)
	ON_BN_CLICKED(IDC_BUTTON_OLDDAT, OnDoOlddat)
	ON_BN_CLICKED(IDC_BUTTON_SAVEMDB, OnSaveTradeDat)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CInvoiceDlg message handlers

BOOL CInvoiceDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	// Add "About..." menu item to system menu.

	// IDM_ABOUTBOX must be in the system command range.
	ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
	ASSERT(IDM_ABOUTBOX < 0xF000);

	CMenu* pSysMenu = GetSystemMenu(FALSE);
	if (pSysMenu != NULL)
	{
		CString strAboutMenu;
		strAboutMenu.LoadString(IDS_ABOUTBOX);
		if (!strAboutMenu.IsEmpty())
		{
			pSysMenu->AppendMenu(MF_SEPARATOR);
			pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
		}
	}

	// Set the icon for this dialog.  The framework does this automatically
	//  when the application's main window is not a dialog
	SetIcon(m_hIcon, TRUE);			// Set big icon
	SetIcon(m_hIcon, FALSE);		// Set small icon
	
	// TODO: Add extra initialization here
	/////////////初始化輸出狀態表
	m_list_resultout.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES);
	m_list_resultout.InsertColumn(0,"序號",LVCFMT_LEFT,60,50);
	m_list_resultout.InsertColumn(1,"   訂單號",LVCFMT_LEFT,100,50);	
	m_list_resultout.InsertColumn(2,"   貨品編號",LVCFMT_LEFT,100,50);
	m_list_resultout.InsertColumn(3," 電   鍍",LVCFMT_LEFT,80,50);
	m_list_resultout.InsertColumn(4,"單價(元)",LVCFMT_LEFT,80,50);
	m_list_resultout.InsertColumn(5,"   數量(件)",LVCFMT_LEFT,100,50);
	m_list_resultout.InsertColumn(6,"   金    額",LVCFMT_LEFT,100,50);
	m_list_resultout.InsertColumn(7,"             備      注 ",LVCFMT_LEFT,270,50);

	/////////////初始化輸出狀態表
	m_list_mdbout.SetExtendedStyle(LVS_EX_GRIDLINES);
	m_list_mdbout.InsertColumn(0,"   序  號",LVCFMT_LEFT,80,50);
	m_list_mdbout.InsertColumn(1,"       貨 品 編 號",LVCFMT_LEFT,170,50);
	m_list_mdbout.InsertColumn(2,"     電   鍍",LVCFMT_LEFT,120,50);
	m_list_mdbout.InsertColumn(3,"     單價(元)",LVCFMT_LEFT,120,50);

	//////////
	m_query_xh=0;

	

	return TRUE;  // return TRUE  unless you set the focus to a control
}

void CInvoiceDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
	if ((nID & 0xFFF0) == IDM_ABOUTBOX)
	{
		CAboutDlg dlgAbout;
		dlgAbout.DoModal();
	}
	else
	{
		CDialog::OnSysCommand(nID, lParam);
	}
}

// If you add a minimize button to your dialog, you will need the code below
//  to draw the icon.  For MFC applications using the document/view model,
//  this is automatically done for you by the framework.

void CInvoiceDlg::OnPaint() 
{
	if (IsIconic())
	{
		CPaintDC dc(this); // device context for painting

		SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

		// Center icon in client rectangle
		int cxIcon = GetSystemMetrics(SM_CXICON);
		int cyIcon = GetSystemMetrics(SM_CYICON);
		CRect rect;
		GetClientRect(&rect);
		int x = (rect.Width() - cxIcon + 1) / 2;
		int y = (rect.Height() - cyIcon + 1) / 2;

		// Draw the icon
		dc.DrawIcon(x, y, m_hIcon);
	}
	else
	{
		CDialog::OnPaint();
	}
}

// The system calls this to obtain the cursor to display while the user drags
//  the minimized window.
HCURSOR CInvoiceDlg::OnQueryDragIcon()
{
	return (HCURSOR) m_hIcon;
}

void CInvoiceDlg::OnQuery() 
{
	// TODO: Add your control notification handler code here
	UpdateData(TRUE);

	if(m_out_goodsunitprice.IsEmpty()!=1)
	{
		if(CheckDat(m_out_goodsunitprice,1)==0)
		{
			AfxMessageBox("單價輸入錯誤");
			return;
		}
	}

	if(m_out_goodsnum.IsEmpty()==1
		&&m_out_goodsmode.IsEmpty()==1
		&&m_out_goodsunitprice.IsEmpty()==1)
	{
		AfxMessageBox("查詢時 至少有一項不能為空");
		return;
	}
	

   	ttt0[0]=m_out_goodsnum;
	ttt1[0]=m_out_goodsmode;
	ttt2[0]=m_out_goodsunitprice;
	m_ttt_maxno=Mdb.QueryMdbDao(ttt0,ttt1,ttt2);
	if(m_ttt_maxno==0)
	{
		AfxMessageBox("沒有查詢到記錄!");
		return;
	}

	m_out_goodsnum =ttt0[0];
	m_out_goodsmode =ttt1[0];
    m_out_goodsunitprice = ttt2[0];//atof(ttt2[0]);//Double.valueof(ttt2[0]).doubleValue();
	

	UpdateData(FALSE);

	OutMdbQueryscr();
	
	return;
}

int CInvoiceDlg::OutScr()
{	
	char str[256];
	int no;

	for(no=0;no<Mdb.mdb_goods_maxno;no++,m_query_xh++)
	{
		sprintf(str,"%05d",m_query_xh);
		m_list_resultout.InsertItem(m_query_xh,str);

		sprintf(str,"%s",Mdb.mdb_goods[no].t_goods_num);
		m_list_resultout.SetItemText(m_query_xh,2,str);

		sprintf(str,"%s",Mdb.mdb_goods[no].t_goods_mode);
		m_list_resultout.SetItemText(m_query_xh,3,str);

		sprintf(str,"%s",Mdb.mdb_goods[no].t_goods_unitprice);
		m_list_resultout.SetItemText(m_query_xh,4,str);
	}
	
	return 1;
}


int CInvoiceDlg::ClearList()
{
	int list_no;
	int i;

	list_no=m_list_resultout.GetItemCount();
	for(i=list_no;i>=0;i--)
	{
		m_list_resultout.DeleteItem(i);
	}
	
	return 0;
}

void CInvoiceDlg::OnClearlist() 
{
	// TODO: Add your control notification handler code here
	if(MBox("清除輸出表所有")==0)
	{
		return;
	}

	report_data_maxno=0;
	m_query_xh=0;
	m_ttt_maxno=0;

	m_out_goodsmode = _T("");
 	m_out_goodsno =  _T("");
	m_out_goodsnum = _T("");
 	m_out_goodsprice =  _T("");
	m_out_orderform = _T("");
	m_out_remark = _T("");
 	m_out_goodsunitprice = _T("");
	m_out_client = _T("");
	m_out_createtableman = _T("");

	UpdateData(FALSE);

	ClearList();
}

void CInvoiceDlg::OnOutInsert() 
{
	// TODO: Add your control notification handler code here
	if(MBox("添加此條")==0)
	{
		return;
	}
	UpdateData(TRUE);

	if(m_out_goodsunitprice.IsEmpty()!=1)
	{
		if(CheckDat(m_out_goodsunitprice,1)==0)
		{
			AfxMessageBox("單價輸入錯誤");
			return;
		}
	}
	if(m_out_goodsno.IsEmpty()!=1)
	{
		if(CheckDat(m_out_goodsno,0)==0)
		{
			AfxMessageBox("數量輸入錯誤");
			return;
		}
	}
	
	if(m_out_orderform.IsEmpty()==1)
	{
		AfxMessageBox("插入時 訂單號項不能為空");
		return;
	}
	if(m_out_goodsnum.IsEmpty()==1)
	{
		AfxMessageBox("插入時 貨品編號項不能為空");
		return;
	}
	if(m_out_goodsmode.IsEmpty()==1)
	{
		AfxMessageBox("插入時 電鍍項不能為空");
		return;
	}	
	if(m_out_goodsunitprice.IsEmpty()==1)
	{
		AfxMessageBox("插入時 單價項不能為空");
		return;
	}
	if(m_out_goodsno.IsEmpty()==1)
	{
		AfxMessageBox("插入時 數量項不能為空");
		return;
	}

	if(QchOutTable()==0)
	{
		AfxMessageBox("表中已存在此項");
		return;		
	}

	//////////////報表數據
	report_data[report_data_maxno].order_form=m_out_orderform;
	report_data[report_data_maxno].goods_num =m_out_goodsnum;
	report_data[report_data_maxno].goods_mode =m_out_goodsmode;
    report_data[report_data_maxno].goods_unitprice= atof(m_out_goodsunitprice);
    report_data[report_data_maxno].goods_maxno=atol(m_out_goodsno);
	report_data[report_data_maxno].goods_maxprice=report_data[report_data_maxno].goods_maxno* report_data[report_data_maxno].goods_unitprice;
	report_data[report_data_maxno].remark=m_out_remark ;

	//m_out_goodsprice=strtod(report_data[report_data_maxno].goods_maxprice,);

	m_out_goodsprice.Format("%2.2f",report_data[report_data_maxno].goods_maxprice);

	UpdateData(FALSE);

	OutTableSrc();

	report_data_maxno++;
}

int CInvoiceDlg::OutTableSrc()
{
	char str[256];

	sprintf(str,"%05d",m_query_xh);
	m_list_resultout.InsertItem(m_query_xh,str);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
综合久久综合久久| 欧美精品一区二区久久久| 国产欧美中文在线| 国产尤物一区二区在线| 日韩欧美电影在线| 另类调教123区| 精品国产电影一区二区| 国产成人免费视频| 国产日韩欧美电影| 久久丝袜美腿综合| 国产91对白在线观看九色| 国产精品久久久久永久免费观看 | 在线亚洲+欧美+日本专区| 亚洲美女精品一区| 欧美夫妻性生活| 韩国欧美国产1区| 国产精品女人毛片| 欧美三级资源在线| 韩国理伦片一区二区三区在线播放 | 1024精品合集| 欧美亚洲尤物久久| 日本不卡视频在线| 国产丝袜在线精品| 欧美亚洲动漫另类| 精品一区二区三区久久| 国产精品萝li| 6080国产精品一区二区| 国产成人在线色| 亚洲一线二线三线久久久| 欧美成人video| 91免费观看在线| 奇米精品一区二区三区在线观看 | 欧美极品aⅴ影院| 在线精品视频一区二区三四| 蜜乳av一区二区三区| 中文字幕在线不卡一区二区三区| 欧美中文字幕一二三区视频| 精品一区二区三区免费毛片爱| 亚洲欧洲国产日韩| 日韩欧美激情在线| 91久久一区二区| 国产精品资源在线观看| 一级日本不卡的影视| 久久精品网站免费观看| 欧美综合色免费| 麻豆91在线观看| 国产91富婆露脸刺激对白| 欧美高清视频不卡网| 国产精品99久久久久久似苏梦涵 | 欧美精品三级在线观看| 国产成人精品三级麻豆| 久久综合九色综合97婷婷女人| 99久精品国产| 一本色道久久加勒比精品| 色婷婷亚洲精品| 欧美色综合网站| 在线日韩av片| 欧美丰满嫩嫩电影| 日韩欧美一卡二卡| 久久婷婷一区二区三区| 国产午夜亚洲精品羞羞网站| 日本一区二区三区高清不卡| 欧美精品一区二区在线播放| 日本一区二区三区久久久久久久久不 | 中文字幕乱码亚洲精品一区| 国产欧美精品一区| 亚洲欧美一区二区久久 | 亚洲第一福利视频在线| 三级久久三级久久久| 九九精品一区二区| 国产不卡在线播放| 日本精品一区二区三区高清 | 亚洲尤物在线视频观看| 视频一区视频二区中文字幕| 久久精品72免费观看| 国产69精品久久99不卡| 91黄色免费版| 精品动漫一区二区三区在线观看| 国产亚洲综合在线| 亚洲精品视频观看| 麻豆91在线观看| 91亚洲精品乱码久久久久久蜜桃| 欧美理论片在线| 国产视频一区二区在线| 一区二区三区日韩欧美| 久久草av在线| 91香蕉视频mp4| 日韩一级片网站| 亚洲视频一区在线| 奇米精品一区二区三区四区| 夫妻av一区二区| 欧美老年两性高潮| 中文字幕av免费专区久久| 偷拍日韩校园综合在线| 国产盗摄视频一区二区三区| 欧美日韩一级视频| 国产亚洲精品超碰| 日本中文一区二区三区| 国产一区二区久久| 欧美亚洲国产一区二区三区va| 国产亚洲精品7777| 老司机精品视频在线| 日本韩国一区二区三区| 国产三级欧美三级日产三级99 | 久久久国产精华| 亚洲成a人片在线观看中文| 成人中文字幕在线| 日韩一区二区中文字幕| 夜夜嗨av一区二区三区 | 欧美日韩亚洲综合一区二区三区| 久久久美女毛片| 日韩国产精品久久| 91麻豆福利精品推荐| 日韩亚洲欧美中文三级| 亚洲成人一区在线| 一本色道a无线码一区v| 国产人成亚洲第一网站在线播放 | 91国偷自产一区二区开放时间 | 在线电影欧美成精品| 国产精品毛片久久久久久| 日本成人在线网站| 欧美日韩亚洲不卡| 亚洲精品免费电影| 99久久精品久久久久久清纯| 国产丝袜美腿一区二区三区| 久久99日本精品| 日韩欧美色电影| 亚洲va天堂va国产va久| 在线观看亚洲精品视频| 亚洲激情自拍视频| 色狠狠色狠狠综合| 一区二区三区.www| 色婷婷综合中文久久一本| 综合在线观看色| 99国产欧美另类久久久精品| 日本一区二区电影| 国产成人精品免费| 国产片一区二区| 成人av电影观看| 中文在线一区二区| 成人免费高清视频| 成人免费在线播放视频| 色香蕉成人二区免费| 亚洲免费av观看| 色哦色哦哦色天天综合| 一区二区三区资源| 欧美日韩一区二区电影| 日韩电影一二三区| 日韩精品专区在线| 国产乱理伦片在线观看夜一区| 欧美不卡在线视频| 国产乱妇无码大片在线观看| 国产精品嫩草99a| 91在线视频观看| 亚洲一级在线观看| 欧美一区二区人人喊爽| 日韩欧美123| 亚洲成人激情社区| 欧美久久一二区| 日本成人超碰在线观看| 欧美变态tickling挠脚心| 国产做a爰片久久毛片| 日本一区二区三区在线不卡| 91在线视频官网| 五月婷婷久久综合| 日韩欧美www| 北条麻妃一区二区三区| 亚洲免费高清视频在线| 欧美精品v国产精品v日韩精品 | 国产精品不卡在线观看| 色999日韩国产欧美一区二区| 午夜影院久久久| 久久久久高清精品| 一本大道久久精品懂色aⅴ| 日韩电影在线免费| 国产精品久久久久久久久搜平片| 久久久精品免费免费| 国产福利91精品一区二区三区| 亚洲男人的天堂av| 日韩欧美国产一二三区| 成人黄色在线视频| 波多野结衣欧美| 亚洲成人av一区二区三区| 精品国产伦理网| 欧美综合在线视频| 国产乱一区二区| 亚洲综合丝袜美腿| 精品少妇一区二区三区视频免付费| 成人h版在线观看| 日韩av一级片| 亚洲视频你懂的| 2019国产精品| 欧美日韩精品二区第二页| 国产精品一二一区| 五月天国产精品| 亚洲欧美一区二区久久| 久久综合色8888| 欧美日韩二区三区| 91视频免费播放| 国产精品77777|