您目前尚未登陆,请选择【登陆】或【注册
首页->电子商务->MyShop网络商城源码(mvc开发)>>BLL/Order.cs>>代码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:MyShop网络商城源码(mvc开发)


当前文件路径:MyShop/BLL/Order.cs 文件类型
普通视图
		            
1using System; 2using System.Collections.Generic; 3 4using System.Data; 5 6 7using MyShop.DALFactory; 8using MyShop.IDAL; 9using MyShop.Model; 10 11namespace MyShop.BLL 12{ 13 public class Order 14 { 15 private IOrder dal = DataAccess.CreateOrder(); 16 17 IOrder 87 88 common 134 135 public DataSet GetDataSet(int userId) 136 { 137 string filter = ""; 138 if (userId == -1) 139 return null; 140 filter = " [clientId]= " + userId; 141 return dal.GetDataSet(filter); 142 } 143 public DataSet GetDataSetByOrderNum(string orderNum) 144 { 145 if (orderNum == string.Empty) 146 return null; 147 string filter; 148 filter = " [orderNum]='" + orderNum + "'"; 149 return dal.GetDataSet(" orderNum='" + orderNum + "'"); 150 } 151 public OrderInfo GetModel(string orderNum) 152 { 153 if ( string.IsNullOrEmpty( orderNum )) 154 return null; 155 if (GetDataSetByOrderNum(orderNum).Tables[0].Rows.Count == 0) 156 return null; 157 return GetModel(GetDataSetByOrderNum(orderNum).Tables[0].Rows[0]); 158 } 159 160 /// <summary> 161 /// 是否已付清 162 /// </summary> 163 /// <param name="orderId"></param> 164 /// <returns></returns> 165 public bool IsPaid(int orderId) 166 { 167 OrderInfo model = new OrderInfo(); 168 Order order = new Order(); 169 model = order.GetModel(orderId); 170 if (model == null) 171 return true; //订单号码错误,直接返回true 172 if (model.status == 3 || model.moneyTotal == model.MoneyReceipt ) 173 return true; 174 else 175 return false; 176 } 177 178 /// <summary> 179 /// 是否已付清 180 /// </summary> 181 /// <param name="orderId"></param> 182 /// <returns></returns> 183 public bool IsPaid(string orderNum) 184 { 185 OrderInfo model = new OrderInfo(); 186 Order order = new Order(); 187 model = order.GetModel(orderNum); 188 if (model == null) 189 return true; //订单号码错误,直接返回true 190 if (model.status == 3 || model.moneyTotal == model.MoneyReceipt) 191 return true; 192 else 193 return false; 194 } 195 196 SearchOrder 224 225 public DataSet GetDataSetByProductId(int productId) 226 { 227 if(string.IsNullOrEmpty(productId.ToString())) 228 return null; 229 return GetDataSet(" productId =" + productId); 230 } 231 232 public DataSet GetDataSetByOrderId(int orderId) 233 { 234 DataSet dataset = new DataSet(); 235 dataset = GetDataSet(" orderId=" + orderId); 236 return dataset; 237 } 238 239 ... 261 262 263 /// <summary> 264 /// 获取今日订单 265 /// </summary> 266 /// <param name="userId"></param> 267 /// <returns></returns> 268 public DataSet GetTodayOrder(int userId) 269 { 270 271 return dal.GetTodayOrder(userId); 272 } 273 274 } 275} 276
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:MyShop网络商城源码(mvc开发)

- Asp.net网络硬盘系统源码

- 无限级树形菜单(Sql数据库)

- 明日Asp.net销售管理系统源码

- 网博直销系统软件源码

- 网络书店v1.0源码

- 某数码公司网站系统源码

- 51aspx多功能投票系统源码(A..

- 网上办公系统源码

51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号