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

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

?? clientssaleplan.cpp

?? 基于VC+SQL SERVER環境開發的企業商品銷售系統.完整的數據庫和原代碼
?? CPP
?? 第 1 頁 / 共 4 頁
字號:
// ClientsSalePlan.cpp : implementation file
//

#include "stdafx.h"
#include "Sale.h"
#include "ClientsSalePlan.h"
#include "SelectClient.h"
#include "Affirm.h"

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

/////////////////////////////////////////////////////////////////////////////
// CClientsSalePlan dialog


CClientsSalePlan::CClientsSalePlan(CWnd* pParent /*=NULL*/)
	: CDialog(CClientsSalePlan::IDD, pParent)
{
	//{{AFX_DATA_INIT(CClientsSalePlan)
	m_planID = _T("");
	m_planYear = _T("");
	m_formDate = COleDateTime::GetCurrentTime();
	m_remark = _T("");
	//}}AFX_DATA_INIT
}


void CClientsSalePlan::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CClientsSalePlan)
	DDX_Control(pDX, IDC_LIST1, m_clientSalePlanList);
	DDX_Text(pDX, IDC_planID, m_planID);
	DDX_Text(pDX, IDC_planYear, m_planYear);
	DDX_Text(pDX, IDC_formDate, m_formDate);
	DDX_Text(pDX, IDC_remark, m_remark);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CClientsSalePlan, CDialog)
	//{{AFX_MSG_MAP(CClientsSalePlan)
	ON_BN_CLICKED(IDC_exit, OnExit)
	ON_BN_CLICKED(IDC_save, OnSave)
	ON_BN_CLICKED(IDC_deleteLine, OnDeleteLine)
	ON_BN_CLICKED(IDC_addLine, OnAddLine)
	ON_BN_CLICKED(IDC_delete, OnDelete)
	ON_BN_CLICKED(IDC_modify, OnModify)
	ON_BN_CLICKED(IDC_new, OnNew)
	ON_BN_CLICKED(IDC_lastPage, OnLastPage)
	ON_BN_CLICKED(IDC_nextPage, OnNextPage)
	ON_BN_CLICKED(IDC_prevPage, OnPrevPage)
	ON_BN_CLICKED(IDC_firstPage, OnFirstPage)
	ON_NOTIFY(NM_CLICK, IDC_LIST1, OnClickClientSalePlanList)
	ON_BN_CLICKED(IDC_auditing, OnAuditing)
	ON_BN_CLICKED(IDC_cancellation, OnCancellation)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CClientsSalePlan message handlers

void CClientsSalePlan::OnExit() 
{
	this->OnCancel();
}

