• 大小: 12.18MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-29
  • 语言: C/C++
  • 标签:

资源简介

小型点餐系统的的使用人为管理人员和服务员,基本功能有登陆、菜单设置、点餐、付款、 信息查询、下载与上传等等。 登陆功能:需要提供用户名和密码进入系统。 菜单设置:需要对菜肴进行分类,并对每道菜肴的信息进行编辑。 点餐与付款:服务员通过移动终端记录下客户的点餐内容,而后进行结算。 信息查询:各类信息可以设置不同查询条件进行快速查询,例如菜肴分类、菜肴信息、点餐 信息、账目信息等等。

资源截图

代码片段和文件信息

#include “StdAfx.h“
#include “CeRapi.h“

#ifdef _DEBUG

#undef THIS_FILE
static char THIS_FILE[]=__FILE__;

#define new DEBUG_NEW
#endif

CCeRapi::CCeRapi(void)
{
m_bRapiInitFlag = FALSE;
}

CCeRapi::~CCeRapi(void)
{
}

BOOL CCeRapi::InitRapi()
{
LPTSTR pDllPath = new TCHAR[MAX_PATH + 10];
GetSystemDirectory(pDllPath MAX_PATH);
CString strDllPathName(pDllPath);
strDllPathName += “\\Rapi.dll“;
TRACE(“%s\n“strDllPathName); //C:\WINDOWS\system32\rapi.dll
hInst = LoadLibrary(strDllPathName);
if(hInst)
{
CeRapiInitEx = (pfnFnucA) GetProcAddress(hInst “CeRapiInitEx“);
CeRapiUninit = (FARPROC) GetProcAddress(hInst “CeRapiUninit“);
CeCreateFile = (pfnFunc0)GetProcAddress(hInst “CeCreateFile“);
CeWriteFile = (pfnFunc1)GetProcAddress(hInst “CeWriteFile“);
CeCloseHandle = (pfnFunc2)GetProcAddress(hInst “CeCloseHandle“);
CeFindFirstFile = (pfnFunc3)GetProcAddress(hInst “CeFindFirstFile“);
CeGetFileSize = (pfnFunc4)GetProcAddress(hInst “CeGetFileSize“);
CeReadFile = (pfnFunc5)GetProcAddress(hInst “CeReadFile“);
CeFindNextFile = (pfnFunc6)GetProcAddress(hInst “CeFindNextFile“);
CeCreateDirectory = (pfnFunc7)GetProcAddress(hInst “CeCreateDirectory“);
CeCreateProcess = (pfnFunc8)GetProcAddress(hInst “CeCreateProcess“);
CeGetSystemInfo = (pfnFunc9)GetProcAddress(hInst “CeGetSystemInfo“);
CeCopyFile = (pfnFuncB)GetProcAddress(hInst “CeCopyFile“);
CeGetLastError = (pfnFuncC)GetProcAddress(hInst “CeGetLastError“);
CeRapiGetError = (pfnFuncD)GetProcAddress(hInst “CeRapiGetError“);
return TRUE;
}
else
{
FreeLibrary(hInst);
return FALSE;
}
return FALSE;
}

