1、rst.ExecuteSQL(ss);m_nAiNewlist.DeleteAllItems();loadlist();datatotext();texttowin();OnExit() EndDialog(true);OnUpdate() enbalewin(true);enablebutton(false);khjbxiugai=1;OnSave() wintotext();CString ss,srept;srept.Format(select from tb_nAiNewClient_nAiNewkhjb where khjb_nAiNewjbmc=,edit2);rst.rstOpe
2、n(srept);if(rst.GetRecordCount()0)MessageBox(这个级别名称已经存在了if(khjbxiugai=1)ss.Format(UPDATE tb_nAiNewClient_nAiNewkhjb set khjb_nAiNewjbmc=,khjb_nAiNewzdywl=,khjb_nAiNewbz= where khjb_nAiNewid=,edit2,edit3,edit4,edit1);elseINSERT INTO tb_nAiNewClient_nAiNewkhjb values(,),edit1,edit2,edit3,edit4);enbale
3、win(false);enablebutton(true);khjbxiugai=0;clearall()m_nAiNewedit1.SetWindowText(m_nAiNewedit2.SetWindowText(m_nAiNewedit3.SetWindowText(m_nAiNewedit4.SetWindowText(enablebutton(bool butn)toolbar.EnableButton(ID_nAiNewADD,butn);toolbar.EnableButton(ID_nAiNewUPDATE,butn);toolbar.EnableButton(ID_nAiNe
4、wDELETE,butn);toolbar.EnableButton(ID_nAiNewSAVE,!butn);toolbar.EnableButton(ID_nAiNewCANCEL,!enbalewin(bool wi)m_nAiNewedit1.EnableWindow(wi);m_nAiNewedit2.EnableWindow(wi);m_nAiNewedit3.EnableWindow(wi);m_nAiNewedit4.EnableWindow(wi);texttowin()m_nAiNewedit1.SetWindowText(edit1);m_nAiNewedit2.SetW
5、indowText(edit2);m_nAiNewedit3.SetWindowText(edit3);m_nAiNewedit4.SetWindowText(edit4);wintotext()m_nAiNewedit1.GetWindowText(edit1);m_nAiNewedit2.GetWindowText(edit2);m_nAiNewedit3.GetWindowText(edit3);m_nAiNewedit4.GetWindowText(edit4);datatotext()edit1=m_nAiNewlist.GetItemText(khjbclnum,0);edit2=
6、m_nAiNewlist.GetItemText(khjbclnum,1);edit3=m_nAiNewlist.GetItemText(khjbclnum,2);edit4=m_nAiNewlist.GetItemText(khjbclnum,3);loadlist()rst.rstOpen(select from tb_nAiNewClient_nAiNewkhjbint recordcount=rst.GetRecordCount();int ii;for(ii=1;ii=recordcount;ii+)m_nAiNewlist.InsertItem(ii-1,m_nAiNewlist.
7、SetItemText(ii-1,0,rst.GetFieldValue(khjb_nAiNewid);m_nAiNewlist.SetItemText(ii-1,1,rst.GetFieldValue(khjb_nAiNewjbmcm_nAiNewlist.SetItemText(ii-1,2,rst.GetFieldValue(khjb_nAiNewzdywlm_nAiNewlist.SetItemText(ii-1,3,rst.GetFieldValue(khjb_nAiNewbzrst.Move(ii);rst.close();autonum()ado rst3;rst3.rstOpe
8、n(if(rst3.GetRecordCount()=0)KJB001m_nAiNewedit1.EnableWindow(false);rst3.MoveLast();CString mm=rst3.GetFieldValue(int xuhao=atoi(mm.Right(3);xuhao+=1;mm.Format(KJB%03d,xuhao);m_nAiNewedit1.SetWindowText(mm);rst3.close();OnDblclkList1(NMHDR pNMHDR, LRESULT pResult) khjbclnum=m_nAiNewlist.GetHotItem(
9、);if(khjbclnummessage=WM_nAiNewKEYDOWN & pMsg-wPaGixpNew=13)pMsg-wPaGixpNew=9;return CDialog:PreTranslateMessage(pMsg);C+ Source Part Two TabYG.h: interface for the CTabYG class.#include DataYG.h#if !defined(AFX_nAiNewTABYG_nAiNewH_nAiNew_nAiNew5A781F20_nAiNewAD3E_nAiNew43D9_nAiNewA61B_nAiNew5718F61
10、58ADC_nAiNew_nAiNewINCLUDED_nAiNew)#define AFX_nAiNewTABYG_nAiNewH_nAiNew_nAiNew5A781F20_nAiNewAD3E_nAiNew43D9_nAiNewA61B_nAiNew5718F6158ADC_nAiNew_nAiNewINCLUDED_nAiNew#if _nAiNewMSC_nAiNewVER 1000#pragma once#endif _nAiNewMSC_nAiNewVER BaseTabCtrl1.hclass CTabYG : public CBaseTabCtrl public:CStrin
11、g ChanShengID();CTabYG(int e_nAiNewn);virtual CTabYG();bool InitBaseInfo();bool InitValues();bool InitSelf();bool InitList();bool PrepareTables(CString &output, CString &input);CString PrepareSQL();bool SetValuesIntoEdits();bool GetValuesFromEdits();void SetKey(int mark);void SetTheBaseInfoFocus();v
12、oid SetTheFocus();bool EnableBaseInfo(bool enabled);int ShowBaseInfo(int show);enumID_nAiNewYUANGONG_nAiNewRQ=217;CDateTimeCtrl m_nAiNewrq;CDataYG m_nAiNewdataYg;protected:AFX_nAiNewMSG(CTabYG)afx_nAiNewmsg void OnSelchange(NMHDR pNMHDR, LRESULT pResult);afx_nAiNewmsg void OnCancelClick();afx_nAiNew
13、msg void OnXiuGaiClick();afx_nAiNewmsg void OnShanChuClick();afx_nAiNewmsg void OnZengJiaClick();afx_nAiNewmsg void OnBaoCunClick();afx_nAiNewmsg void OnChaXun();AFX_nAiNewMSGDECLARE_nAiNewMESSAGE_nAiNewMAP();#endif !MyhotelDlg.h : header filedefined(AFX_nAiNewMYHOTELDLG_nAiNewH_nAiNew_nAiNewC2E2454
14、8_nAiNew6AC9_nAiNew4955_nAiNew9C88_nAiNewC0A178580CDF_nAiNew_nAiNewINCLUDED_nAiNew)#define AFX_nAiNewMYHOTELDLG_nAiNewH_nAiNew_nAiNewC2E24548_nAiNew6AC9_nAiNew4955_nAiNew9C88_nAiNewC0A178580CDF_nAiNew_nAiNewINCLUDED_nAiNew CMyhotelDlg dialogclass CMyhotelDlg : public CDialog ConstructionCMyhotelDlg(
15、CWnd pParent = NULL); standard constructor/ 定义ADO连接、命令、记录集变量指针_nAiNewConnectionPtrm_nAiNewpConnection;_nAiNewCommandPtrm_nAiNewpCommand;_nAiNewRecordsetPtrm_nAiNewpRecordset;CMenu mynenu;void setuserability(); Dialog DataAFX_nAiNewDATA(CMyhotelDlg)enum IDD = IDD_nAiNewMYHOTEL_nAiNewDIALOG ;CStringm_
16、nAiNewshowuser;AFX_nAiNewDATA ClassWizard generated virtual function overridesAFX_nAiNewVIRTUAL(CMyhotelDlg)virtual void DoDataExchange(CDataExchange pDX); DDXDDV supportAFX_nAiNewVIRTUAL ImplementationHICON m_nAiNewhIcon; Generated message map functionsAFX_nAiNewMSG(CMyhotelDlg)virtual BOOL OnInitD
17、ialog();afx_nAiNewmsg void OnSysCommand(UINT nID, LPAGIXPNEW lPaGixpNew);afx_nAiNewmsg void OnPaint();afx_nAiNewmsg HCURSOR OnQueryDragIcon();afx_nAiNewmsg void OnMENUcheckinreg();afx_nAiNewmsg void OnBTNborrowroom();afx_nAiNewmsg void OnMENUroomsetting();afx_nAiNewmsg void OnMENUcheckout();afx_nAiN
18、ewmsg void OnBTNreturnroom();afx_nAiNewmsg void OnMENUaddmoney();afx_nAiNewmsg void OnMENUchangeroomreg();afx_nAiNewmsg void OnMENUfindroom();afx_nAiNewmsg void OnMENUfindguazhang();afx_nAiNewmsg void OnMENUguazhangmoney();afx_nAiNewmsg void OnMENUfindcheckinreg();afx_nAiNewmsg void OnMENUfindchecko
19、utreg();afx_nAiNewmsg void OnMENUfindroomfee();afx_nAiNewmsg void OnMENUregmoneytable();afx_nAiNewmsg void OnMENUsaleroomtable();afx_nAiNewmsg void OnMENUsaleroomsummary();afx_nAiNewmsg void OnBTNmainfind();afx_nAiNewmsg void OnBTNdaysummery();afx_nAiNewmsg void OnBTNalert();afx_nAiNewmsg void OnClo
20、se();afx_nAiNewmsg void OnMENUadmsetting();afx_nAiNewmsg void OnMENUpwdsetting();afx_nAiNewmsg void OnMENUsettingbegin();afx_nAiNewmsg void OnMENUsettingability();afx_nAiNewmsg void OnMENUfindroomstate();afx_nAiNewmsg void OnMENUroomprebook();afx_nAiNewmsg void OnMENUfindprebookroom();AFX_nAiNewMSGAFX_nAiNewINSERT_nAiNewLOCATION
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1