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 getProjects() { objProjectProperty = new Project_Property(); objProjectBll = new Project_BLL(objProjectProperty); DataTable projects = objProjectBll.SelectAll(); var projectsJson = JsonConvert.SerializeObject(projects); var deserilize = JsonConvert.DeserializeObject(projectsJson); return(Json(new { projectlist = projectsJson }, JsonRequestBehavior.AllowGet)); }
public ActionResult AddTimeLine() { TimeLine_Property objtimeline = new TimeLine_Property(); objtimeline.Project_Item = GetProjects(); 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.Project_Item = ProjectType_PropertylistItems; return(View(objtimeline)); }