public ActionResult Delete(int?Id) { ReceiveOrderModel getById = Services.ReceiptOrderService.GetById(Id); // bool status = Services.ReceiptOrderService.Delete(Id); ViewBag.Status = getById.IsFinalize; return(View()); }
public ActionResult Edit(int Id) { ReceiveOrderModel RO = new ReceiveOrderModel(); var ReceiptOrderById = Services.ReceiptOrderService.GetById(Id); RO.purchaseOrderItemList = Services.PurchaseOrderItemsService.GetItemsByPurchase(ReceiptOrderById.PurchaseOrderId ?? 0); RO.ReceiptNumber = ReceiptOrderById.ReceiptNumber; RO.SupplierInvoice = ReceiptOrderById.SupplierInvoice; RO.Id = Id; RO.IsFinalize = ReceiptOrderById.IsFinalize; RO.PurchaseOrderId = ReceiptOrderById.PurchaseOrderId; var receiptOrderItemList = Services.ReceiptOrderService.GetByReceiptOrderId(Id); RO.ReceiptOrderItems = ReceiptOrderById.ReceiptOrderItems; ViewBag.Count = receiptOrderItemList.Count(); return(View(RO)); }
public ActionResult Create(int id) { ReceiveOrderModel ROM = new ReceiveOrderModel(); var list = Services.ReceiptOrderService.GetAllReceipt(); ROM.ReceiptNumber = Helper.CommonFunction.ReceiptNo(list); Session["ReceiveOrder"] = ROM.ReceiptNumber; ROM.PurchaseOrderId = id; var receiptOrder = Services.ReceiptOrderService.ReceiptByPurchaseOrder(id); if (receiptOrder != null) { ROM.IsFinalize = receiptOrder.IsFinalize; } var create = Services.ReceiptOrderService.Create(ROM); var ReceiptOrder = Services.ReceiptOrderService.GetAllReceiptOrder(id); var purchaseOrderItemList = Services.PurchaseOrderItemsService.GetItemsByPurchase(id); ROM.purchaseOrderItemList = purchaseOrderItemList; ViewBag.ReceiptId = ReceiptOrder.FirstOrDefault().Id; return(View(ROM)); }
public JsonResult Edit(int Id, ReceiveOrderModel model) { bool edit = Services.ReceiptOrderService.EditReceiptOrder(model); return(Json(edit, JsonRequestBehavior.AllowGet)); }
public JsonResult Create(int Id, ReceiveOrderModel model) { bool create = Services.ReceiptOrderService.AddReceiptOrder(model); return(Json(create, JsonRequestBehavior.AllowGet)); }
public bool Create(ReceiveOrderModel model) { return(ServerResponse.Invoke <bool>("/api/receiptOrder/create", JsonConvert.SerializeObject(model), "POST")); }
public bool EditReceiptOrder(ReceiveOrderModel model) { return(ServerResponse.Invoke <bool>("/api/receiptOrder/EditReceiptOrder?Id=" + model.Id, JsonConvert.SerializeObject(model), "POST")); }