public OrdersController(IOrderDAL oDAL, ICustomerDAL cDAL, ILocationDAL lDAL, ILogger <OrdersController> logger) { _context = oDAL; _custContext = cDAL; _locContext = lDAL; this.logger = logger; }
/// <summary> /// 产生打扫人员 /// </summary> /// <returns></returns> public OperationResult <bool> ProduceCleaner() { int count = CountOrderNumber(); //1.得到随机数 List <int> random = ProduceRandom(count); if (random == null) { return(new OperationResult <bool>() { Message = "今日无人订餐" }); } IOrderDAL orderDAL = OrderDALFactory.CreateOrderDAL(); List <StaffInformationResult> _user = orderDAL.FindByUserOrder(); if (count <= 4) { return(new OperationResult <bool>() { GetCleanerName1 = _user[random[0]].StaffName, GetCleanerName2 = "", Message = "产生打扫人员" }); } else { return(new OperationResult <bool>() { GetCleanerName1 = _user[random[0]].StaffName, GetCleanerName2 = _user[random[1]].StaffName, Message = "产生打扫人员" }); } }
public Customer(ICustomerDAL customerDAL, IAddToOrderDAL addtoorderDAL, IItemDAL itemDAL, IOrderDAL orderDAL) { _customerDAL = customerDAL; _addtoorderDAL = addtoorderDAL; _itemDAL = itemDAL; _orderDAL = orderDAL; }
public OrderManager(IUnitOfWork uow, IHttpContextAccessor httpContextAccessor, IOrderDAL orderDAL, IOrderDetailDAL orderDetailDAL) { _uow = uow; _orderDAL = orderDAL; _orderDetailDAL = orderDetailDAL; _httpContextAccessor = httpContextAccessor; }
/// <summary> /// 统计人数 /// </summary> /// <returns></returns> public int CountOrderNumber() { IOrderDAL orderDAL = OrderDALFactory.CreateOrderDAL(); int count = orderDAL.CountUserOrder(); return(count); }
public ServiceContract() { userDAL = (IUserDAL)ContextRegistry.GetContext().GetObject("UserDAL"); orderDAL = (IOrderDAL)ContextRegistry.GetContext().GetObject("OrderDAL"); orderItemDAL = (IOrderItemDAL)ContextRegistry.GetContext().GetObject("OrderItemDAL"); productDAL = (IProductDAL)ContextRegistry.GetContext().GetObject("ProductDAL"); }
public User(IShipperDAL shipperDAL, IItemDAL itemDAL, ICustomerDAL customerDAL, IOrderDAL orderDAL, IAddToOrderDAL addtoorderDAL) { _shipperDAL = shipperDAL; _itemDAL = itemDAL; _customerDAL = customerDAL; _orderDAL = orderDAL; _addtoorderDAL = addtoorderDAL; }
public OrderMgr(IConfiguration config, LocationMgr lm) { _locMgr = lm; _iconfiguration = config; var specifc_DAL = new OrderDAL(_iconfiguration); DAL = specifc_DAL; }
public UserDetailController(IUserDAL _userDAL, IUserCardDAL _userCardDAL, IUserAddressDAL _userAddressDAL, ICityDAL _cityDAL, IDistrictDAL _districtDAL, IOrderDAL _orderDAL) { orderDAL = _orderDAL; districtDAL = _districtDAL; cityDAL = _cityDAL; userDAL = _userDAL; userCardDAL = _userCardDAL; userAddressDAL = _userAddressDAL; currentUser = System.Web.HttpContext.Current.Session["user"] as ETicaret.Model.Models.Entity.User; }
/// <summary> /// 得到员工信息 /// </summary> /// <returns></returns> public List <StaffInformationResult> GetStaffInformation() { IOrderDAL orderDAL = OrderDALFactory.CreateOrderDAL(); List <StaffInformationResult> _user = orderDAL.FindByUserOrder(); if (_user.Count < 0) { throw new Exception("程序异常"); } else { return(_user); } }
/// <summary> /// 查询订餐的状态 /// </summary> /// <param name="username"></param> /// <returns></returns> public OrderingStateEnum IsOrder(string username) { IOrderDAL orderDAL = OrderDALFactory.CreateOrderDAL(); int indexcount = orderDAL.OrderingPeople(username).Count(); if (indexcount > 0) { return(OrderingStateEnum.IsOrdering); } else { return(OrderingStateEnum.IsNullOfOrdering); } }
/// <summary> /// 根据配置文件中的值创建OrderDAL /// </summary> /// <returns></returns> public static IOrderDAL CreateOrderDAL() { IOrderDAL orderDAL = null; switch (dataBaseType) { case "SqlServer": orderDAL = new OrderSqlServerDAL(); break; case "Oracle": orderDAL = new OrderOracleDAL(); break; } return(orderDAL); }
public OrderController(ICityDAL _cityDAL, IDistrictDAL _districtDAL, IOrderDAL _orderDAL, IUserDAL _userDAL, IUserTypeDAL _userTypeDAL, IProductDAL _productDAL, IUserAddressDAL _userAddressDAL, IUserCardDAL _userCardDAL, IUserDetailDAL _userDetailDAL, IBasketProductDAL _basketProductDAL) { basketProductDAL = _basketProductDAL; userDetailDAL = _userDetailDAL; userCardDAL = _userCardDAL; userAddressDAL = _userAddressDAL; productDAL = _productDAL; userTypeDAL = _userTypeDAL; orderDAL = _orderDAL; cityDAL = _cityDAL; districtDAL = _districtDAL; userDAL = _userDAL; currentUser = System.Web.HttpContext.Current.Session["user"] as ETicaret.Model.Models.Entity.User; }
public string IsMeno(string username) { IOrderDAL orderDAL = OrderDALFactory.CreateOrderDAL(); List <StaffInformationResult> _user = orderDAL.IsAddMeno(username); int indexcount = _user.Count(); if (indexcount > 0) { return(_user[0].Meno); } else { return(""); } }
/// <summary> /// 取消订餐 /// </summary> /// <param name="userName">用户名</param> /// <returns></returns> public OperationResult <Boolean> CancelOrder(string userName) { IOrderDAL orderDAL = OrderDALFactory.CreateOrderDAL(); int _user = orderDAL.DeleteUserOrder(userName); if (_user >= 1) { return(new OperationResult <bool>() { Result = true, Message = "取消订餐成功", OrderingState = OrderingStateEnum.IsNullOfOrdering }); } else { return(new OperationResult <bool>() { Result = false, Message = "取消订餐失败", OrderingState = OrderingStateEnum.IsNullOfOrdering }); } }
/// <summary> /// 订餐 /// </summary> /// <param name="userName">用户名</param> /// <returns></returns> public OperationResult <Boolean> ConfirmOrder(string username, string meno) { IOrderDAL orderDAL = OrderDALFactory.CreateOrderDAL(); int _user = orderDAL.InsertUserOrder(username, meno); if (_user >= 1) { return(new OperationResult <bool>() { Result = true, Message = "订餐成功", OrderingState = OrderingStateEnum.IsOrdering }); } else { return(new OperationResult <bool>() { Result = false, Message = "订餐失败", OrderingState = OrderingStateEnum.IsNullOfOrdering }); } }
public OrdersController() { this.DAL = new OrderDAL(); }
public OrdersController(IOrderDAL DAL) { this.DAL = DAL; }
public OrderBLL(IOrderDAL orderDAL) { _orderDAL = orderDAL; }
public OrderBL() { orderDAL = new OrderRepository(); }
public OrderManager(IOrderDAL orderDAL) => _orderDAL = orderDAL;
public OrderController(IOrderDAL orderdal) { OrderDAL = orderdal; }
public OrderService(IOrderDAL orderDAL, ICustomerDAL customerDAL, IEmployeeDAL employeeDAL) { _orderDAL = orderDAL; _customerDAL = customerDAL; _employeeDAL = employeeDAL; }
public OrderManager(IOrderDAL orderDAL, ILogger <OrderManager> logger) { _orderDAL = orderDAL; this.logger = logger; }
public OrderBLL() { _order = new OrderDAL(); _product = new ProductDAL(); _customer = new CustomerDAL(); }
public OrderBLL(IOrderDAL stub) { _order = stub; _product = new ProductDALStub(); _customer = new CustomerDALStub(); }
public OrderService(IOrderDAL order) { _order = order; }
public OrderBLL() { _orderDAL = new OrderDAL(); _loggingBLL = new LoggingBLL(); }
public OrderBLL() : base(_Type) { this._Dal = base.CurrentDAL as IOrderDAL; }
public OrderService(IOrderDAL orderDAL) { _orderDAL = orderDAL; }
/// <summary> /// /// </summary> /// <param name="connectionString"></param> public static void Initialize(string connectionString) { OrderDB = new OrderDAL(connectionString); }
public OrderBLL(IOrderDAL iOrderDAL) { _orderDAL = iOrderDAL; _loggingBLL = new LoggingBLL(); }
public OrderController(IOrderDAL orderDAL) { db = new OrderSystemContext(); this.orderDAL = orderDAL; }
/// <summary> /// /// </summary> /// <param name="connectionString"></param> public static void Initialize(string connectionString) { OrderDB = new DataLayers.SqlServer.OrderDAL(connectionString); }
public OrderController() { db = new OrderSystemContext(); orderDAL = new OrderDAL(db); }