public static List <ProjectStatus> GetAllStatus(int projectID) { List <ProjectStatus> prjStatusList = new List <ProjectStatus>(); ProjectStatus status = null; using (DataSet dsProjectStatusDetails = DAL.ProjectStatus.GetAllStatuses(projectID)) { if ((dsProjectStatusDetails != null) && (dsProjectStatusDetails.Tables.Count > 0) && (dsProjectStatusDetails.Tables[0].Rows.Count > 0)) { foreach (DataRow row in dsProjectStatusDetails.Tables[0].Rows) { status = new ProjectStatus(Convert.ToInt32(row["ProjectStatusID"]), Convert.ToDateTime(row["ProjectStatusDate"]), Delivery.GetDelivery(Convert.ToInt32(row["ProjectDelivery_DeliveryId"])), BusinessDevelopment.GetBusinessDevelopment(Convert.ToInt32(row["ProjectBusinessDevelopment_BusinessDevelopmentId"]))); prjStatusList.Add(status); } } } return(prjStatusList); }
public static List<ProjectStatus> GetAllStatus(int projectID) { List<ProjectStatus> prjStatusList = new List<ProjectStatus>(); ProjectStatus status = null; using (DataSet dsProjectStatusDetails = DAL.ProjectStatus.GetAllStatuses(projectID)) { if ((dsProjectStatusDetails != null) && (dsProjectStatusDetails.Tables.Count > 0) && (dsProjectStatusDetails.Tables[0].Rows.Count > 0)) { foreach (DataRow row in dsProjectStatusDetails.Tables[0].Rows) { status = new ProjectStatus(Convert.ToInt32(row["ProjectStatusID"]), Convert.ToDateTime(row["ProjectStatusDate"]), Delivery.GetDelivery(Convert.ToInt32(row["ProjectDelivery_DeliveryId"])), BusinessDevelopment.GetBusinessDevelopment(Convert.ToInt32(row["ProjectBusinessDevelopment_BusinessDevelopmentId"]))); prjStatusList.Add(status); } } } return prjStatusList; }
public static ProjectStatus GetRecentProjectStatus(int projectID) { ProjectStatus prjStatus = null; using (DataSet dsStatusDetails = DAL.ProjectStatus.GetRecentProjectStatus(projectID)) { if ((dsStatusDetails != null) && (dsStatusDetails.Tables.Count > 0)) { if (dsStatusDetails.Tables[0].Rows.Count > 0) { prjStatus = new ProjectStatus(Convert.ToInt32(dsStatusDetails.Tables[0].Rows[0]["ProjectStatusID"]), Convert.ToDateTime(dsStatusDetails.Tables[0].Rows[0]["ProjectStatusDate"].ToString()), Delivery.GetDelivery(Convert.ToInt32(dsStatusDetails.Tables[0].Rows[0]["ProjectDelivery_DeliveryId"])), BusinessDevelopment.GetBusinessDevelopment(Convert.ToInt32(dsStatusDetails.Tables[0].Rows[0]["ProjectBusinessDevelopment_BusinessDevelopmentId"]))); } else { prjStatus = new ProjectStatus(); } } } return(prjStatus); }
public static ProjectStatus GetRecentProjectStatus(int projectID) { ProjectStatus prjStatus = null; using (DataSet dsStatusDetails = DAL.ProjectStatus.GetRecentProjectStatus(projectID)) { if ((dsStatusDetails != null) && (dsStatusDetails.Tables.Count > 0)) { if (dsStatusDetails.Tables[0].Rows.Count > 0) { prjStatus = new ProjectStatus(Convert.ToInt32(dsStatusDetails.Tables[0].Rows[0]["ProjectStatusID"]), Convert.ToDateTime(dsStatusDetails.Tables[0].Rows[0]["ProjectStatusDate"].ToString()), Delivery.GetDelivery(Convert.ToInt32(dsStatusDetails.Tables[0].Rows[0]["ProjectDelivery_DeliveryId"])), BusinessDevelopment.GetBusinessDevelopment(Convert.ToInt32(dsStatusDetails.Tables[0].Rows[0]["ProjectBusinessDevelopment_BusinessDevelopmentId"]))); } else prjStatus = new ProjectStatus(); } } return prjStatus; }
public ActionResult AddProjectDetails() { int projectId = Convert.ToInt32(Request.Form["ProjectId"]); Project project = BAL.Project.GetProject(projectId); BusinessDevelopment businessDevelopment = new BusinessDevelopment(0, new StatusItem(0, (Status)Convert.ToChar(Request.Form["ProjectBusinessDevelopment.KnownOpportunity.Status"]), Request.Form["ProjectBusinessDevelopment.ClientContact.Comment"].ToString()), new StatusItem(0, (Status)Convert.ToChar(Request.Form["ProjectBusinessDevelopment.ClientContact.Status"]), Request.Form["ProjectBusinessDevelopment.ClientContact.Comment"].ToString())); Delivery delivery = new Delivery(0, //deliverables and Results new StatusItem(0, (Status)Convert.ToChar(Request.Form["ProjectDelivery.DeliverablesAndResults.Status"]), Request.Form["ProjectDelivery.DeliverablesAndResults.Comment"].ToString()), //Schedule new StatusItem(0, (Status)Convert.ToChar(Request.Form["ProjectDelivery.Schedule.Status"]), Request.Form["ProjectDelivery.Schedule.Comment"].ToString()), //Capacity Resource new StatusItem(0, (Status)Convert.ToChar(Request.Form["ProjectDelivery.CapacityResources.Status"]), Request.Form["ProjectDelivery.CapacityResources.Comment"].ToString()), //Scope new StatusItem(0, (Status)Convert.ToChar(Request.Form["ProjectDelivery.Scope.Status"]), Request.Form["ProjectDelivery.Scope.Comment"].ToString()), //Client Satisfaction new StatusItem(0, (Status)Convert.ToChar(Request.Form["ProjectDelivery.ClientSatisfaction.Status"]), Request.Form["ProjectDelivery.ClientSatisfaction.Comment"].ToString()), //Issues And Risks new StatusItem(0, (Status)Convert.ToChar(Request.Form["ProjectDelivery.IssuesAndRisks.Status"]), Request.Form["ProjectDelivery.IssuesAndRisks.Comment"].ToString()), //UOTC new StatusItem(0, (Status)Convert.ToChar(Request.Form["ProjectDelivery.UseOfTestControl.Status"]), Request.Form["ProjectDelivery.UseOfTestControl.Comment"].ToString()), //Employee Satisfaction new StatusItem(0, (Status)Convert.ToChar(Request.Form["ProjectDelivery.EmployeeSatisfactionIssues.Status"]), Request.Form["ProjectDelivery.EmployeeSatisfactionIssues.Comment"].ToString())); ProjectStatus status = new ProjectStatus(0, DateTime.Now, delivery, businessDevelopment); project.ProjectStatusList[0] = status; project.ProjectStatusList[0].InsertStatus(project.ProjectID); return RedirectToAction("ProjectDetails", new { ProjectList = project.ProjectID }); }