Пример #1
0
        public ActionResult EditProducts(Product product)
        {
            OrderHandle orderhandle = new OrderHandle();

            orderhandle.EditProduct(product);
            return(RedirectToAction("Receipt"));
        }
Пример #2
0
        public ActionResult EditProducts(int id)
        {
            OrderHandle ch      = new OrderHandle();
            Product     product = ch.GetProducts().Find(cp => cp.Product_Id == id);

            return(View(product));
        }
Пример #3
0
        public ActionResult CreateBill(combined Products, int id)
        {
            //if (ModelState.IsValid)
            //{
            Product     product     = Products.productmodel;
            OrderHandle orderhandle = new OrderHandle();

            orderhandle.AddProduct(product, id);
            //}
            return(RedirectToAction("Receipt"));
        }
Пример #4
0
        public ActionResult CreateOrderAndLines()
        {
            try
            {
                var accHandle = (AccountHandle)Session["accHandle"];

                var session = EcoSession;
                if (session == null)
                {
                    return(View("ExampleView"));
                }

                //create order using the debtor created before
                var order = new OrderData
                {
                    DebtorHandle        = EconomicModels.Debtor.Handle,
                    DebtorName          = EconomicModels.Debtor.Name,
                    Date                = DateTime.Now,
                    CurrencyHandle      = EconomicModels.Debtor.CurrencyHandle,
                    TermOfPaymentHandle = EconomicModels.Debtor.TermOfPaymentHandle
                };
                OrderHandle orderHandle = session.Order_CreateFromData(order);

                var products = EconomicModels.Products;

                // add items to this order, using the created products
                var orderLines = new OrderLineData[]
                {
                    new OrderLineData {
                        ProductHandle = products[0].Handle, Description = products[0].Name, Quantity = 500, OrderHandle = orderHandle, UnitCostPrice = products[0].SalesPrice
                    },
                    new OrderLineData {
                        ProductHandle = products[1].Handle, Description = products[1].Name, Quantity = 200, OrderHandle = orderHandle, UnitCostPrice = products[1].SalesPrice
                    }
                };

                session.OrderLine_CreateFromDataArray(orderLines);
                order.Handle         = orderHandle;
                EconomicModels.Order = order;
            }
            catch (Exception e)
            {
                return(ReturnWithError(e.Message));
            }

            ViewData["message"] = "Order created and orderlines added!";
            return(View("ExampleView"));
        }
Пример #5
0
 public MainWindow()
 {
     try
     {
         InitializeComponent();
         this.ExchangeDataManager = new ExchangeDataManager(this._Media);
         this._CommonDialogWin = new CommonDialogWin(this.MainFrame);
         this._ConfirmDialogWin = new ConfirmDialogWin(this.MainFrame);
         this._ConfirmOrderDialogWin = new ConfirmOrderDialogWin(this.MainFrame);
         this._OrderHandle = new OrderHandle();
         this._LayoutManager = new LayoutManager(this, this.OnAddContentPane);
     }
     catch(Exception exception)
     {
         Logger.TraceEvent(TraceEventType.Error, "MainWindow ctor: \r\n{0}", exception);
     }
 }
Пример #6
0
        public void ChangeStatus(List <OrderInfo_Model> orderlist)
        {
            var change = new OrderHandle();

            change.Change_Status(orderlist);
        }
Пример #7
0
        public List <OrderInfo_Model> GetOrderList(string AccountUID)
        {
            var Orderlist = new OrderHandle();

            return(Orderlist.Get_OrderList(AccountUID));
        }
Пример #8
0
        public Product_Model GetProductInfo(string ProductUID)
        {
            var Pinfo = new OrderHandle();

            return(Pinfo.Get_productInfo(ProductUID));
        }
Пример #9
0
        public ActionResult ViewProducts()
        {
            OrderHandle orderhandle = new OrderHandle();

            return(View(orderhandle.GetProducts()));
        }
Пример #10
0
        public ActionResult Order_Product_Details(int id)
        {
            OrderHandle ch = new OrderHandle();

            return(View(ch.GetProducts().Find(cp => cp.Product_Id == id)));
        }
Пример #11
0
        public ActionResult GetOrders(int id)
        {
            OrderHandle orderhandle = new OrderHandle();

            return(View(orderhandle.GetOrders(id)));
        }