public ActionResult AddTask() { Project_Property objtimeline = new Project_Property(); ProjectType_BLL objProjectTypeBLL = new ProjectType_BLL(); objProjectProperty = new Project_Property(); objProjectBll = new Project_BLL(objProjectProperty); DataTable projects = objProjectBll.SelectAll(); List <Project_Property> ProjectType_PropertylistItems = new List <Project_Property>(); foreach (DataRow dr in projects.Rows) { Project_Property objProjectType_Property = new Project_Property(); objProjectType_Property.Project_Name = dr["Project_Name"].ToString(); objProjectType_Property.Project_Id = Convert.ToInt32(dr["Project_Id"].ToString()); ProjectType_PropertylistItems.Add(objProjectType_Property); } objtimeline.Start_Date = DateTime.Now; objtimeline.Expected_completedDate = DateTime.Now; objtimeline.Project_Item = ProjectType_PropertylistItems; GetEmployee(); GetMilestones(); return(View(objtimeline)); }
public JsonResult getProjectType() { objProjTypeBLL = new ProjectType_BLL(); DataTable Designation = objProjTypeBLL.SelectAll(); var projecttype = JsonConvert.SerializeObject(Designation); var deserilize = JsonConvert.DeserializeObject(projecttype); //objDesignationBLL.Dispose(); return(Json(new { ptype = projecttype }, JsonRequestBehavior.AllowGet)); }
public ActionResult ShowProjectType(int id) { objProjTypeProp = new ProjectType_Property(); objProjTypeProp.Project_type_id = id; objProjTypeProp.TableName = "tblProjectType"; objProjTypeBLL = new ProjectType_BLL(objProjTypeProp); DataTable dt = objProjTypeBLL.SelectOne(); ViewBag.Client = dt; return(View(objProjTypeBLL)); }
public void GetProjectType() { ProjectType_BLL objProjectTypeBLL = new ProjectType_BLL(); DataTable dt = objProjectTypeBLL.SelectAll(); List <ProjectType_Property> ProjectType_PropertylistItems = new List <ProjectType_Property>(); foreach (DataRow dr in dt.Rows) { ProjectType_Property objProjectType_Property = new ProjectType_Property(); objProjectType_Property.Project_type = dr["ProjectType"].ToString(); objProjectType_Property.Project_type_id = Convert.ToInt32(dr["ProjectTypeId"].ToString()); ProjectType_PropertylistItems.Add(objProjectType_Property); } ViewBag.Project_Type = ProjectType_PropertylistItems; }
public JsonResult AddProjectType(ProjectType_Property projecttype) { if (ModelState.IsValid) { if (projecttype.Project_type_id <= 0 || projecttype.Project_type_id == null) { projecttype.InsertionDate = DateTime.Now; projecttype.Status = "Active"; projecttype.Is_active = true; projecttype.InsertBy = SessionManager.CurrentUser.ID; objProjTypeBLL = new ProjectType_BLL(projecttype); var flag = objProjTypeBLL.Insert(); if (flag) { return(Json(new { success = true, statuscode = 200, msg = "Successfully inserted" }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { success = false, statuscode = 500, msg = "Failed" }, JsonRequestBehavior.AllowGet)); } } else { objProjTypeBLL = new ProjectType_BLL(projecttype); var flag = objProjTypeBLL.Insert(); if (flag) { return(Json(new { success = true, statuscode = 200, msg = "Successfully Updated" }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { success = false, statuscode = 500, msg = "Failed" }, JsonRequestBehavior.AllowGet)); } } } else { return(Json(new { success = false, statuscode = 500, msg = "Please Enter According To Instructions" }, JsonRequestBehavior.AllowGet)); } }