void CClientsSalePlan::OnSave() 
{
	UpdateData(true);
	_RecordsetPtr m_pRecordset;    //用于創建一個查詢記錄集


	//----------------------------------------------
	CString strSQL;
	//	AfxMessageBox(TreeCurrent);
	if(flag==1)         //添加
	{
		strSQL="SELECT * FROM clientSalePlan" ;	

		try
		{
			HRESULT hTRes;
			hTRes = m_pRecordset.CreateInstance(_T("ADODB.Recordset"));
			if (SUCCEEDED(hTRes))
			{
				//----------------------------------------------------
				hTRes = m_pRecordset->Open((LPTSTR)strSQL.GetBuffer(130),
					((CSaleApp*)AfxGetApp())->m_pConn.GetInterfacePtr(),
					adOpenDynamic,adLockPessimistic,adCmdText);
				if(SUCCEEDED(hTRes))
				{
					TRACE(_T("連接成功!\n"));
					m_pSalePlanRecordset->AddNew();
					m_pSalePlanRecordset->PutCollect("planID",_variant_t(m_planID));
					m_pSalePlanRecordset->PutCollect("planYear",_variant_t(m_planYear));
					m_pSalePlanRecordset->PutCollect("remark",_variant_t(m_remark));
					m_pSalePlanRecordset->PutCollect("planType",_variant_t("c"));
					m_pSalePlanRecordset->PutCollect("formDate",_variant_t(m_formDate));
					m_pSalePlanRecordset->PutCollect("checked",_variant_t("F"));
					m_pSalePlanRecordset->Update();
					//------------------------------------------
					for(int i=0;i<m_clientSalePlanList.GetItemCount();i++)
					{

						m_pRecordset->AddNew();
						
						m_pRecordset->PutCollect("planID",_variant_t(m_planID));
						m_pRecordset->PutCollect("clientID",_variant_t(m_clientSalePlanList.GetItemText(i,0)));
						//以下插入每月的銷售計劃數額
						m_pRecordset->PutCollect("yearPlan",_variant_t(m_clientSalePlanList.GetItemText(i,2)));
						m_pRecordset->PutCollect("yearRatio",_variant_t(m_clientSalePlanList.GetItemText(i,3)));
						m_pRecordset->PutCollect("JanPlan",_variant_t(m_clientSalePlanList.GetItemText(i,4)));
						m_pRecordset->PutCollect("JanRatio",_variant_t(m_clientSalePlanList.GetItemText(i,5)));
						m_pRecordset->PutCollect("FebPlan",_variant_t(m_clientSalePlanList.GetItemText(i,6)));
						m_pRecordset->PutCollect("FebRatio",_variant_t(m_clientSalePlanList.GetItemText(i,7)));
						m_pRecordset->PutCollect("MarPlan",_variant_t(m_clientSalePlanList.GetItemText(i,8)));
						m_pRecordset->PutCollect("MarRatio",_variant_t(m_clientSalePlanList.GetItemText(i,9)));
						m_pRecordset->PutCollect("AprPlan",_variant_t(m_clientSalePlanList.GetItemText(i,10)));
						m_pRecordset->PutCollect("AprRatio",_variant_t(m_clientSalePlanList.GetItemText(i,11)));
						m_pRecordset->PutCollect("MayPlan",_variant_t(m_clientSalePlanList.GetItemText(i,12)));
						m_pRecordset->PutCollect("MayRatio",_variant_t(m_clientSalePlanList.GetItemText(i,13)));
						m_pRecordset->PutCollect("JunPlan",_variant_t(m_clientSalePlanList.GetItemText(i,14)));
						m_pRecordset->PutCollect("JunRatio",_variant_t(m_clientSalePlanList.GetItemText(i,15)));
						m_pRecordset->PutCollect("JulPlan",_variant_t(m_clientSalePlanList.GetItemText(i,16)));
						m_pRecordset->PutCollect("JulRatio",_variant_t(m_clientSalePlanList.GetItemText(i,17)));
						m_pRecordset->PutCollect("AugPlan",_variant_t(m_clientSalePlanList.GetItemText(i,18)));
						m_pRecordset->PutCollect("AugRatio",_variant_t(m_clientSalePlanList.GetItemText(i,19)));
						m_pRecordset->PutCollect("SepPlan",_variant_t(m_clientSalePlanList.GetItemText(i,20)));
						m_pRecordset->PutCollect("SepRatio",_variant_t(m_clientSalePlanList.GetItemText(i,21)));
						m_pRecordset->PutCollect("OctPlan",_variant_t(m_clientSalePlanList.GetItemText(i,22)));
						m_pRecordset->PutCollect("OctRatio",_variant_t(m_clientSalePlanList.GetItemText(i,23)));
						m_pRecordset->PutCollect("NovPlan",_variant_t(m_clientSalePlanList.GetItemText(i,24)));
						m_pRecordset->PutCollect("NovRatio",_variant_t(m_clientSalePlanList.GetItemText(i,25)));
						m_pRecordset->PutCollect("DecPlan",_variant_t(m_clientSalePlanList.GetItemText(i,26)));
						m_pRecordset->PutCollect("DecRatio",_variant_t(m_clientSalePlanList.GetItemText(i,27)));
						m_pRecordset->Update();
					}
				
					AfxMessageBox("插入成功!");
				}
			}
		}
		catch(_com_error e)///捕捉異常
		{
			CString errormessage;
			MessageBox("創建記錄集失敗!","錯誤");
		}
	}
	else if(flag==2)      //修改
	{
		_variant_t RecordsAffected;
		strSQL="delete from clientSalePlan where planID='";
		strSQL=strSQL+m_planID+"'";
		(((CSaleApp*)AfxGetApp())->m_pConn)->Execute((_bstr_t)strSQL,&RecordsAffected,adCmdText);
		strSQL="SELECT * FROM clientSalePlan " ;	
		try
		{
			HRESULT hTRes;
			hTRes = m_pRecordset.CreateInstance(_T("ADODB.Recordset"));
			if (SUCCEEDED(hTRes))
			{
				//----------------------------------------------------
				hTRes = m_pRecordset->Open((LPTSTR)strSQL.GetBuffer(130),
					((CSaleApp*)AfxGetApp())->m_pConn.GetInterfacePtr(),
					adOpenDynamic,adLockPessimistic,adCmdText);
				if(SUCCEEDED(hTRes))
				{
					TRACE(_T("連接成功!\n"));
				///	m_pSalePlanRecordset->PutCollect("planID",_variant_t(m_planID));
				//	m_pSalePlanRecordset->PutCollect("planYear",_variant_t(m_planYear));
					m_pSalePlanRecordset->PutCollect("remark",_variant_t(m_remark));
					m_pSalePlanRecordset->PutCollect("checked",_variant_t("F"));
					m_pSalePlanRecordset->Update();
					//------------------------------------------
					for(int i=0;i<m_clientSalePlanList.GetItemCount();i++)
					{
						m_pRecordset->AddNew();
						m_pRecordset->PutCollect("planID",_variant_t(m_planID));
						m_pRecordset->PutCollect("clientID",_variant_t(m_clientSalePlanList.GetItemText(i,0)));
						//以下插入每月的銷售計劃數額
						m_pRecordset->PutCollect("yearPlan",_variant_t(m_clientSalePlanList.GetItemText(i,2)));
						m_pRecordset->PutCollect("yearRatio",_variant_t(m_clientSalePlanList.GetItemText(i,3)));
						m_pRecordset->PutCollect("JanPlan",_variant_t(m_clientSalePlanList.GetItemText(i,4)));
						m_pRecordset->PutCollect("JanRatio",_variant_t(m_clientSalePlanList.GetItemText(i,5)));
						m_pRecordset->PutCollect("FebPlan",_variant_t(m_clientSalePlanList.GetItemText(i,6)));
						m_pRecordset->PutCollect("FebRatio",_variant_t(m_clientSalePlanList.GetItemText(i,7)));
						m_pRecordset->PutCollect("MarPlan",_variant_t(m_clientSalePlanList.GetItemText(i,8)));
						m_pRecordset->PutCollect("MarRatio",_variant_t(m_clientSalePlanList.GetItemText(i,9)));
						m_pRecordset->PutCollect("AprPlan",_variant_t(m_clientSalePlanList.GetItemText(i,10)));
						m_pRecordset->PutCollect("AprRatio",_variant_t(m_clientSalePlanList.GetItemText(i,11)));
						m_pRecordset->PutCollect("MayPlan",_variant_t(m_clientSalePlanList.GetItemText(i,12)));
						m_pRecordset->PutCollect("MayRatio",_variant_t(m_clientSalePlanList.GetItemText(i,13)));
						m_pRecordset->PutCollect("JunPlan",_variant_t(m_clientSalePlanList.GetItemText(i,14)));
						m_pRecordset->PutCollect("JunRatio",_variant_t(m_clientSalePlanList.GetItemText(i,15)));
						m_pRecordset->PutCollect("JulPlan",_variant_t(m_clientSalePlanList.GetItemText(i,16)));
						m_pRecordset->PutCollect("JulRatio",_variant_t(m_clientSalePlanList.GetItemText(i,17)));
						m_pRecordset->PutCollect("AugPlan",_variant_t(m_clientSalePlanList.GetItemText(i,18)));
						m_pRecordset->PutCollect("AugRatio",_variant_t(m_clientSalePlanList.GetItemText(i,19)));
						m_pRecordset->PutCollect("SepPlan",_variant_t(m_clientSalePlanList.GetItemText(i,20)));
						m_pRecordset->PutCollect("SepRatio",_variant_t(m_clientSalePlanList.GetItemText(i,21)));
						m_pRecordset->PutCollect("OctPlan",_variant_t(m_clientSalePlanList.GetItemText(i,22)));
						m_pRecordset->PutCollect("OctRatio",_variant_t(m_clientSalePlanList.GetItemText(i,23)));
						m_pRecordset->PutCollect("NovPlan",_variant_t(m_clientSalePlanList.GetItemText(i,24)));
						m_pRecordset->PutCollect("NovRatio",_variant_t(m_clientSalePlanList.GetItemText(i,25)));
						m_pRecordset->PutCollect("DecPlan",_variant_t(m_clientSalePlanList.GetItemText(i,26)));
						m_pRecordset->PutCollect("DecRatio",_variant_t(m_clientSalePlanList.GetItemText(i,27)));
						
						m_pRecordset->Update();
					}
				
					AfxMessageBox("插入成功!");
				}
			}
		}
		catch(_com_error e)///捕捉異常
		{
			CString errormessage;
			MessageBox("創建記錄集失敗!","錯誤");
		}
	}
	bt_checked->EnableWindow(true);
	bt_cancellation->EnableWindow(false);
	UpdateData(false);	
}

void CClientsSalePlan::OnDeleteLine() 
{
	CAffirm dlg;
	if(dlg.DoModal()!=IDOK)
	{
		return;
	}	
	POSITION pos = m_clientSalePlanList.GetFirstSelectedItemPosition();
	if(pos)
	{
		int nFirstSelItem = m_clientSalePlanList.GetNextSelectedItem(pos);
		m_clientSalePlanList.DeleteItem(nFirstSelItem);
	}
}

void CClientsSalePlan::OnAddLine() 
{
	CSelectClient dlg;
	if(dlg.DoModal()==IDOK)
	{
		UpdateData(true);
		int i=m_clientSalePlanList.GetItemCount();
		m_clientSalePlanList.InsertItem(i,dlg.clientID);
		m_clientSalePlanList.SetItemText(i,1,dlg.clientName);
		
		CString str;
		double yearPlan=0;
		double yearRatio=0;
		str.Format("%f",dlg.m_JanPlan);
		m_clientSalePlanList.SetItemText(i,4,str);
		yearPlan+=dlg.m_JanPlan;
		str.Format("%f",dlg.m_JanRatio);
		m_clientSalePlanList.SetItemText(i,5,str);
		yearRatio+=dlg.m_JanRatio;
		str.Format("%f",dlg.m_FebPlan);
		m_clientSalePlanList.SetItemText(i,6,str);
		yearPlan+=dlg.m_FebPlan;
		str.Format("%f",dlg.m_FebRatio);
		m_clientSalePlanList.SetItemText(i,7,str);
		yearRatio+=dlg.m_FebRatio;
		str.Format("%f",dlg.m_MarPlan);
		m_clientSalePlanList.SetItemText(i,8,str);
		yearPlan+=dlg.m_MarPlan;
		str.Format("%f",dlg.m_MarRatio);
		m_clientSalePlanList.SetItemText(i,9,str);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产欧美在线| 国产精品正在播放| 久久er精品视频| 国产一区二区久久| 极品少妇一区二区| 91免费小视频| 日韩午夜av电影| 成人欧美一区二区三区| 亚洲国产成人av网| 韩国成人在线视频| 成人动漫一区二区在线| 欧美性三三影院| 中文字幕中文字幕一区| 日韩激情在线观看| heyzo一本久久综合| 在线不卡中文字幕播放| 国产精品日韩成人| 免费成人性网站| 国产麻豆视频一区二区| 欧美三级欧美一级| 亚洲欧美一区二区不卡| 国产一区亚洲一区| 91在线精品一区二区| xnxx国产精品| 亚洲伊人色欲综合网| 成人av资源下载| 欧美一区二区精美| 一区二区三区国产豹纹内裤在线| 国产一区二区不卡老阿姨| 国产69精品久久777的优势| 日韩一区二区三区高清免费看看 | 亚洲福利视频一区| 成人午夜精品在线| 国产亚洲欧美色| 精品在线免费视频| 欧美一区二区三区人| 亚洲国产精品久久久久婷婷884 | 热久久一区二区| 欧美在线一区二区| 亚洲免费在线视频| 91麻豆国产精品久久| 国产欧美一区视频| 麻豆视频一区二区| 欧美一级艳片视频免费观看| 亚洲宅男天堂在线观看无病毒| 精品一区二区免费| 久久青草欧美一区二区三区| 国内外精品视频| 精品国产乱码久久久久久图片 | 国产精品1024久久| 久久夜色精品一区| 国产麻豆成人精品| 2023国产精品视频| 国产伦精品一区二区三区在线观看| 欧美一区二区久久久| 日本亚洲最大的色成网站www| 色综合久久综合网欧美综合网| 亚洲天堂久久久久久久| 国产99精品国产| 综合久久给合久久狠狠狠97色| 99久久99久久综合| 亚洲国产日日夜夜| 日韩一区二区三区观看| 日韩一区二区在线观看视频| 蜜桃精品视频在线| 国产精品美女视频| 7777女厕盗摄久久久| 国产福利精品导航| 亚洲午夜精品网| 国产农村妇女毛片精品久久麻豆 | 欧美mv和日韩mv的网站| aaa欧美色吧激情视频| 日韩成人一区二区三区在线观看| 2023国产精品| 欧美日韩亚洲高清一区二区| 福利电影一区二区三区| 三级在线观看一区二区| 国产精品午夜在线观看| 欧美一区二区三区色| 色狠狠色狠狠综合| 国产剧情一区二区| 日本不卡一区二区三区| 亚洲黄色小说网站| 国产日韩欧美在线一区| 337p亚洲精品色噜噜| 97se亚洲国产综合自在线不卡| 久久99久久精品| 午夜视频在线观看一区二区| 国产精品久久二区二区| 久久久亚洲综合| 欧美一区二区在线免费播放| 色婷婷av一区二区三区软件 | 国产精品欧美久久久久无广告 | 欧美日本一区二区| 99精品欧美一区二区三区小说 | 69av一区二区三区| 色综合天天在线| 福利一区福利二区| 国产精品夜夜爽| 久久国产精品一区二区| 丝袜美腿高跟呻吟高潮一区| 樱花影视一区二区| 亚洲激情自拍偷拍| 一区二区三区91| 亚洲乱码国产乱码精品精可以看| 国产精品女同互慰在线看| 国产亚洲婷婷免费| 久久青草欧美一区二区三区| 欧美本精品男人aⅴ天堂| 欧美一区永久视频免费观看| 777色狠狠一区二区三区| 欧美人xxxx| 91精品免费观看| 欧美日韩在线综合| 欧美日本国产视频| 91精品国产综合久久久久久久| 欧美日韩的一区二区| 91精品免费观看| 欧美精品一区二区三| 久久久久亚洲综合| 欧美国产激情二区三区 | 欧美不卡激情三级在线观看| 精品国产髙清在线看国产毛片| 日韩丝袜情趣美女图片| www久久精品| 国产精品国产三级国产专播品爱网 | eeuss影院一区二区三区| 成人精品一区二区三区中文字幕| jizz一区二区| 欧美视频在线观看一区二区| 宅男噜噜噜66一区二区66| 欧美精品一区二区三区视频| 中文一区一区三区高中清不卡| 亚洲色图欧美激情| 免费精品视频在线| 成人永久看片免费视频天堂| 色综合久久久久综合99| 欧美三级电影精品| 欧美va亚洲va香蕉在线| 亚洲国产精品国自产拍av| 又紧又大又爽精品一区二区| 日韩av网站免费在线| 国产suv精品一区二区6| 91成人免费在线| 久久伊99综合婷婷久久伊| 亚洲人成网站精品片在线观看| 午夜a成v人精品| 国产精品亚洲一区二区三区妖精| 91麻豆自制传媒国产之光| 欧美色涩在线第一页| 精品1区2区在线观看| 亚洲欧美日韩一区| 另类综合日韩欧美亚洲| 91美女蜜桃在线| 精品国产免费人成在线观看| 亚洲精品国产高清久久伦理二区| 久久99国产精品久久99果冻传媒| 97久久超碰国产精品| 欧美刺激午夜性久久久久久久| 最近日韩中文字幕| 国产精品自拍毛片| 欧美日韩高清一区二区三区| 国产精品黄色在线观看| 久久 天天综合| 欧美色视频在线| 最新日韩在线视频| 国产永久精品大片wwwapp| 欧美男生操女生| 自拍偷拍亚洲综合| 高清视频一区二区| 精品久久久久久久一区二区蜜臀| 一区二区三区美女| 91在线精品一区二区| 久久久久九九视频| 久久精品久久久精品美女| 欧美午夜精品久久久久久孕妇| 久久精品视频在线看| 美女视频黄频大全不卡视频在线播放| 91猫先生在线| 中文字幕亚洲成人| 国产不卡在线播放| 精品国产自在久精品国产| 日韩黄色免费电影| 欧美男生操女生| 午夜视频一区在线观看| 欧美日韩一区中文字幕| 夜夜嗨av一区二区三区中文字幕 | 亚洲女人小视频在线观看| 国产精品1区二区.| 久久久精品综合| 国产成a人无v码亚洲福利| 国产亚洲一本大道中文在线| 国产在线不卡一卡二卡三卡四卡| 日韩亚洲电影在线| 日本aⅴ免费视频一区二区三区| 欧美日韩高清一区二区不卡| 午夜视频在线观看一区| 91精品欧美久久久久久动漫| 美日韩黄色大片| 精品不卡在线视频|