示例#1
0
        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));
        }
示例#2
0
        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));
        }
示例#3
0
        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));
        }