public ActionResult Add() { IndentsViewModel model = new IndentsViewModel(); model.Id = 0; return(View(model)); }
public ActionResult Update(int?Id) { IndentsViewModel model = new IndentsViewModel(); model.Id = Id ?? 0; return(View(model)); }
public ActionResult List() { IndentsViewModel model = new IndentsViewModel(); model.Sites = _siteService.GetAll("").ToArray(); model.Plants = this._plantService.GetPlantsForSite(model.Sites.Select(s => s.Id).FirstOrDefault()); return(View(model)); }
public JsonResult GetPOById(int Id) { IndentsViewModel model = new IndentsViewModel(); Data.Models.Indent objPO = this._indentService.GetForId(Id); if (objPO != null) { model.ItemName = objPO.ItemName; model.Specification = objPO.Specification; model.QtyInStock = objPO.QtyInStock; model.Priority = objPO.Priority; model.PlantId = objPO.PlantId; model.UnitPrice = objPO.UnitPrice; model.UnitPrice = objPO.TotalAmount; model.QtyNeeded = objPO.QtyNeeded; model.IndentNo = objPO.IndentNo; } return(Json(model, JsonRequestBehavior.AllowGet)); }
public JsonResult GetIndentById(int Id) { IndentsViewModel model = new IndentsViewModel(); Data.Models.Indent objIn = this._indentService.GetForId(Id); if (objIn != null) { model.SiteId = 1; // model.PlantId = objIn.PlantId; //model.ItemName = objIn.ItemName; //model.Specification = objIn.Specification; //model.Description = objIn.Description; //model.QtyInStock = objIn.QtyInStock; //model.QtyNeeded = objIn.QtyNeeded; //model.UnitPrice = objIn.UnitPrice; //model.TotalAmount = objIn.TotalAmount; //model.Priority = objIn.Priority; //model.PreferredVendorId = objIn.PreferredVendorId; //model.VendorCategoryId = objIn.Vendor.CategoryId; } return(Json(model, JsonRequestBehavior.AllowGet)); }