public ActionResult EditingPopup_Update([DataSourceRequest] DataSourceRequest request, ABUFORM.Models.ProjectInfoModel projects) { if (projects != null && ModelState.IsValid) { BusinessLogic.Entities.ProjectInfo projectE = new BusinessLogic.Entities.ProjectInfo(); projectE.Id = projects.Id; projectE.Project = projects.Project; projectE.PM = projects.PM; projectE.ProjectComment = projects.ProjectComment; // projectE.ProjectStatus.StatusName = projects.StatusName; _projects.CreateProjects(projectE); } return Json(new[] { projects }.ToDataSourceResult(request, ModelState)); }
public ActionResult EditingPopup_Create([DataSourceRequest] DataSourceRequest request, ABUFORM.Models.ProjectInfoModel projects) { if (projects.PM != null && ModelState.IsValid && projects.ProjectComment != null )//&&projects.Status!= null) { BusinessLogic.Entities.ProjectInfo projectE = new BusinessLogic.Entities.ProjectInfo(); projectE.Id = projects.Id; projectE.Project = projects.Project; projectE.PM = projects.PM; projectE.ProjectComment = projects.ProjectComment; //projectE.ProjectStatus.StatusName = projects.StatusName; _projects.CreateProjects(projectE); } else { ShowJavascriptMessage("Please fill up the form"); return View(projects); } return Json(new[] { projects }.ToDataSourceResult(request, ModelState)); }
public ActionResult EditingPopup_Destroy([DataSourceRequest] DataSourceRequest request, ABUFORM.Models.ProjectInfoModel projects) { if (projects != null) { BusinessLogic.Entities.ProjectInfo projectE = new BusinessLogic.Entities.ProjectInfo(); projectE.Id = projects.Id; projectE.Project = projects.Project; //projectE.ImageUrl = projects.ImageUrl; projectE.PM = projects.PM; projectE.ProjectComment = projects.ProjectComment; //projectE.ProjectStatus.StatusName = projects.StatusName; _projects.DeleteProject(projectE); } return Json(new[] { projects }.ToDataSourceResult(request, ModelState)); }