面向对象程序设计
程序源代码(github链接):https://github.com/sunjing2013/tuanduixiangmu/tree/master
一、本系统主要包括四大模块,分别是人事管理模块,销售管理模块,进货管理模块,库存管理模块。每个模块的功能如下:
1. 商品管理模块功能:
(1)实现商品信息的查询;
(2)实现职工信息的更新,包括增加、删除、修改功能;
2. 人事管理模块功能:
(1)实现职工信息的查询;
(2)实现职工信息的更新,包括增加、删除、修改功能;
(3)实现供货商信息的查询;
(4)实现供货商信息的更新,包括增加、删除、修改功能。
3. 销售管理模块功能:
(1)实现前台商品的销售;
(2)将商品的销售信息与数据库联系起来。
4. 进货管理模块功能:
(1)实现进货信息的查询;
(2)实现进货信息的更新,包括增加、删除、修改功能。
5. 库存管理模块功能:
(3)实现库存信息的查询;
二、创建数据库
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Buyer_TABLE]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Buyer_TABLE]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[goodsInfo]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[goodsInfo]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[user]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[user]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[vendition_TABLE]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[vendition_TABLE]
GO
CREATE TABLE [dbo].[Buyer_TABLE] (
[BuyerID] [int] IDENTITY (1, 1) NOT NULL ,
[BuyerGoodsName] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[BuyerGoodsNumber] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[BuyerManufacturer] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[BuyerDate] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[BuyerStatus] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[BuyerName] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[goodsInfo] (
[GoodsID] [int] NOT NULL ,
[GoodsName] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[GoodsNumber] [int] NULL ,
[GoodsProduct] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[GoodsPrice] [float] NULL ,
[GoodsSize] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[user] (
[userID] [int] IDENTITY (1, 1) NOT NULL ,
[userName] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[userPassword] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[userAddress] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[userAuthority] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[userGender] [varchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
[userAge] [int] NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[vendition_TABLE] (
[VenditionID] [int] IDENTITY (1, 1) NOT NULL ,
[GoodsName] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[GoodsCustomNumber] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[CustomerName] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[VenditionDate] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[GoodsSize] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[GoodsPrice] [float] NULL
) ON [PRIMARY]
GO
程序运行结果截图: