private void ApprovedOutData() { PmsCommonEnum.PlanPhase planPhase = (PmsCommonEnum.PlanPhase)System.Enum.Parse(typeof(PmsCommonEnum.PlanPhase), SdpDetailResult.Phase); TextBoxPhase.Text = planPhase.GetDescription(); this.TextBoxAuditStatus.Text = SdpDetailResult.AuditStatusDesc; this.TextBoxTaskStatus.Text = SdpDetailResult.TaskStatusDesc; this.TextBoxTaskName.Text = SdpDetailResult.TaskName; this.DropDownListOperationType.Items.Add(new ListItem(SdpDetailResult.OperationTypeDesc, SdpDetailResult.OperationType.ToString())); this.DropDownListTaskType.Items.Add(new ListItem(SdpDetailResult.TaskTypeDesc, SdpDetailResult.TaskType.ToString())); this.DropDownListFunctionType.Items.Add(new ListItem(SdpDetailResult.FunctionTypeDesc, SdpDetailResult.FunctionType.ToString())); this.DropDownListProgramLanguage.Items.Add(new ListItem(SdpDetailResult.ProgramLanguageDesc, SdpDetailResult.ProgramLanguage.ToString())); this.DropDownListTaskComplexity.Items.Add(new ListItem(SdpDetailResult.TaskComplexityDesc, SdpDetailResult.TaskComplexity.ToString())); this.TextBoxRefCost.Text = (SdpDetailResult.Refcost.ToString() == "0") ? "" : SdpDetailResult.Refcost.ToString(); this.TextBoxPlanCost.Text = (SdpDetailResult.Plancost.ToString() == "0") ? "" : SdpDetailResult.Plancost.ToString(); this.DateTextBoxPlanStartDate.Text = new PmsCommonBiz().FormatDateTime(SdpDetailResult.Planstartday.ToString("yyyy-MM-dd").Trim()); this.DateTextBoxPlanEndDate.Text = new PmsCommonBiz().FormatDateTime(SdpDetailResult.Planendday.ToString("yyyy-MM-dd").Trim()); this.DateTextBoxActualStartDate.Text = new PmsCommonBiz().FormatDateTime(SdpDetailResult.Actualstartday.ToString("yyyy-MM-dd").Trim()); this.DateTextBoxActualEndDate.Text = new PmsCommonBiz().FormatDateTime(SdpDetailResult.Actualendday.ToString("yyyy-MM-dd").Trim()); this.TextBoxActualCost.Text = (SdpDetailResult.Actualcost.ToString() == "0") ? "" : SdpDetailResult.Actualcost.ToString(); this.TextBoxCompletionRate.Text = (SdpDetailResult.Completedpercent.ToString() == "0") ? "" : SdpDetailResult.Completedpercent.ToString(); this.DropDownListResource.Items.Add(new ListItem(SdpDetailResult.Resource, SdpDetailResult.Resource)); this.DropDownListRole.Items.Add(new ListItem(SdpDetailResult.Role, SdpDetailResult.Role)); this.TextBoxExecuteRemark.Text = SdpDetailResult.ExecuteRemark; this.HiddenFieldResultTaskStatus.Value = SdpDetailResult.TaskStatus.ToString(); }
private void InitPage() { PmsId = Request.Params["PmsID"]; CrID = Request.Params["CrId"]; Phase = Request.Params["Phase"]; int serial = 0; int.TryParse(Request.Params["Serial"], out serial); if (serial == 0) { return; } else { Serial = serial; } IList <PmsHead> pmsHeadList = new PmsHeadBiz().SelectPmsHead(PmsId, ""); PmsHead ph; if (pmsHeadList != null && pmsHeadList.Count > 0) { ph = pmsHeadList[0]; } else { Msgbox("Data is null"); return; } //IList<PmsHead> pmsHead = new PmsHeadBiz().SelectPmsHead(PmsId, ""); ; //PmsHead ph = pmsHead[0]; TextBoxCrNo.Text = CrID; TextBoxCrName.Text = ph.PmsName; Hashtable rTable = new Hashtable(); rTable.Add("PM", ph.Pm); rTable.Add("SD", ph.Sd); rTable.Add("SE", ph.Se); rTable.Add("QA", ph.Qa); ViewState["Roles"] = rTable; foreach (string key in rTable.Keys) { this.DropDownListRoleInfo.Items.Add(new ListItem(key, rTable[key].ToString())); } PmsCommonEnum.PlanPhase planPhase = (PmsCommonEnum.PlanPhase)System.Enum.Parse(typeof(PmsCommonEnum.PlanPhase), Phase); TextBoxPhase.Text = planPhase.GetDescription(); BindDropDownList(); EditOutData(); }
private void InitPage() { PmsId = Request.Params["PmsID"]; CrID = Request.Params["CrId"]; if (string.IsNullOrEmpty(Request.Params["Phase"])) { PhaseNull = true; } Phase = Request.Params["Phase"]; string Action = Request.Params["Action"]; IList <PmsHead> pmsHead = new PmsHeadBiz().SelectPmsHeadByPmsId(PmsId); if (pmsHead != null && pmsHead.Count > 0) { ObjPmsHead = pmsHead[0]; } else { Msgbox("Data Bind Error!"); return; } TextBoxCrNo.Text = CrID; TextBoxCrName.Text = ObjPmsHead.PmsName; Hashtable rTable = new Hashtable(); rTable.Add("PM", ObjPmsHead.Pm); rTable.Add("SD", ObjPmsHead.Sd); rTable.Add("SE", ObjPmsHead.Se); rTable.Add("QA", ObjPmsHead.Qa); ViewState["Roles"] = rTable; foreach (string key in rTable.Keys) { this.DropDownListRoleInfo.Items.Add(new ListItem(key, rTable[key].ToString())); } if (!PhaseNull) { PmsCommonEnum.PlanPhase planPhase = (PmsCommonEnum.PlanPhase)System.Enum.Parse(typeof(PmsCommonEnum.PlanPhase), Phase); TextBoxPhase.Text = planPhase.GetDescription(); TextBoxPhase.Visible = true; LabelPhaseMark.Visible = false; DropDownListPhases.Visible = false; } BindDropDownList(); if (Action != "Add") { EditOutData(); } }
protected void Page_Load(object sender, EventArgs e) { string PmsId = Request.QueryString["PmsID"]; string CrID = Request.QueryString["CrId"]; string Phase = Request.QueryString["Phase"]; int Serial = 0; int.TryParse(Request.QueryString["Serial"], out Serial); if (PmsId == null || CrID == null || Phase == null || Serial == 0) { return; } IList <PmsHead> pmsHeadList = new PmsHeadBiz().SelectPmsHead(PmsId, ""); PmsHead pmsHead; if (pmsHeadList != null && pmsHeadList.Count > 0) { pmsHead = pmsHeadList[0]; } else { return; } SdpDetail sdpDetailParms = new SdpDetail(); sdpDetailParms.Serial = Serial; sdpDetailParms.Pmsid = PmsId; IList <SdpDetail> sdpDetailList = new SdpDetailBiz().SelectSdpDetail(sdpDetailParms); SdpDetail sdpDetailResult = (sdpDetailList == null || sdpDetailList.Count == 0) ? new SdpDetail() : sdpDetailList[0]; PmsCommonEnum.PlanPhase planPhase = (PmsCommonEnum.PlanPhase)System.Enum.Parse(typeof(PmsCommonEnum.PlanPhase), Phase); string phaseDescription = planPhase.GetDescription(); string formatPlanstartday = new PmsCommonBiz().FormatDateTime(sdpDetailResult.Planstartday.ToString("yyyy-MM-dd").Trim()); string formatPlanendday = new PmsCommonBiz().FormatDateTime(sdpDetailResult.Planendday.ToString("yyyy-MM-dd").Trim()); string resultHtml = "<table class='ViewTaskTable'>" + "<tr><td><span class='ViewTaskSpan'>CR No</span></td><td colspan='3'><input type='text' class='ViewTaskOnlyTextBox' value='" + pmsHead.CrId + "' /></td></tr>" + "<tr><td><span class='ViewTaskSpan'>CR Name</span></td><td colspan='3'><input type='text' class='ViewTaskOnlyTextBox' value='" + pmsHead.PmsName + "'style='width: 325px;'/></td></tr>" + "<tr><td><span class='ViewTaskSpan'>任务阶段</span></td><td><input type='text' class='ViewTaskOnlyTextBox' value='" + phaseDescription + "'/></td>" + "<td><span class='ViewTaskSpan'>审核状态</span></td><td><input type='text' class='ViewTaskOnlyTextBox' value='" + sdpDetailResult.AuditStatusDesc + "' /></td></tr>" + "<tr><td><span class='ViewTaskSpan'>任务状态</span></td><td><input type='text' class='ViewTaskOnlyTextBox' value='" + sdpDetailResult.TaskStatusDesc + "' /></td><td> </td><td> </td></tr>" + "<tr><td><span class='ViewTaskSpan'>任务名称</span></td>" + "<td colspan='3'><div style=' border-bottom: 1px solid #CCCCCC;width: 325px; white-space: normal;text-overflow: ellipsis; text-align: Left'>" + sdpDetailResult.TaskName + "</div></td></tr>" + "<tr><td><span class='ViewTaskSpan'>作业方式</span></td><td><input type='text' class='ViewTaskOnlyTextBox' value='" + sdpDetailResult.OperationTypeDesc + "'/></td>" + "<td><span class='ViewTaskSpan'>任务类型</span></td><td><input type='text' class='ViewTaskOnlyTextBox' value='" + sdpDetailResult.TaskTypeDesc + "'/></td></tr>" + "<tr><td><span class='ViewTaskSpan'>功能分类</span></td><td><input type='text' class='ViewTaskOnlyTextBox' value='" + sdpDetailResult.FunctionTypeDesc + "'/></td>" + "<td><span class='ViewTaskSpan'>语言</span></td><td><input type='text' class='ViewTaskOnlyTextBox' value='" + sdpDetailResult.ProgramLanguageDesc + "'/></td></tr>" + "<tr><td><span class='ViewTaskSpan'>复杂度</span></td>" + "<td colspan='3'><input type='text' class='ViewTaskOnlyTextBox' value='" + sdpDetailResult.TaskComplexityDesc + "'/></td></tr>" + "<tr><td><span class='ViewTaskSpan'>参考工时</span></td><td><input type='text' class='ViewTaskOnlyTextBox' value='" + sdpDetailResult.Actualcost + "' /></td>" + "<td><span class='ViewTaskSpan'>计划工时</span></td><td><input type='text' class='ViewTaskOnlyTextBox' value='" + sdpDetailResult.Plancost + "' /></td></tr>" + "<tr><td><span class='ViewTaskSpan'>计划开始</span></td><td><input type='text' class='ViewTaskOnlyTextBox' value='" + formatPlanstartday + "' /></td>" + "<td><span class='ViewTaskSpan'>计划结束</span></td><td><input type='text' class='ViewTaskOnlyTextBox' value='" + formatPlanendday + "' /> </td></tr>" + "<tr><td><span class='ViewTaskSpan'>指派给</span></td>" + "<td><input type='text' class='ViewTaskOnlyTextBox' value='" + sdpDetailResult.Resource + "'/></td><td><span class='ViewTaskSpan'>资源角色</span></td>" + "<td><input type='text' class='ViewTaskOnlyTextBox' value='" + sdpDetailResult.Role + "'/></td></tr>" + "<tr><td><span class='ViewTaskSpan'>说明</span></td>" + "<td colspan='3'><div style='border-bottom: 1px solid #CCCCCC; width: 325px; white-space: normal;text-overflow: ellipsis; text-align: Left'>" + sdpDetailResult.ScheduleRemark + "</div></td></tr>"; Response.Write(resultHtml); }