public async Task <ActionResult> GetOrder(string id) { _services = new ProductChangeServices(); var products = await _services.GetOrderByCode(id); return(Json(products, JsonRequestBehavior.AllowGet)); }
public OrderReqAddViewModel(string pedido, string cliente, string producto, string NombreProducto, int qty) { services = new ProductChangeServices(); productServices = new ProductServices(); Pedido = pedido; Cliente = cliente; Producto = producto; ProductName = NombreProducto; Quantity = qty; }
private async Task <StaticPagedList <OrderReqExtend> > ListOrders(int aPage, int aItemsPerPage, string aStringSearch) { var _count = 0; _services = new ProductChangeServices(); List <OrderReqExtend> x = new List <OrderReqExtend>(); var orders = await _services.GetAllWeb(aPage - 1, aItemsPerPage, aStringSearch); x = orders.Item1; return(new StaticPagedList <OrderReqExtend>(x, aPage, aItemsPerPage, orders.Item2)); }
public OrderReqAddViewModel(string pedido, string cliente, string producto, string nombreProducto, int qty, string warehouse) { services = new ProductChangeServices(); productServices = new ProductServices(); Pedido = pedido; Cliente = cliente; Producto = producto; ProductName = nombreProducto; ConcatProducto = producto + " " + nombreProducto; Quantity = qty; Warehouse = warehouse; //App.Current.MainPage.Navigation.NavigationStack.Last().FindByName<Entry>("EntPedido").Focus(); }
public async Task <ActionResult> Add(OrderReqExtend aModel) { _services = new ProductChangeServices(); var order = new OrderReqExtend(); if (aModel != null) { var result = await _services.Save(aModel); if (result) { return(RedirectToAction("Index")); } } return(View("Index")); }
public async Task <ActionResult> Add(string code) { _services = new ProductChangeServices(); var order = new OrderReqExtend(); if (!string.IsNullOrEmpty(code)) { order = await _services.GetDetailByCode(code); } else { return(View("Index")); } return(View(order)); }
public async Task <ActionResult> OrderDetails(List <OrderReqDetailExtend> aModel, string order, string prod, string prodChan, string prodChanNam, int?qty) { if (!string.IsNullOrEmpty(order)) { _services = new ProductChangeServices(); var result = new OrderReqExtend(); var list = new List <OrderReqDetailExtend>(); result = await _services.GetDetailByCode(order); if (result != null) { var op = Session["OptionCRUD"].ToString(); if (op == "INS") { result.Detail.Where(a => a.ProductCode == prod).ForEach(p => { p.ProductCodeChanged = prodChan; p.ProductNameChanged = prodChanNam; if (qty != null) { p.Quantity = (int)qty; } }); } else if (op == "DEL") { result.Detail.Where(a => a.ProductCode == prod).ForEach(p => { p.ProductCodeChanged = null; p.ProductNameChanged = null; p.Quantity = null; }); } //return PartialView("_Details", (IEnumerable<OrderReqDetailExtend>)result.Detail); return(PartialView("_Details", result.Detail)); } } //return PartialView("_Details", (IEnumerable<OrderReqDetailExtend>)aModel); return(PartialView("_Details", aModel)); }
public SearchOrderReqViewModel() { services = new ProductChangeServices(); }
public OrderReqDetailViewModel(string nroPedido) { services = new ProductChangeServices(); LoadDetails(nroPedido); }
public SearchProductChangeViewModel() { _produtChangeServices = new ProductChangeServices(); ProductChangeCollection = new ObservableCollection <Models.OrderReqDetailExtend>(); Search(); }