public ProjectStatus(int statusID, DateTime date, Delivery delivery, BusinessDevelopment businessDevelopment) { this.ProjectStatusID = statusID; this.ProjectStatusDate = date; this.ProjectDelivery = delivery; this.ProjectBusinessDevelopment = businessDevelopment; }
public static Delivery GetDelivery(int deliveryID) { Delivery delivery = null; using (DataSet dsDeliveryDetails = DAL.Delivery.GetDeivery(deliveryID)) { if ((dsDeliveryDetails != null) && (dsDeliveryDetails.Tables.Count > 0)) { delivery = new Delivery(Convert.ToInt32(dsDeliveryDetails.Tables[0].Rows[0]["DeliveryID"]), BAL.StatusItem.GetStatusItem(Convert.ToInt32(dsDeliveryDetails.Tables[0].Rows[0]["DeliverablesAndResults_StatusItemID"])), BAL.StatusItem.GetStatusItem(Convert.ToInt32(dsDeliveryDetails.Tables[0].Rows[0]["Schedule_StatusItemID"])), BAL.StatusItem.GetStatusItem(Convert.ToInt32(dsDeliveryDetails.Tables[0].Rows[0]["CapacityResource_StatusItemID"])), BAL.StatusItem.GetStatusItem(Convert.ToInt32(dsDeliveryDetails.Tables[0].Rows[0]["Scope_StatusItemID"])), BAL.StatusItem.GetStatusItem(Convert.ToInt32(dsDeliveryDetails.Tables[0].Rows[0]["ClientSatisfaction_StatusItemID"])), BAL.StatusItem.GetStatusItem(Convert.ToInt32(dsDeliveryDetails.Tables[0].Rows[0]["IssuesAndRisks_StatusItemID"])), BAL.StatusItem.GetStatusItem(Convert.ToInt32(dsDeliveryDetails.Tables[0].Rows[0]["UseOfTestControl_StatusItemID"])), BAL.StatusItem.GetStatusItem(Convert.ToInt32(dsDeliveryDetails.Tables[0].Rows[0]["EmployeeSatisfaction_StatusItemID"]))); } } return delivery; }
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 }); }