首页下载资源后端餐厅管理系统

ZIP餐厅管理系统

love_inter_net5.63MB需要积分:1

资源文件列表:

Database.zip 大约有108个文件
  1. Database/
  2. Database/MyPosDlg.cpp 5.92KB
  3. Database/ClassDlg.cpp 14.19KB
  4. Database/BaseDlg.cpp 1.42KB
  5. Database/BaseDlg.h 1.38KB
  6. Database/CallDlg.cpp 1.48KB
  7. Database/CallDlg.h 1.21KB
  8. Database/CheckDlg.cpp 14.18KB
  9. Database/CheckDlg.h 1.68KB
  10. Database/res/
  11. Database/res/MyPosMFC.ico 1.05KB
  12. Database/res/MyPos.rc2 397B
  13. Database/res/csy.bmp 508.06KB
  14. Database/res/logo.bmp 21.93KB
  15. Database/res/logon.bmp 196.93KB
  16. Database/res/Thumbs.db 26.5KB
  17. Database/res/MyPos.ico 4.19KB
  18. Database/res/csy_yellow.bmp 508.06KB
  19. Database/ClassDlg.h 1.82KB
  20. Database/CleardataDlg.cpp 3.67KB
  21. Database/CleardataDlg.h 1.29KB
  22. Database/Cypos.mdb 872KB
  23. Database/dbgrid32.cpp 6.88KB
  24. Database/dbgrid32.h 2.68KB
  25. Database/image.cpp 5.26KB
  26. Database/image.h 2.58KB
  27. Database/MyPos.opt 103KB
  28. Database/LogonDlg.h 1.27KB
  29. Database/MaterielDlg.h 1.9KB
  30. Database/ModifyqaDlg.cpp 1.14KB
  31. Database/ModifyqaDlg.h 1.21KB
  32. Database/msdgridctrl.cpp 13.75KB
  33. Database/msdgridctrl.h 4.64KB
  34. Database/msdgridctrl1.cpp 13.75KB
  35. Database/msdgridctrl1.h 4.64KB
  36. Database/msdgridctrl2.cpp 13.75KB
  37. Database/msdgridctrl2.h 4.64KB
  38. Database/MyPos.clw 13.07KB
  39. Database/MyPos.dsp 7.53KB
  40. Database/MyPos.dsw 621B
  41. Database/MyPos.h 1.66KB
  42. Database/MyPos.plg 244B
  43. Database/MyPos.rc 925.49KB
  44. Database/MyPosDlg.h 1.73KB
  45. Database/OffdutyDlg.cpp 12.55KB
  46. Database/OffdutyDlg.h 1.46KB
  47. Database/PaymodeDlg.cpp 5.92KB
  48. Database/PaymodeDlg.h 1.42KB
  49. Database/picture.cpp 1.1KB
  50. Database/picture.h 1.26KB
  51. Database/PosDlg.cpp 37.11KB
  52. Database/PosDlg.h 2.55KB
  53. Database/QueryPY.dll 70KB
  54. Database/resource.h 7.47KB
  55. Database/SelectDlg.cpp 8.07KB
  56. Database/SelectDlg.h 1.52KB
  57. Database/Splash.cpp 3.13KB
  58. Database/Splash.h 1.13KB
  59. Database/StatDlg.cpp 16.04KB
  60. Database/StatDlg.h 1.5KB
  61. Database/StdAfx.cpp 207B
  62. Database/StdAfx.h 1.13KB
  63. Database/SysmtDlg.cpp 1.45KB
  64. Database/SysmtDlg.h 1.34KB
  65. Database/SyssetDlg.cpp 3KB
  66. Database/SyssetDlg.h 1.26KB
  67. Database/TabSheet.cpp 2.41KB
  68. Database/TabSheet.h 1.38KB
  69. Database/UserDlg.cpp 12.51KB
  70. Database/UserDlg.h 1.95KB
  71. Database/MyPos.ncb 209KB
  72. Database/Debug/
  73. Database/Debug/msado15.tlh 88.54KB
  74. Database/Debug/msado15.tli 74.84KB
  75. Database/Debug/MyPos.res 762.29KB
  76. Database/Debug/vc60.idb 305KB
  77. Database/Debug/MyPos.pch 7.34MB
  78. Database/Debug/vc60.pdb 564KB
  79. Database/Debug/StdAfx.obj 129.89KB
  80. Database/Debug/SyssetDlg.obj 71.48KB
  81. Database/Debug/SysmtDlg.obj 24.34KB
  82. Database/Debug/StatDlg.obj 156KB
  83. Database/Debug/Splash.obj 20.72KB
  84. Database/Debug/SelectDlg.obj 86.29KB
  85. Database/Debug/PosDlg.obj 307.5KB
  86. Database/Debug/picture.obj 5.25KB
  87. Database/Debug/PaymodeDlg.obj 88.9KB
  88. Database/Debug/OffdutyDlg.obj 118.64KB
  89. Database/Debug/ModifyqaDlg.obj 12.87KB
  90. Database/Debug/image.obj 30.52KB
  91. Database/Debug/CleardataDlg.obj 76KB
  92. Database/Debug/ClassDlg.obj 147.93KB
  93. Database/Debug/CheckDlg.obj 142.92KB
  94. Database/Debug/CallDlg.obj 14.62KB
  95. Database/Debug/BaseDlg.obj 21.33KB
  96. Database/Debug/UserDlg.obj 144.71KB
  97. Database/Debug/TabSheet.obj 14.1KB
  98. Database/Debug/MyPos.pdb 1.02MB
  99. Database/Debug/LogonDlg.obj 59.22KB
  100. Database/Debug/MyPos.ilk 748.99KB
  101. Database/Debug/MyPos.obj 110.56KB
  102. Database/Debug/MyPosDlg.obj 92.06KB
  103. Database/Debug/MaterielDlg.obj 153.47KB
  104. Database/Debug/MyPos.exe 1.41MB
  105. Database/MyPos.aps 789.16KB
  106. Database/MaterielDlg.cpp 15.25KB
  107. Database/LogonDlg.cpp 4.53KB
  108. Database/MyPos.cpp 4.6KB

