/// <summary> /// Get Num Of Orders /// </summary> /// <returns>Num Of Orders</returns> public override int GetNumOfOrders() { try { return(DalOrder.NumOfOrders(Type == 1 ? $"WHERE([Orders].[ShopID] = {GetShopId()})" : "")); } catch { return(-1); } }
/// <summary> /// Get Num Of Active Customers /// </summary> /// <returns></returns> public override string GetNumOfCustomers() { try { return(DalOrder.NumOfCustomers($" INNER JOIN Orders ON(Users.ID = Orders.CustomerID) WHERE(((Users.UserType)= 4) AND([Orders].[ShopID]= {GetShopId()})) ")); } catch (Exception e) { return(e.Message); } }
/// <summary> /// update the delivery of order by order id /// </summary> /// <param name="deliveryId"></param> /// <returns>true if update success</returns> public bool UpdateDelivery(string deliveryId) { try { return(DalOrder.UpdateDelivery(OrderId, deliveryId)); } catch { return(false); } }
/// <summary> /// get a data row of order by order id /// </summary> /// <param name="orderId"></param> /// <returns>data row of order</returns> public static DataRow GetOrderById(int orderId) { try { return(DalOrder.GetOrderById(orderId)); } catch { return(null); } }
//public virtual string GetNumOfActiveCustomers() //{ // try // { // return DalOrder.NumOfActiveCustomers(""); // } // catch // { // return ""; // } //} public virtual string GetNumOfCustomers() { try { return(DalOrder.NumOfCustomers("WHERE(((Users.UserType) = 4)) Group By Users.FirstName,Users.Email,Users.PhoneNumber")); } catch { return(""); } }
/// <summary> /// get the status of order by order id /// </summary> /// <returns>order status</returns> public int GetOrderStatus() { try { return(DalOrder.GetOrderStatus(OrderId)); } catch { return(-1); } }
public virtual int GetNumOfOrders() { try { return(DalOrder.NumOfOrders("")); } catch { return(-1); } }
//public BLOrder(DataRow row) //{ret // this.OrderID = id; // this.CustomerID = CustomerID; // this.DeliveryID = DeliveryID; // this.ShopID = ShopID; // this.AriveTime = AriveTime; // this.Time = Time; // this.Status = Status; //} //public static string NumOfOrdersFromShop(int shopId) //{ // return DalOrder.NumOfOrders($"WHERE([Orders].[ShopID] = {shopId})").ToString(); //} /// <summary> /// update arrive time of order with order id /// </summary> /// <param name="arrivalTime"></param> /// <returns>true if update success</returns> public bool UpdateArrivalTime(DateTime arrivalTime) { var success = true; try { success = DalOrder.UpdateArrivalTime(arrivalTime, OrderId); } catch { return(false); } return(success); }
/// <summary> /// update the status of order by order id /// </summary> /// <param name="status"></param> /// <returns>true if update success</returns> public static bool UpdateStatus(int status, int OrderId) { bool success = true; try { success = DalOrder.UpdateStatus(status, OrderId); } catch { return(false); } return(success); }
/// <summary> /// update ready time of order by order id /// </summary> /// <param name="readyTime"></param> /// <returns>true if update success</returns> public bool UpdateReadyTime(DateTime readyTime) { bool success = true; try { success = DalOrder.UpdateReadyTime(readyTime, OrderId); } catch { return(false); } return(success); }
public bool SaveOrder(Order order) { DalOrder dalOrder = new DalOrder(this, this.storageAccount); return(dalOrder.SaveOrder(order)); }
public IList <Order> GetOrderByTenantId(string tenantId) { DalOrder dalOrder = new DalOrder(this, this.storageAccount); return(dalOrder.GetOrderByTenantId(tenantId)); }
/// <summary> /// get order list order by order time /// </summary> /// <returns>orders list</returns> public List <BlOrder> GetOrdersListByTime() { DataTable orderTable = DalOrder.GetOrdersListByTime(this.UserId); return((from object row in orderTable.Rows select new BlOrder((DataRow)row)).ToList()); }
public IList <Order> GetAllOrders() { DalOrder dalOrder = new DalOrder(this, this.storageAccount); return(dalOrder.GetAllOrders()); }
public int GetNumOfDeliveryOrders() { return(DalOrder.NumOfOrders($"WHERE Orders.DeliverID ='{UserId}' AND Orders.OrderStutus<5 ")); }
/// <summary> /// delete order by id /// </summary> /// <param name="id"></param> /// <returns>true if delete success</returns> public bool DeleteOrder() { return(DalOrder.DeleteOrder(OrderId)); }
public Order GetOrder(Guid orderId) { DalOrder dalOrder = new DalOrder(this, this.storageAccount); return(dalOrder.GetOrder(orderId)); }