Esempio n. 1
0
        public static int ConfirmOrderSalesBL(int confirmOrderID, int salesManID)
        {
            int confirmedOrderID = 0;

            try
            {
                foreach (Order item in OrderBL.SearchOrderForOfflineBL())
                {
                    if (item.OrderID == confirmOrderID)
                    {
                        item.Status = "Delivered";
                        if (OrderBL.UpdateOrderBL(item))
                        {
                            confirmedOrderID = item.OrderID;
                            if (AddSalesBL(confirmOrderID, salesManID))
                            {
                                Console.WriteLine("Sale complete!");
                            }
                        }
                    }
                }
            }


            catch (GOException ex)
            {
                throw ex;
            }

            return(confirmedOrderID);
        }
Esempio n. 2
0
        public static bool ModifyOrderSalesBL(Order updatedOrder)
        {
            bool orderModified = false;

            try
            {
                foreach (Order item in OrderBL.GetAllOrdersBL())
                {
                    if (item.OrderID == updatedOrder.OrderID)
                    {
                        orderModified = OrderBL.UpdateOrderBL(updatedOrder);
                    }
                }
            }


            catch (GOException ex)
            {
                throw ex;
            }

            return(orderModified);
        }
Esempio n. 3
0
        public static bool AcceptOrderSalesBL(int activeOrderID)
        {
            bool orderAccepted = false;

            try
            {
                foreach (Order item in OrderBL.SearchOrderForOfflineBL())
                {
                    if (item.OrderID == activeOrderID)
                    {
                        item.Status   = "Under Processing";
                        orderAccepted = OrderBL.UpdateOrderBL(item);
                    }
                }
            }


            catch (GOException ex)
            {
                throw ex;
            }

            return(orderAccepted);
        }