资源介绍:

根据资料编写的一个餐厅管理系统.拿来和大家分享一下.希望能对数据库管理系统的FAN 有所帮助.....
// PosDlg.cpp : implementation file // #include "stdafx.h" #include "MyPos.h" #include "PosDlg.h" #include "SelectDlg.h" #include "ModifyqaDlg.h" #include "CallDlg.h" #include "CheckDlg.h" #include "OffdutyDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CPosDlg dialog extern CMyPosApp theApp; CPosDlg::CPosDlg(CWnd* pParent /*=NULL*/) : CDialog(CPosDlg::IDD, pParent) { //{{AFX_DATA_INIT(CPosDlg) //}}AFX_DATA_INIT } void CPosDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CPosDlg) DDX_Control(pDX, IDC_EDIT_ACTTOTAL, m_oActtotal); DDX_Control(pDX, IDC_EDIT_TOTAL, m_oTotal); DDX_Control(pDX, IDC_BUTTON_SELMATERIEL, m_oButton); DDX_Control(pDX, IDC_LIST_FORM, m_oFormlist); DDX_Control(pDX, IDC_EDIT_BEGINTIME, m_oBegintime); DDX_Control(pDX, IDC_EDIT_ENDTIME, m_oEndtime); DDX_Control(pDX, IDC_EDIT_CKECK, m_oCheck); DDX_Control(pDX, IDC_EDIT_STATUS, m_oStatus); DDX_Control(pDX, IDC_EDIT_PEASONS, m_oPeasons); DDX_Control(pDX, IDC_EDIT_TABLENO, m_oTableno); DDX_Control(pDX, IDC_LIST_BILL, m_oListbill); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CPosDlg, CDialog) //{{AFX_MSG_MAP(CPosDlg) ON_BN_CLICKED(IDC_BUTTON_ADDF, OnButtonAddf) ON_LBN_SELCHANGE(IDC_LIST_BILL, OnSelchangeListBill) ON_BN_CLICKED(IDC_BUTTON_SELMATERIEL, OnButtonSelmateriel) ON_NOTIFY(NM_DBLCLK, IDC_LIST_FORM, OnDblclkListForm) ON_BN_CLICKED(IDC_BUTTON_CALLF, OnButtonCallf) ON_BN_CLICKED(IDC_BUTTON_DELF, OnButtonDelf) ON_BN_CLICKED(IDC_BUTTON_HIDEF, OnButtonHidef) ON_BN_CLICKED(IDC_BUTTON_CHECKF, OnButtonCheckf) ON_EN_KILLFOCUS(IDC_EDIT_TABLENO, OnKillfocusEditTableno) ON_EN_KILLFOCUS(IDC_EDIT_PEASONS, OnKillfocusEditPeasons) ON_BN_CLICKED(IDC_BUTTON_OFF, OnButtonOff) ON_BN_CLICKED(IDC_BUTTON_FINDF, OnButtonFindf) ON_BN_CLICKED(IDC_BUTTON_LOCALP, OnButtonLocalp) //}}AFX_MSG_MAP ON_MESSAGE(WM_APPLY,OnMyMessage)//Map WM_APPLY message to OnMyMessage function. ON_MESSAGE(WM_CHECKOUT,OnMyCheckMessage)//Map WM_CHECKOUT message to OnMyMessage function. END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CPosDlg message handlers BOOL CPosDlg::OnInitDialog() { CDialog::OnInitDialog(); //设置list控件的文字和背景颜色 m_oFormlist.SetBkColor(RGB(255,255,255)); m_oFormlist.SetTextBkColor(RGB(255,255,255)); //清空list控件的数据 for(int delcolumn=100;delcolumn>=0;delcolumn--) m_oFormlist.DeleteColumn(delcolumn); //设置list对话框的列 DWORD dwStyle; RECT rect; LV_COLUMN lvc; dwStyle = m_oFormlist.GetStyle(); dwStyle |= LVS_EX_GRIDLINES |LVS_EX_FULLROWSELECT |LVS_SHOWSELALWAYS |LVS_EDITLABELS ; m_oFormlist.SetExtendedStyle(dwStyle); m_oFormlist.GetClientRect(&rect); lvc.mask = LVCF_TEXT | LVCF_SUBITEM | LVCF_WIDTH |LVCF_FMT; lvc.fmt=LVCFMT_LEFT; lvc.iSubItem = 0; lvc.pszText = _T("序号"); lvc.cx = 70; m_oFormlist.InsertColumn(1,&lvc); lvc.iSubItem = 1; lvc.pszText = _T("名称"); lvc.cx = 220; m_oFormlist.InsertColumn(2,&lvc); lvc.iSubItem = 2; lvc.pszText = _T("数量"); lvc.cx = 80; m_oFormlist.InsertColumn(3,&lvc); lvc.iSubItem = 3; lvc.pszText = _T("金额"); lvc.cx = 120; m_oFormlist.InsertColumn(4,&lvc); //Add all bill whos state is "等待" to listbill. CString sql="Select * from SALEBILL where STATUS<>'已结帐'"; _RecordsetPtr m_pRecordset; //Must define it in function!!!! try { m_pRecordset.CreateInstance("ADODB.Recordset"); m_pRecordset->Open((_variant_t)sql,_variant_t((IDispatch*)theApp.m_pConnection,true),adOpenStatic,adLockOptimistic,adCmdText); while(!m_pRecordset->adoEOF) { m_oListbill.AddString((LPCTSTR)(_bstr_t)m_pRecordset->GetCollect("ID")); m_pRecordset->MoveNext(); } m_pRecordset->Close(); } catch(_com_error e)///捕捉异常 { CString stemp; stemp.Format("[初始化]读取 '等待' 单据出错:%s",e.ErrorMessage()); AfxMessageBox(stemp); } //Select the last billid in listbox and read its items to listctrl and head to edit. int ncount=m_oListbill.GetCount(); if(ncount>0) { CString sbillid; int nselect; nselect=m_oListbill.SetCurSel(ncount-1); m_oListbill.GetText(nselect,sbillid); ReadBillHead(sbillid); ReadToFormlist(sbillid); } else { //Put the button to the first list row. //将button移到合适的位置并设置其大小 m_oFormlist.GetWindowRect(&rect); m_oButton.MoveWindow(440,95, rect.right/33, rect.bottom/25); m_oButton.BringWindowToTop(); m_oButton.ShowWindow(SW_SHOW);//从隐藏变为显示 } theApp.pWnd=GetSafeHwnd();//Initialize pWnd; return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CPosDlg::OnButtonAddf() { CString snowtime,sfloor,snewid,sbillno; CString sql; _RecordsetPtr m_pRecordset; //Must define it in function!!!! sfloor=GetCompanyFloor(FALSE); //Clear the edit ctrl. m_oTableno.SetWindowText(""); m_oPeasons.SetWindowText(""); //得到系统时间 CTime now=CTime::GetCurrentTime(); snowtime=now.Format(_T("%Y-%m-%d %H:%M:%S")); sbillno=GenNewBillID(); sql="Insert into SALEBILL (ID,BEGINDATE,STATUS,TOTAL,ACTTOTAL,PAYMODE,FLOOR) values ('"+sbillno+"','"+snowtime+"','等待',0,0,1,'"+sfloor+"')"; try { _variant_t RecordsAffected; theApp.m_pConnection->Execute((_bstr_t)sql,&RecordsAffected,adCmdText); } catch(_com_error e)///捕捉异常 { CString temp; temp.Format("[开单]生成单据出错:%s",e.ErrorMessage()); AfxMessageBox(temp); return; } m_oStatus.SetWindowText("等待"); m_oBegintime.SetWindowText(snowtime); m_oTotal.SetWindowText("0.00"); m_oActtotal.SetWindowText("0.00"); m_oListbill.AddString(sbillno); m_oListbill.SelectString(-1,sbillno); theApp.scallid=sbillno;//Get current bill id. m_oFormlist.DeleteAllItems(); RECT rect; m_oFormlist.GetWindowRect(&rect); m_oButton.MoveWindow(440,95, rect.right/40, rect.bottom/35); m_oButton.BringWindowToTop(); m_oButton.ShowWindow(SW_SHOW);//从隐藏变为显示 } CString CPosDlg::GenNewBillID() { CString sql,snowtime; CString sNewID,scurid,snewid; long lnewid,lcount; _RecordsetPtr m_pRecordset; //Must define it in function!!!! //得到系统时间 CTime now=CTime::GetCurrentTime(); snowtime=now.Format(_T("%Y%m%d")); sql="Select count(*) as XXX from SALEBILL where ID like '"+snowtime+"%""'"; lcount=GetRecordCount(sql); if(lcount==0) { sNewID.Format("%s-00001",snowtime); return sNewID; } sql="Select Max(ID) as AAA from SALEBILL where ID like '"+snowtime+"%""'"; try { m_pRecordset.CreateInstance("ADODB.Recordset"); m_pRecordset->Open((_variant_t)sql,_variant_t((IDispatch*)theApp.m_pConnection,true),adOpenStatic,adLockOptimistic,adCmdText); scurid=(LPCTSTR)(_bstr_t)m_pRecordset->GetCollect("AAA"); lnewid=atol(scurid.Right(5))+1; snewid.Format("-%05d",lnewid); sNewID=snowtime+snewid; m_pRecordset->Close(); } catch(_com_error e)///捕捉异常 { CString stemp; stemp.Format("获取最大单据编号出错:%s",e.ErrorMessage()); AfxMessageBox(stemp); } return sNewID; } void CPosDlg::OnSelchangeListBill() { CString stemp,sql,sbillid; int iOption; _RecordsetPtr m_pRecordset; iOption = m_oListbill.GetCurSel(); m_oListbill.GetText(iOption, sbillid);//得到选中项的文本 theApp.scallid=sbillid;//Get current bill id. //Clear the edit ctrl. m_oTableno.SetWindowText(""); m_oPeasons.SetWindowText(""); sql="select * from SALEBILL where ID='"+sbillid+"'"; try { m_pRecordset.CreateInstance("ADODB.Recordset"); m_pRecordset->Open((_variant_t)sql,_variant_t((IDispatch*)theApp.m_pConnection,true),adOpenStatic,adLockOptimistic,adCmdText); if(!m_pRecordset->adoEOF) { m_oTableno.Se
100+评论
captcha