public ActionResult SearchProduct(ProductFilter filter, int recordID) { filter.ForRepair = true; var model = new ImexItemList(recordID, filter.WarehouseID.Value, ImexItem.Find(UserID, Employee.ID, filter.Action, Employee.BussinessID, filter)); return(Json(new { result = true, html = RenderPartialViewToString("ProductList", model) }, JsonRequestBehavior.AllowGet)); }
public ActionResult AddProduct(int id, int subID) { var available = ImexItem.Available(id, subID, TransactionClass.Warranty); if (available > 0) { Warranty.AddProduct(UserID, Employee.ID, Employee.BussinessID, id, subID); } var model = Warranty.GetProducts(UserID, Employee.ID, subID); return(Json(new { result = true, html = RenderPartialViewToString("WarrantyProduct", model) }, JsonRequestBehavior.AllowGet)); }