BOOL CCeRapi::CopyFiletoPC(CString csCEFilenameCString csPCFilename)
{
HANDLE hCEFile;
DWORD dwFileSize = 0;
int iFileBlockSize = 0;
DWORD dwBytes = 0;
char cBlockSize[BUFFER_SIZE];
int i = 0;
DWORD dwSizeRet = 0 ;
CFile PCFile;
BSTR bstr = csCEFilename.AllocSysString();
SysFreeString(bstr);
hCEFile = CeCreateFile(bstr GENERIC_READ 0 NULL
OPEN_EXISTING FILE_ATTRIBUTE_NORMAL NULL);
if(INVALID_HANDLE_VALUE == hCEFile)
{
TRACE(“==Fail to open device file:%d\n“GetLastError());
return FALSE;
}
dwSizeRet = CeGetFileSize(hCEFile&dwFileSize);
TRACE(“==Read file size return value:%d\n“dwSizeRet);
dwFileSize = dwSizeRet + (dwFileSize << 32);
iFileBlockSize = dwFileSize / BUFFER_SIZE;
PCFile.Open(csPCFilenameCFile::modeReadWrite | CFile::typeBinary | CFile::modeCreate);
for(i = 0;i < iFileBlockSize;i++)
{
memset(cBlockSize0sizeof(char) * BUFFER_SIZE);
CeReadFile(hCEFilecBlockSizeBUFFER_SIZE&dwBytesNULL);
PCFile.Write(cBlockSizeBUFFER_SIZE);
}
if(0 != dwFileSize % BUFFER_SIZE)
{
memset(cBlockSize0sizeof(char) * BUFFER_SIZE);
CeReadFile(hCEFilecBlockSizedwFileSize % BUFFER_SIZE&dwBytesNULL);
PCFile.Write(cBlockSizedwFileSize % BUFFER_SIZE);
}
CeCloseHandle(hCEFile);
PCFile.Close();
return TRUE;
}

BOO

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-11-02 19:52  Dish\
     目录           0  2015-11-02 19:51  Dish\debug\
     文件      245760  2014-10-28 17:58  Dish\debug\PCDish.exe
     文件     1466356  2014-10-28 17:58  Dish\debug\PCDish.ilk
     文件     4189184  2014-10-28 17:58  Dish\debug\PCDish.pdb
     目录           0  2015-11-02 19:52  Dish\PCDish\
     文件    12864512  2015-11-02 19:50  Dish\PCDish.ncb
     文件         884  2015-11-02 19:12  Dish\PCDish.sln
     文件         883  2014-10-15 14:43  Dish\PCDish.sln.old
     文件       39936  2015-11-02 19:50  Dish\PCDish.suo
     文件       36352  2015-03-09 15:35  Dish\PCDish.suo.old
     文件        5056  2014-11-15 14:03  Dish\PCDish\CeRapi.cpp
     文件        2288  2014-11-15 14:00  Dish\PCDish\CeRapi.h
     文件       19491  2006-11-26 11:12  Dish\PCDish\CppSQLite3U.cpp
     文件       17546  2006-11-26 11:12  Dish\PCDish\CppSQLite3U.h
     文件        5029  2014-11-15 16:05  Dish\PCDish\DataOutIn.cpp
     文件         773  2014-11-15 15:34  Dish\PCDish\DataOutIn.h
     目录           0  2015-11-02 19:51  Dish\PCDish\Debug\
     文件        7132  2014-10-28 17:58  Dish\PCDish\Debug\BuildLog.htm
     文件      296990  2014-10-27 15:47  Dish\PCDish\Debug\DiaDishInfEdit.obj
     文件      128790  2014-10-28 17:58  Dish\PCDish\Debug\DiaDishSortEdit.obj
     文件       55529  2014-10-24 16:35  Dish\PCDish\Debug\DiaLogin.obj
     文件      100570  2012-05-29 02:16  Dish\PCDish\Debug\msado15.tlh
     文件       77115  2012-05-29 02:16  Dish\PCDish\Debug\msado15.tli
     文件          67  2014-10-28 17:58  Dish\PCDish\Debug\mt.dep
     文件         940  2014-10-24 16:35  Dish\PCDish\Debug\PCDish.exe.embed.manifest
     文件        1004  2014-10-24 16:35  Dish\PCDish\Debug\PCDish.exe.embed.manifest.res
     文件         888  2014-10-28 17:58  Dish\PCDish\Debug\PCDish.exe.intermediate.manifest
     文件       49931  2014-10-27 16:52  Dish\PCDish\Debug\PCDish.obj
     文件       25140  2014-10-28 17:48  Dish\PCDish\Debug\PCDish.res
     文件       42532  2014-10-28 17:58  Dish\PCDish\Debug\PCDishDlg.obj
............此处省略61个文件信息

评论

共有 条评论

相关资源