天津理工大学2012级本科专业设计
return SqlHelper.ExecuteDataTable(\餐品名称',Price as '价格',Number as '数量',CompanyName as '公司名称' from CustomerShopcar where CustomerLoginName=@CustomerLoginName\,
new SqlParameter(\, SqlDbType.NVarChar) { Value = CustomerLoinName } ); }
#endregion
图7.5 购物车功能逻辑顺序图
Figure 7.5 Shopping cart function logic sequence diagram
7.1.3 商家餐品添加
该功能模块是顾客在确认完毕注册餐厅的信息之后,进行餐品添加的一个操作过程,顾客需要填写完整订单信息,以方便送餐员的派送,顾客在订单信息中也需要进行选择支付方式,以将订单提交到不同的表中。该功能模块的功能逻辑顺序图如图7.6所示:
32
天津理工大学2012级本科专业设计
图7.6 订单提交功能逻辑顺序图
Figure 7.6 Order submission function logic sequence diagram
该功能模块的界面如图7.7所示,部分代码如下所示: DAL层:
#region 在线支付情况下的订餐
public int DistributionLinePay(int StaffId, string DistributionAddress, string DistributionFood, int DistributionNum, string GetFoodManName, string GetFoodManTel) {
return SqlHelper.ExecuteNonQuery(\
values(@StaffId,@DistributionAddress,@DistributionFood,@DistributionNum,@GetFoodManName,@GetFoodManTel)\,
new SqlParameter(\, SqlDbType.Int) { Value = StaffId }, new SqlParameter(\, SqlDbType.NVarChar) { Value = DistributionAddress },
new SqlParameter(\, SqlDbType.NVarChar) { Value = DistributionFood },
new SqlParameter(\, SqlDbType.Int) { Value = DistributionNum },
new SqlParameter(\, SqlDbType.NVarChar) { Value = GetFoodManName },
new SqlParameter(\, SqlDbType.VarChar) { Value =
33
天津理工大学2012级本科专业设计
GetFoodManTel } ); }
#endregion
#region 餐到付款情况下的订餐
public int InsertIntoDistributionRealityPay(int StaffId, string DistributionAddress, string DistributionFood, int DistributionNum, string DistributionPrice, string GetFoodManName, string GetFoodManTel) {
return SqlHelper.ExecuteNonQuery(\(@StaffId,@DistributionAddress,@DistributionFood,@DistributionNum,@DistributionPrice,@GetFoodManName,@GetFoodManTel)\,
new SqlParameter(\, SqlDbType.Int) { Value = StaffId }, new SqlParameter(\, SqlDbType.NVarChar) { Value = DistributionAddress },
new SqlParameter(\, SqlDbType.NVarChar) { Value = DistributionFood },
new SqlParameter(\, SqlDbType.Int) { Value = DistributionNum },
new SqlParameter(\, SqlDbType.VarChar) { Value = DistributionPrice },
new SqlParameter(\, SqlDbType.NVarChar) { Value = GetFoodManName },
new SqlParameter(\, SqlDbType.VarChar) { Value = GetFoodManTel } ); #endregion }
public DataTable getBuyFoodInformation(string CustomerLoginName) {
return SqlHelper.ExecuteDataTable(\餐品名称',Price as '价格',Number as '数量' from CustomerShopcar where CustomerLoginName=@CustomerLoginName\, new SqlParameter(\, SqlDbType.NVarChar) { Value=CustomerLoginName} ); }
public int deleteShopCarInformation(string CustomerLoginName) {
return SqlHelper.ExecuteNonQuery(\CustomerLoginName=@CustomerLoginName\,
new SqlParameter(\, SqlDbType.NVarChar) { Value=CustomerLoginName} );
34
天津理工大学2012级本科专业设计
}
图7.7 订餐功能模块界面
Figure 7.7 Reservation function module interface
35
天津理工大学2012级本科专业设计
7.2 本章小结
本章内容是在数据库设计完毕之后,对程序开始进行详细的设计步骤,对界面以及程序的交互性功能的设计,通过功能逻辑顺序图来描述用户与系统的交互信息,然后通过程序用代码进行具体的实现,完成系统的实现。
36
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库网上餐厅系统专业设计 - 图文(8)在线全文阅读。
相关推荐: