亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
青青国产91久久久久久| 精品国产成人系列| 亚洲欧美激情小说另类| 97久久精品人人做人人爽| 国产精品毛片久久久久久久| 91亚洲国产成人精品一区二三| 亚洲欧美一区二区三区国产精品| 99re视频这里只有精品| 亚洲国产成人porn| 日韩免费观看高清完整版在线观看| 老司机精品视频在线| 国产女主播在线一区二区| 99国产欧美另类久久久精品| 亚洲国产成人av网| 久久这里只有精品视频网| 成人免费观看av| 亚洲国产精品一区二区久久| 日韩一区二区三区视频在线| 国产精品一区二区在线观看不卡| 中文一区一区三区高中清不卡| 97精品超碰一区二区三区| 爽好久久久欧美精品| 欧美精品一区二区久久久| 99久久婷婷国产综合精品电影| 亚洲成人免费影院| 国产午夜精品一区二区三区视频| 91天堂素人约啪| 老司机免费视频一区二区三区| 中文字幕av一区二区三区高| 欧美日韩高清一区二区三区| 国产成人精品一区二区三区四区 | 亚洲一级片在线观看| 日韩欧美中文字幕一区| fc2成人免费人成在线观看播放 | 婷婷丁香久久五月婷婷| 久久九九99视频| 欧美日韩一级视频| 成人午夜免费电影| 蜜臀精品一区二区三区在线观看| 中文字幕中文乱码欧美一区二区| 在线不卡免费欧美| 91同城在线观看| 国产精品1024久久| 日本麻豆一区二区三区视频| 亚洲三级在线看| 国产亚洲一本大道中文在线| 欧美日韩成人综合| 一本一道综合狠狠老| 国产精品911| 免费观看在线综合色| 亚洲综合清纯丝袜自拍| 国产精品网站在线观看| 精品免费国产一区二区三区四区| 在线影视一区二区三区| 波多野结衣一区二区三区| 久久丁香综合五月国产三级网站| 亚洲第一搞黄网站| 亚洲精品中文在线观看| 中文字幕第一区第二区| 久久久蜜臀国产一区二区| 宅男在线国产精品| 欧美日韩成人综合在线一区二区 | 麻豆久久久久久久| 日韩高清在线电影| 亚洲成人免费在线| 亚洲高清三级视频| 亚洲一区中文在线| 成人性生交大片| 久久er精品视频| 蜜桃视频一区二区三区在线观看 | 日韩毛片在线免费观看| 国产日韩欧美a| 国产午夜亚洲精品午夜鲁丝片 | 国产精品一二三在| 韩国成人精品a∨在线观看| 秋霞电影一区二区| 日韩黄色在线观看| 日本不卡视频在线| 日本aⅴ免费视频一区二区三区| 五月激情综合婷婷| 免费看精品久久片| 狠狠色丁香九九婷婷综合五月| 久久精品免费观看| 国产伦精品一区二区三区视频青涩 | 精品美女一区二区| 久久影院视频免费| 久久只精品国产| 欧美激情中文字幕一区二区| 国产精品久久毛片| 亚洲天堂网中文字| 亚洲一区二区av在线| 午夜精彩视频在线观看不卡| 日韩av在线发布| 狠狠色丁香久久婷婷综合丁香| 韩国在线一区二区| 99久久免费视频.com| 欧美曰成人黄网| 日韩精品一区二区三区中文不卡| 久久影院视频免费| 极品美女销魂一区二区三区| 精品一区二区三区久久| 成人污视频在线观看| 欧美亚洲一区二区在线观看| 欧美一区二区网站| 国产午夜三级一区二区三| 亚洲女与黑人做爰| 九色|91porny| 色综合中文字幕| 欧美一级日韩一级| 亚洲欧洲韩国日本视频| 日日夜夜免费精品视频| 国产精品一区二区久激情瑜伽 | 色综合久久综合| 51精品国自产在线| 国产精品私房写真福利视频| 亚洲国产成人av| 国产精品91xxx| 欧美日韩精品是欧美日韩精品| 久久婷婷国产综合精品青草| 亚洲免费观看高清在线观看| 久久爱另类一区二区小说| 色综合天天性综合| 日韩欧美不卡一区| 夜夜精品浪潮av一区二区三区| 久久国产精品第一页| 在线观看日产精品| 国产亚洲精品精华液| 天天操天天色综合| 91女人视频在线观看| 久久久精品欧美丰满| 亚欧色一区w666天堂| 成年人午夜久久久| 日韩欧美久久久| 夜夜嗨av一区二区三区中文字幕| 欧美一区二区三区系列电影| 国产精品久久久一本精品| 精品中文字幕一区二区小辣椒| 色老汉一区二区三区| 国产色产综合产在线视频 | 久久精品免费观看| 欧美怡红院视频| 亚洲图片你懂的| 国产河南妇女毛片精品久久久| 777xxx欧美| 夜夜精品视频一区二区| 99re成人精品视频| 亚洲国产精品高清| 国内精品写真在线观看| 日韩一区二区在线看片| 亚洲超碰97人人做人人爱| 色综合久久中文综合久久97| 国产精品久久午夜夜伦鲁鲁| 国产精品自拍网站| 2021久久国产精品不只是精品| 日韩精品午夜视频| 在线电影一区二区三区| 亚洲宅男天堂在线观看无病毒| 99riav一区二区三区| 国产精品入口麻豆九色| 国产成人免费视频网站| 国产三级一区二区三区| 国产一区二区91| 久久久久久久性| 国产精品一区二区三区网站| 久久婷婷综合激情| 国产精品1区2区| 中文字幕不卡在线观看| 成人黄动漫网站免费app| 国产偷v国产偷v亚洲高清| 国产精品一区二区无线| 日本一区二区综合亚洲| 成人激情动漫在线观看| 国产精品美女久久久久久| av综合在线播放| 一区二区三区精品久久久| 欧美亚州韩日在线看免费版国语版| 亚洲一区影音先锋| 欧美人与禽zozo性伦| 日韩一区精品视频| 精品国产乱码久久久久久老虎| 韩国视频一区二区| 中文字幕不卡一区| 成人美女在线观看| 亚洲精品成人少妇| 91精品国产综合久久小美女| 麻豆国产欧美一区二区三区| 久久久久久影视| www.成人网.com| 亚洲高清三级视频| 日韩美女一区二区三区| 国产传媒一区在线| 亚洲精品va在线观看| 337p亚洲精品色噜噜狠狠| 国产一区二区在线视频| 最新热久久免费视频| 欧美日韩一区二区三区免费看| 毛片一区二区三区| 中文字幕一区不卡| 欧美老女人在线| 国产福利不卡视频|