• 大小: 9.9MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-08
  • 语言: C/C++
  • 标签: C++  Access  Ado  

资源简介

c++ access 实现花店管理系统,数据库采用ado技术

资源截图

代码片段和文件信息

#include “Customer.h“


Customer::Customer(MyAdo * pAdo)
{
m_pAdo = pAdo;
}
Customer::~Customer()
{
}
void Customer::Query()
{
m_pAdo->Show();
run();
}
void Customer::Buy()
{
Flower flower;
Flower flowerAll;

cout << “请输入要购买花名 数量 以空格隔开“ << endl;
fflush(stdin);
cin >> flower.m_flowerName >> flower.m_flowerNum;

if (!m_pAdo->GetOneFlowerInfo(flower.m_flowerName flowerAll))
{
cout << “您要购买的花不存在“ << endl;
}
else
{
if (flower.m_flowerNum > flowerAll.m_flowerNum)
{
cout << “购买的个数超出库存“ << endl;
}
else
{
flowerAll.m_flowerNum = flowerAll.m_flowerNum - flower.m_flowerNum;


m_pAdo->ModifyFlower(flowerAll.m_flowerName flowerAll);


cout << “购买成功 请付款 “ << flower.m_flowerNum*flowerAll.m_flowerPrice <<“ 元“<< endl;
}
}

run();

}
void Customer::Cancel()
{
Flower flower;
Flower flowerAll;

cout << “请输入要退货花名 数量 以空格隔开“ << endl;
fflush(stdin);
cin >> flower.m_flowerName >> flower.m_flowerNum;

if (flower.m_flowerNum <= 0)
{
cout << “退货数量错误请重新输入“ << endl;
Cancel();
}
if (!m_pAdo->GetOneFlowerInfo(flower.m_flowerName flowerAll))
{
cout << “这不是我们店的货“ << endl;
}
else
{


flowerAll.m_flowerNum = flowerAll.m_flowerNum + flower.m_flowerNum;


m_pAdo->ModifyFlower(flowerAll.m_flowerName flowerAll);


cout << “退货成功 返还您 “ << flower.m_flowerNum*flowerAll.m_flowerPrice << “ 元“ << endl;

}

run();
}
void Customer::run()
{
int select = -1;
fflush(stdin);
while (1)
{
select = menu();
if (0 < select && select < 5)
{
break;
}
}
switch (select)
{
case 1:
Buy();
break;
case 2:
Cancel();
break;
case 3:
Query();
break;

case 4:
return;
break;

default:
return;
break;
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     253952  2018-12-18 21:53  FlowerStoreSys\Debug\flower.mdb

     文件     121856  2018-12-19 21:02  FlowerStoreSys\Debug\FlowerStoreSys.exe

     文件     723332  2018-12-19 21:02  FlowerStoreSys\Debug\FlowerStoreSys.ilk

     文件    1272832  2018-12-19 21:02  FlowerStoreSys\Debug\FlowerStoreSys.pdb

     文件      42151  2018-12-18 23:44  FlowerStoreSys\Debug\FlowerStoreSys.rar

     文件       1899  2018-12-18 22:03  FlowerStoreSys\FlowerStoreSys\Customer.cpp

     文件        593  2018-12-18 22:02  FlowerStoreSys\FlowerStoreSys\Customer.h

     文件     314975  2018-12-19 21:02  FlowerStoreSys\FlowerStoreSys\Debug\Customer.obj

     文件       1114  2018-12-19 21:02  FlowerStoreSys\FlowerStoreSys\Debug\FlowerStoreSys.Build.CppClean.log

     文件       6327  2018-12-19 21:02  FlowerStoreSys\FlowerStoreSys\Debug\FlowerStoreSys.log

     文件       1878  2018-12-19 21:02  FlowerStoreSys\FlowerStoreSys\Debug\FlowerStoreSys.tlog\cl.command.1.tlog

     文件      82512  2018-12-19 21:02  FlowerStoreSys\FlowerStoreSys\Debug\FlowerStoreSys.tlog\CL.read.1.tlog

     文件       1638  2018-12-19 21:02  FlowerStoreSys\FlowerStoreSys\Debug\FlowerStoreSys.tlog\CL.write.1.tlog

     文件        161  2018-12-19 21:02  FlowerStoreSys\FlowerStoreSys\Debug\FlowerStoreSys.tlog\FlowerStoreSys.lastbuildstate

     文件       1454  2018-12-19 21:02  FlowerStoreSys\FlowerStoreSys\Debug\FlowerStoreSys.tlog\link.command.1.tlog

     文件       3266  2018-12-19 21:02  FlowerStoreSys\FlowerStoreSys\Debug\FlowerStoreSys.tlog\link.read.1.tlog

     文件        692  2018-12-19 21:02  FlowerStoreSys\FlowerStoreSys\Debug\FlowerStoreSys.tlog\link.write.1.tlog

     文件     240745  2018-12-19 21:02  FlowerStoreSys\FlowerStoreSys\Debug\main.obj

     文件     314249  2018-12-19 21:02  FlowerStoreSys\FlowerStoreSys\Debug\Manager.obj

     文件     170848  2014-03-18 14:10  FlowerStoreSys\FlowerStoreSys\Debug\msado15.tlh

     文件     148899  2014-03-18 14:10  FlowerStoreSys\FlowerStoreSys\Debug\msado15.tli

     文件    1051648  2018-12-19 21:02  FlowerStoreSys\FlowerStoreSys\Debug\vc120.idb

     文件     839680  2018-12-19 21:02  FlowerStoreSys\FlowerStoreSys\Debug\vc120.pdb

     文件        379  2018-12-18 20:26  FlowerStoreSys\FlowerStoreSys\Flower.h

     文件         64  2018-12-19 21:02  FlowerStoreSys\FlowerStoreSys\flower.ldb

     文件     253952  2018-12-18 23:42  FlowerStoreSys\FlowerStoreSys\flower.mdb

     文件       4362  2018-12-18 20:29  FlowerStoreSys\FlowerStoreSys\FlowerStoreSys.vcxproj

     文件       1513  2018-12-17 22:43  FlowerStoreSys\FlowerStoreSys\FlowerStoreSys.vcxproj.filters

     文件        165  2018-12-18 20:29  FlowerStoreSys\FlowerStoreSys\FlowerStoreSys.vcxproj.user

     文件       1168  2018-12-18 20:16  FlowerStoreSys\FlowerStoreSys\main.cpp

............此处省略14个文件信息

评论

共有 条评论