public ActionResult EditProducts(Product product) { OrderHandle orderhandle = new OrderHandle(); orderhandle.EditProduct(product); return(RedirectToAction("Receipt")); }
public ActionResult EditProducts(int id) { OrderHandle ch = new OrderHandle(); Product product = ch.GetProducts().Find(cp => cp.Product_Id == id); return(View(product)); }
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")); }
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")); }
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); } }
public void ChangeStatus(List <OrderInfo_Model> orderlist) { var change = new OrderHandle(); change.Change_Status(orderlist); }
public List <OrderInfo_Model> GetOrderList(string AccountUID) { var Orderlist = new OrderHandle(); return(Orderlist.Get_OrderList(AccountUID)); }
public Product_Model GetProductInfo(string ProductUID) { var Pinfo = new OrderHandle(); return(Pinfo.Get_productInfo(ProductUID)); }
public ActionResult ViewProducts() { OrderHandle orderhandle = new OrderHandle(); return(View(orderhandle.GetProducts())); }
public ActionResult Order_Product_Details(int id) { OrderHandle ch = new OrderHandle(); return(View(ch.GetProducts().Find(cp => cp.Product_Id == id))); }
public ActionResult GetOrders(int id) { OrderHandle orderhandle = new OrderHandle(); return(View(orderhandle.GetOrders(id))); }