protected void ugrdEstQuestion_InitializeRow(object sender, RowEventArgs e) { string q_sbj_id = DataTypeUtility.GetString(e.Row.Cells.FromKey("Q_SBJ_ID")); Biz_QuestionItems questionItems = new Biz_QuestionItems(); DataTable dt_q_item = questionItems.GetQuestionItem("", q_sbj_id, Q_OBJ_ID).Tables[0]; TemplatedColumn tc = (TemplatedColumn)e.Row.Band.Columns.FromKey("Q_ITEM"); RadioButtonList rdoQuestionItem = (RadioButtonList)((CellItem)tc.CellItems[e.Row.Index]).FindControl("rdoQuestionItem"); rdoQuestionItem.RepeatDirection = RepeatDirection.Horizontal; rdoQuestionItem.RepeatLayout = RepeatLayout.Table; rdoQuestionItem.DataSource = dt_q_item; rdoQuestionItem.DataBind(); Biz_QuestionDatas questionDatas = new Biz_QuestionDatas(COMP_ID , EST_ID , ESTTERM_REF_ID , ESTTERM_SUB_ID , ESTTERM_STEP_ID , EST_DEPT_ID , EST_EMP_ID , TGT_DEPT_ID , TGT_EMP_ID , q_sbj_id); WebUtility.FindByValueRadioButtonList(rdoQuestionItem, questionDatas.Q_Itm_ID); }
private DataTable GetQuestionSubDataTable(DataTable dt, DataList dl) { //TOTALPOINT = 0; for (int i = 0; i < dl.Items.Count; i++) { RadioButtonList rBtnList = dl.Items[i].FindControl("rBtnList") as RadioButtonList; TextBox txtTextValue = dl.Items[i].FindControl("txtLevelTextValue") as TextBox; TextBox txtOpinion = dl.Items[i].FindControl("txtLevelOpinion") as TextBox; HiddenField hAttachNo = dl.Items[i].FindControl("hAttachNo") as HiddenField; Q_SBJ_ID = dl.DataKeys[dl.Items[i].ItemIndex].ToString(); Q_ITM_ID = rBtnList.SelectedValue; Biz_QuestionItems questionItems = new Biz_QuestionItems(Q_ITM_ID, Q_SBJ_ID, Q_OBJ_ID); Biz_QuestionSubjects questionSubjects = new Biz_QuestionSubjects(Q_SBJ_ID); TOTALPOINT += (questionItems.Point * questionSubjects.Weight); string[,] saAttachInfo = TypeUtility.GetSplit(hAttachNo.Value); string strAttach = hAttachNo.Value; if (saAttachInfo.Length / 2 >= 1) { if (Convert.ToInt32(saAttachInfo[1, 0]) > 0) { strAttach = saAttachInfo[0, 0]; } } DataRow dataRow = dt.NewRow(); dataRow["COMP_ID"] = COMP_ID; dataRow["EST_ID"] = EST_ID; dataRow["ESTTERM_REF_ID"] = ESTTERM_REF_ID; dataRow["ESTTERM_SUB_ID"] = ESTTERM_SUB_ID; dataRow["ESTTERM_STEP_ID"] = ESTTERM_STEP_ID; dataRow["EST_DEPT_ID"] = EST_DEPT_ID; dataRow["EST_EMP_ID"] = EST_EMP_ID; dataRow["TGT_DEPT_ID"] = TGT_DEPT_ID; dataRow["TGT_EMP_ID"] = TGT_EMP_ID; dataRow["Q_OBJ_ID"] = Q_OBJ_ID; dataRow["Q_SBJ_ID"] = Q_SBJ_ID; dataRow["Q_ITM_ID"] = Q_ITM_ID; dataRow["POINT"] = questionItems.Point; //dataRow["GRADE_ID"] = ""; dataRow["TEXT_VALUE"] = txtTextValue.Text; dataRow["OPINION"] = txtOpinion.Text; dataRow["ATTACH_NO"] = strAttach; dataRow["USER"] = EMP_REF_ID; dt.Rows.Add(dataRow); } return(dt); }
protected DataTable Get_SaveDT_EstQuestion() { Biz_QuestionDatas questionDatas = new Biz_QuestionDatas(); DataTable saveDT = questionDatas.GetDataTableSchema(); TOTALPOINT = 0; for (int i = 0; i < ugrdEstQuestion.Rows.Count; i++) { DataRow dr = saveDT.NewRow(); TemplatedColumn tc = (TemplatedColumn)ugrdEstQuestion.Rows[i].Cells.FromKey("Q_ITEM").Column; RadioButtonList rdoQuestionItem = (RadioButtonList)((CellItem)tc.CellItems[i]).FindControl("rdoQuestionItem"); string q_obj_id = Q_OBJ_ID; string q_sbj_id = DataTypeUtility.GetString(ugrdEstQuestion.Rows[i].Cells.FromKey("Q_SBJ_ID").Value); string q_itm_id = DataTypeUtility.GetString(rdoQuestionItem.SelectedValue); Biz_QuestionItems bizQuestionItm = new Biz_QuestionItems(q_itm_id, q_sbj_id, q_obj_id); double weight = bizQuestionItm.Weight; double point = bizQuestionItm.Point * weight / 100; dr["COMP_ID"] = COMP_ID; dr["EST_ID"] = EST_ID; dr["ESTTERM_REF_ID"] = ESTTERM_REF_ID; dr["ESTTERM_SUB_ID"] = ESTTERM_SUB_ID; dr["ESTTERM_STEP_ID"] = ESTTERM_STEP_ID; dr["EST_DEPT_ID"] = EST_DEPT_ID; dr["EST_EMP_ID"] = EST_EMP_ID; dr["TGT_DEPT_ID"] = TGT_DEPT_ID; dr["TGT_EMP_ID"] = TGT_EMP_ID; dr["Q_OBJ_ID"] = q_obj_id; dr["Q_SBJ_ID"] = q_sbj_id; dr["Q_ITM_ID"] = q_itm_id; dr["POINT"] = point; dr["GRADE_ID"] = ""; dr["TEXT_VALUE"] = ""; dr["OPINION"] = ""; dr["ATTACH_NO"] = ""; dr["USER"] = gUserInfo.Emp_Ref_ID; TOTALPOINT += point; saveDT.Rows.Add(dr); } return(saveDT); }
private DataTable GetQuestionSubDataTable(DataTable dt, DataList dl) { // TOTALPOINT = 0; for (int i = 0; i < dl.Items.Count; i++) { RadioButtonList rBtnList = dl.Items[i].FindControl("rBtnList") as RadioButtonList; TextBox txtValue = dl.Items[i].FindControl("txtLevelValue") as TextBox; HiddenField hdfSubItmYN = dl.Items[i].FindControl("tmpSubItmYN") as HiddenField; Q_SBJ_ID = dl.DataKeys[dl.Items[i].ItemIndex].ToString(); Q_ITM_ID = rBtnList.SelectedValue; Biz_QuestionItems questionItems = new Biz_QuestionItems(Q_ITM_ID, Q_SBJ_ID, Q_OBJ_ID); Biz_QuestionSubjects questionSubjects = new Biz_QuestionSubjects(Q_SBJ_ID); DataRow dataRow = dt.NewRow(); if (hdfSubItmYN.Value == "1") { txtValueText = txtValue.Text; dataRow["COMP_ID"] = COMP_ID; dataRow["EST_ID"] = EST_ID; dataRow["ESTTERM_REF_ID"] = ESTTERM_REF_ID; dataRow["ESTTERM_SUB_ID"] = ESTTERM_SUB_ID; dataRow["ESTTERM_STEP_ID"] = ESTTERM_STEP_ID; dataRow["EST_DEPT_ID"] = EST_DEPT_ID; dataRow["EST_EMP_ID"] = EST_EMP_ID; dataRow["PRJ_REF_ID"] = PRJ_REF_ID; dataRow["Q_OBJ_ID"] = Q_OBJ_ID; dataRow["Q_SBJ_ID"] = Q_SBJ_ID; dataRow["Q_ITM_ID"] = Q_ITM_ID; dataRow["POINT"] = txtValue.Text; dataRow["GRADE_ID"] = ""; dataRow["TEXT_VALUE"] = txtValue.Text; dataRow["OPINION"] = ""; dataRow["ATTACH_NO"] = ""; //dataRow["USER"] = EMP_REF_ID; dataRow["USER"] = TGT_EMP_ID; } else { dataRow["COMP_ID"] = COMP_ID; dataRow["EST_ID"] = EST_ID; dataRow["ESTTERM_REF_ID"] = ESTTERM_REF_ID; dataRow["ESTTERM_SUB_ID"] = ESTTERM_SUB_ID; dataRow["ESTTERM_STEP_ID"] = ESTTERM_STEP_ID; dataRow["EST_DEPT_ID"] = EST_DEPT_ID; dataRow["EST_EMP_ID"] = EST_EMP_ID; dataRow["PRJ_REF_ID"] = PRJ_REF_ID; dataRow["Q_OBJ_ID"] = Q_OBJ_ID; dataRow["Q_SBJ_ID"] = Q_SBJ_ID; dataRow["Q_ITM_ID"] = Q_ITM_ID; dataRow["POINT"] = questionItems.Point; dataRow["GRADE_ID"] = ""; dataRow["TEXT_VALUE"] = txtValue.Text; dataRow["OPINION"] = ""; dataRow["ATTACH_NO"] = ""; //dataRow["USER"] = EMP_REF_ID; dataRow["USER"] = TGT_EMP_ID; } dt.Rows.Add(dataRow); } return(dt); }
private void BindingItem(DataListItemEventArgs e) { DataRowView dr = (DataRowView)e.Item.DataItem; string q_sbj_id = DataTypeUtility.GetValue(dr["Q_SBJ_ID"]); string q_sbj_name = DataTypeUtility.GetValue(dr["Q_SBJ_NAME"]); string q_sbj_define = DataTypeUtility.GetValue(dr["Q_SBJ_DEFINE"]); double weight = DataTypeUtility.GetToDouble(dr["WEIGHT"]); quizWeight.Columns.Add(q_sbj_id, typeof(double)); if (quizWeight.Rows.Count == 0) { quizWeight.Rows.Add(weight / 100); } else { quizWeight.Rows[0][q_sbj_id] = weight / 100; } Literal ltrSbjName = e.Item.FindControl("ltrLevelSbjName") as Literal; Literal ltrSbjDefine = e.Item.FindControl("ltrLevelSbjDefine") as Literal; RadioButtonList rBtnList = e.Item.FindControl("rBtnList") as RadioButtonList; TextBox txtValue = e.Item.FindControl("txtLevelValue") as TextBox; HiddenField hdfSubItmYN = e.Item.FindControl("tmpSubItmYN") as HiddenField; Literal ltrPointData = e.Item.FindControl("ltrLevelPointData") as Literal; DataList dtList = e.Item.FindControl("DataList3") as DataList; HtmlTableCell tdHeader = e.Item.FindControl("tdHeader") as HtmlTableCell; HtmlTableCell tdContent = null; if (dtList == null) { tdContent = e.Item.FindControl("tdContent") as HtmlTableCell; } else { tdContent = dtList.FindControl("tdContent") as HtmlTableCell; } TextBoxCommon.SetOnlyPercent(txtValue); ltrSbjName.Text = q_sbj_name; ltrSbjDefine.Text = q_sbj_define; Biz_QuestionItems questionItems = new Biz_QuestionItems(); DataSet ds = questionItems.GetQuestionItem("", q_sbj_id, Q_OBJ_ID); SUBJECT_ITEM_YN = ds.Tables[0].Rows[0]["SUBJECT_ITEM_YN"].ToString(); hdfSubItmYN.Value = SUBJECT_ITEM_YN; if (ds.Tables[0].Rows.Count == 0) { rBtnList.Visible = false; txtValue.Visible = false; txtValue.Width = Unit.Percentage(100); } else if (SUBJECT_ITEM_YN == "1") { rBtnList.Visible = false; txtValue.Visible = true; txtValue.Width = Unit.Percentage(100); Biz_Prj_QuestionData questionDatas = new Biz_Prj_QuestionData(COMP_ID , EST_ID , ESTTERM_REF_ID , ESTTERM_SUB_ID , ESTTERM_STEP_ID , EST_DEPT_ID , EST_EMP_ID , PRJ_REF_ID , q_sbj_id); txtValueText = questionDatas.Text_Value; txtValue.Text = txtValueText; } else { rBtnList.Visible = true; txtValue.Visible = false; // 만약 질의항목에 설명을 표시할 경우 if (_q_item_desc_use_yn.Equals("Y")) { rBtnList.RepeatLayout = RepeatLayout.Table; rBtnList.DataTextField = "Q_ITEM_DESC"; tdHeader.Style.Add("width", "260px"); if (tdContent != null) { tdContent.Style.Add("width", "262px"); } } rBtnList.DataSource = ds; rBtnList.DataBind(); if (READ_ONLY_YN.Equals("N")) { //Biz_Prj_QuestionData questionDatas = new Biz_Prj_QuestionData(COMP_ID // , EST_ID // , ESTTERM_REF_ID // , ESTTERM_SUB_ID // , ESTTERM_STEP_ID // , EST_DEPT_ID // , EST_EMP_ID // , PRJ_REF_ID // , q_sbj_id); //// 데이타 바인딩 //WebUtility.FindByValueRadioButtonList(rBtnList, questionDatas.Q_Itm_ID); Biz_Prj_QuestionData questionDatas = new Biz_Prj_QuestionData(COMP_ID , EST_ID , ESTTERM_REF_ID , ESTTERM_SUB_ID , ESTTERM_STEP_ID , EST_DEPT_ID , EST_EMP_ID , TGT_EMP_ID , PRJ_REF_ID , q_sbj_id); // 데이타 바인딩 WebUtility.FindByValueRadioButtonList(rBtnList, questionDatas.Q_Itm_ID); groupNumber += questionDatas.Point; if (questionDatas.Point.Equals(0)) { noneSelectCount = noneSelectCount + 1; } if (questionDatas.Point > 0) { ltrPointData.Text = "<font color=#BF0000>" + DataTypeUtility.GetToInt32_String(questionDatas.Point, "##.#0") + "</font>점"; //TOTALPOINT += questionDatas.Point * weight; } //----------------- 라디오버튼 유효성 검사 시작 ------------------- string clientIDs = ""; for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { if (i != 0) { clientIDs += ";"; } clientIDs += rBtnList.ClientID + "_" + i.ToString(); } VALID_SCRIPT += string.Format("if(ValidQuestion('{0}', '{1}') == false) return false;", dr["Q_SBJ_NAME"], clientIDs); //----------------- 라디오버튼 유효성 검사 끝 ------------------- } } }
private DataTable GetQuestionSubDataTable(DataTable dt, DataList dl) { Biz_QuestionSubjects questionSubjects = new Biz_QuestionSubjects(); DataTable dtSubject = null; //TOTALPOINT = 0; // 가중치를 가지고 오기 위해서 if (_tgt_pos_biz_use_yn.Equals("N")) { dtSubject = questionSubjects.GetQuestionSubject("", Q_OBJ_ID, "").Tables[0]; double weight_total = DataTypeUtility.GetToDouble(dtSubject.Compute("SUM(WEIGHT)", "1 = 1")); for (int i = 1; i <= dtSubject.Rows.Count; i++) { dtSubject.Rows[i - 1]["WEIGHT"] = DataTypeUtility.GetToDouble(dtSubject.Rows[i - 1]["WEIGHT"]) / weight_total * 100; } } else { dtSubject = questionSubjects.GetQuestionSubject(COMP_ID, EST_ID, TGT_EMP_ID, "").Tables[0]; double weight_total = DataTypeUtility.GetToDouble(dtSubject.Compute("SUM(WEIGHT)", "1 = 1")); for (int i = 1; i <= dtSubject.Rows.Count; i++) { dtSubject.Rows[i - 1]["WEIGHT"] = DataTypeUtility.GetToDouble(dtSubject.Rows[i - 1]["WEIGHT"]) / weight_total * 100; } Q_OBJ_ID = ""; } for (int i = 0; i < dl.Items.Count; i++) { RadioButtonList rBtnList = dl.Items[i].FindControl("rBtnList") as RadioButtonList; TextBox txtValue = dl.Items[i].FindControl("txtLevelValue") as TextBox; Q_SBJ_ID = dl.DataKeys[dl.Items[i].ItemIndex].ToString(); Q_ITM_ID = rBtnList.SelectedValue; Biz_QuestionItems questionItems = new Biz_QuestionItems(Q_ITM_ID, Q_SBJ_ID, Q_OBJ_ID); double weight = DataTypeUtility.GetToDouble(dtSubject.Select(string.Format("Q_SBJ_ID = '{0}'", Q_SBJ_ID))[0]["WEIGHT"]); TOTALPOINT += (questionItems.Point * weight); DataRow dataRow = dt.NewRow(); dataRow["COMP_ID"] = COMP_ID; dataRow["EST_ID"] = EST_ID; dataRow["ESTTERM_REF_ID"] = ESTTERM_REF_ID; dataRow["ESTTERM_SUB_ID"] = ESTTERM_SUB_ID; dataRow["ESTTERM_STEP_ID"] = ESTTERM_STEP_ID; dataRow["EST_DEPT_ID"] = EST_DEPT_ID; dataRow["EST_EMP_ID"] = EST_EMP_ID; dataRow["TGT_DEPT_ID"] = TGT_DEPT_ID; dataRow["TGT_EMP_ID"] = TGT_EMP_ID; dataRow["Q_OBJ_ID"] = Q_OBJ_ID; dataRow["Q_SBJ_ID"] = Q_SBJ_ID; dataRow["Q_ITM_ID"] = Q_ITM_ID; dataRow["POINT"] = questionItems.Point; dataRow["GRADE_ID"] = ""; dataRow["TEXT_VALUE"] = txtValue.Text; dataRow["OPINION"] = ""; dataRow["ATTACH_NO"] = ""; dataRow["USER"] = EMP_REF_ID; dt.Rows.Add(dataRow); } return(dt); }
private void BindingItem_P(DataListItemEventArgs e) { DataRowView dr = (DataRowView)e.Item.DataItem; string q_sbj_id = DataTypeUtility.GetValue(dr["Q_SBJ_ID"]); string q_sbj_name = DataTypeUtility.GetValue(dr["Q_SBJ_NAME"]); string q_sbj_define = DataTypeUtility.GetValue(dr["Q_SBJ_DEFINE"]); double weight = DataTypeUtility.GetToDouble(dr["WEIGHT"]); Literal ltrSbjName = e.Item.FindControl("ltrLevelSbjName") as Literal; Literal ltrSbjDefine = e.Item.FindControl("ltrLevelSbjDefine") as Literal; RadioButtonList rBtnList = e.Item.FindControl("rBtnList") as RadioButtonList; TextBox txtValue = e.Item.FindControl("txtLevelValue") as TextBox; Literal ltrPointData = e.Item.FindControl("ltrLevelPointData") as Literal; DataList dtList = e.Item.FindControl("DataList3") as DataList; HtmlTableRow trTextValue = e.Item.FindControl("trTextValue") as HtmlTableRow; HtmlTableCell tdHeader = null; HtmlTableCell tdContent = null; if (dtList == null) { //tdHeader = Page.FindControl("tdHeader") as HtmlTableCell; tdContent = e.Item.FindControl("tdContent") as HtmlTableCell; } else { //tdHeader = e.Item.FindControl("tdHeader") as HtmlTableCell; tdContent = dtList.FindControl("tdContent") as HtmlTableCell; } //TextBoxCommon.SetOnlyInteger(txtValue); ltrSbjName.Text = q_sbj_name; ltrSbjDefine.Text = q_sbj_define; Biz_QuestionItems questionItems = new Biz_QuestionItems(); DataSet ds = questionItems.GetQuestionItem("", q_sbj_id, Q_OBJ_ID); if (ds.Tables[0].Rows.Count == 0) { rBtnList.Visible = false; txtValue.Visible = false; txtValue.Width = Unit.Percentage(100); } else if (ds.Tables[0].Rows[0]["SUBJECT_ITEM_YN"].ToString() == "1") { rBtnList.Visible = false; txtValue.Visible = true; txtValue.Width = Unit.Percentage(100); } else { rBtnList.Visible = true; // 만약 질의항목에 설명을 표시할 경우 if (_q_item_desc_use_yn.Equals("Y")) { rBtnList.RepeatLayout = RepeatLayout.Table; rBtnList.DataTextField = "Q_ITEM_DESC"; //tdHeader.Style.Add("width", "260px"); if (tdContent != null) { tdContent.Style.Add("width", "262px"); } } // 만약 피드백을 적용할 경우 if (_feedback_yn.Equals("Y")) { if (EST_TGT_TYPE.Equals("TGT")) { txtValue.ReadOnly = true; rBtnList.Enabled = false; } trTextValue.Visible = true; } rBtnList.DataSource = ds; rBtnList.DataBind(); Biz_QuestionDatas questionDatas = new Biz_QuestionDatas(COMP_ID , EST_ID , ESTTERM_REF_ID , ESTTERM_SUB_ID , this.IESTTERM_STEP_PREVIOUS_SELECT , 0 , 0 , TGT_DEPT_ID , TGT_EMP_ID , q_sbj_id); // 데이타 바인딩 WebUtility.FindByValueRadioButtonList(rBtnList, questionDatas.Q_Itm_ID); if (questionDatas.Point > 0) { ltrPointData.Text = "<font color=#BF0000>" + DataTypeUtility.GetToInt32_String(questionDatas.Point, "##.#0") + "</font>점"; } //----------------- 라디오버튼 유효성 검사 시작 ------------------- string clientIDs = ""; for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { if (i != 0) { clientIDs += ";"; } clientIDs += rBtnList.ClientID + "_" + i.ToString(); } VALID_SCRIPT += string.Format("if(ValidQuestion('{0}', '{1}') == false) return false;", dr["Q_SBJ_NAME"], clientIDs); //----------------- 라디오버튼 유효성 검사 끝 ------------------- } }
private void BindingItem_P(DataListItemEventArgs e) { DataRowView dr = (DataRowView)e.Item.DataItem; string q_dfn_id = DataTypeUtility.GetValue(dr["Q_DFN_ID"]); string q_sbj_id = DataTypeUtility.GetValue(dr["Q_SBJ_ID"]); string q_obj_id = DataTypeUtility.GetValue(dr["Q_OBJ_ID"]); string q_sbj_define = DataTypeUtility.GetValue(dr["Q_SBJ_DEFINE"]); string q_sbj_desc = DataTypeUtility.GetValue(dr["Q_SBJ_DESC"]); double weight = DataTypeUtility.GetToDouble(dr["WEIGHT"]); Literal ltrDefine = e.Item.FindControl("ltrLevelDefine") as Literal; Literal ltrDesc = e.Item.FindControl("ltrLevelDesc") as Literal; RadioButtonList rBtnList = e.Item.FindControl("rBtnList") as RadioButtonList; TextBox txtValue = e.Item.FindControl("txtLevelValue") as TextBox; HiddenField hAttachNo = e.Item.FindControl("hAttachNo") as HiddenField; DropDownList ddlFileUpload = e.Item.FindControl("ddlFileUpload") as DropDownList; ImageButton ibnDownload = e.Item.FindControl("ibnDownload") as ImageButton; ImageButton iBtnAttach = e.Item.FindControl("iBtnAttach") as ImageButton; Literal ltrUpload = e.Item.FindControl("ltrUpload") as Literal; TextBox txtTextValue = e.Item.FindControl("txtLevelTextValue") as TextBox; TextBox txtOpinion = e.Item.FindControl("txtLevelOpinion") as TextBox; Literal ltrPointData = e.Item.FindControl("ltrLevelPointData") as Literal; Label lblCnt = e.Item.FindControl("lblCnt") as Label; TextBoxCommon.SetOnlyInteger(txtValue); ltrUpload.Text = string.Format("<a href='#null' onclick=\"mfUpload('{0}');\"><img src='../images/icon/icon_gr_po05.gif' align='absmiddle' border='0'/></a>", hAttachNo.ClientID); ibnDownload.CausesValidation = false; ibnDownload.CommandName = ddlFileUpload.UniqueID; ltrDefine.Text = q_sbj_define; ltrDesc.Text = q_sbj_desc; DropDownListCommom.BindDefaultValue(ddlFileUpload, "--------------------", ""); Biz_QuestionItems questionItems = new Biz_QuestionItems(); DataSet ds = questionItems.GetQuestionItem("", q_sbj_id, Q_OBJ_ID); if (ds.Tables[0].Rows.Count == 0) { rBtnList.Visible = false; txtValue.Visible = false; txtValue.Width = Unit.Percentage(100); } else if (ds.Tables[0].Rows[0]["SUBJECT_ITEM_YN"].ToString() == "1") { rBtnList.Visible = false; txtValue.Visible = true; txtValue.Width = Unit.Percentage(100); } else { // 평가자인지 피평가인지 따라 if (EST_TGT_TYPE.Equals("EST")) { ibnDownload.Visible = true; ltrUpload.Visible = false; } else if (EST_TGT_TYPE.Equals("TGT")) { ibnDownload.Visible = true; ltrUpload.Visible = true; rBtnList.Visible = false; txtOpinion.Visible = false; } txtValue.Visible = false; // 만약 질의항목에 설명을 표시할 경우 if (_q_item_desc_use_yn.Equals("Y")) { rBtnList.RepeatLayout = RepeatLayout.Table; rBtnList.DataTextField = "Q_ITEM_DESC"; } rBtnList.DataSource = ds; rBtnList.DataBind(); Biz_QuestionDatas questionDatas = new Biz_QuestionDatas(COMP_ID , EST_ID , ESTTERM_REF_ID , ESTTERM_SUB_ID , this.IESTTERM_STEP_PREVIOUS_SELECT , 0 , 0 , TGT_DEPT_ID , TGT_EMP_ID , q_sbj_id); // 데이타 바인딩 WebUtility.FindByValueRadioButtonList(rBtnList, questionDatas.Q_Itm_ID); TOTALPOINT += questionDatas.Point * weight; txtTextValue.Text = questionDatas.Text_Value; txtOpinion.Text = questionDatas.Opinion; ltrPointData.Text = DataTypeUtility.GetToInt32_String(questionDatas.Point, "##.#0"); hAttachNo.Value = questionDatas.Attach_NO; SetUploadFileInfo(hAttachNo.Value, ddlFileUpload); if (ddlFileUpload.Items.Count > 1) { lblCnt.Text = string.Format("({0}건)", ddlFileUpload.Items.Count - 1); } //----------------- 라디오버튼 유효성 검사 시작 ------------------- string clientIDs = ""; for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { if (i != 0) { clientIDs += ";"; } clientIDs += rBtnList.ClientID + "_" + i.ToString(); } VALID_SCRIPT += string.Format("if(ValidQuestion('{0}', '{1}') == false) return false;", dr["Q_SBJ_NAME"], clientIDs); //----------------- 라디오버튼 유효성 검사 끝 ------------------- } }
protected void ugrdEstQuestion_InitializeRow(object sender, RowEventArgs e) { string q_sbj_id = DataTypeUtility.GetString(e.Row.Cells.FromKey("Q_SBJ_ID").Value); //자기평가 결과 //DataTable ItemDt = new MicroBSC.Integration.EST.Biz.Biz_Est_Question_Data().SelectEstQuestionDataSelfPoint(Q_OBJ_ID, q_sbj_id); Biz_QuestionDatas questionDatas = new Biz_QuestionDatas(COMP_ID , EST_ID , ESTTERM_REF_ID , ESTTERM_SUB_ID , ESTTERM_STEP_ID , TGT_DEPT_ID , TGT_EMP_ID , TGT_DEPT_ID , TGT_EMP_ID , q_sbj_id); Biz_QuestionItems questionItems = new Biz_QuestionItems(); DataTable ItemDt = questionItems.GetQuestionItem(questionDatas.Q_Itm_ID, q_sbj_id, Q_OBJ_ID).Tables[0]; UltraGridCell uc = e.Row.Cells.FromKey("Q_ITEM_NAME_SELF"); uc.Value = ItemDt.Rows[0]["Q_ITEM_NAME"].ToString(); UltraGridCell ugItemNo = e.Row.Cells.FromKey("Q_ITM_ID"); ugItemNo.Value = ItemDt.Rows[0]["Q_ITM_ID"].ToString(); UltraGridCell ugobjId = e.Row.Cells.FromKey("Q_OBJ_ID"); ugobjId.Value = ItemDt.Rows[0]["Q_OBJ_ID"].ToString(); //다면평가 결과 DataTable dtPoint = new MicroBSC.Integration.EST.Biz.Biz_Est_Question_Data().SelectEstQuestionDataSelfPointResultPoint( ESTTERM_REF_ID, ESTTERM_SUB_ID, ESTTERM_STEP_ID, Q_OBJ_ID, TGT_EMP_ID, "3O"); int count = 0; double sum = 0; for (int i = 0; i < dtPoint.Rows.Count; i++) { if (dtPoint.Rows[i]["Q_SBJ_ID"].ToString().Equals(q_sbj_id)) { UltraGridCell ugc = e.Row.Cells.FromKey((dtPoint.Rows[i]["EST_EMP_ID"].ToString())); ugc.Value = dtPoint.Rows[i]["POINT"].ToString(); sum += double.Parse(dtPoint.Rows[i]["POINT"].ToString()); count++; } } //다면평가 평균 UltraGridCell ugAv = e.Row.Cells.FromKey("Q_AVERAGE"); if (count == 0) { ugAv.Value = "-"; } else { ugAv.Value = Math.Round(sum / count, 2); } //1차 평가 결과 questionDatas = new Biz_QuestionDatas(COMP_ID , EST_ID , ESTTERM_REF_ID , ESTTERM_SUB_ID , ESTTERM_STEP_ID , EST_DEPT_ID , EST_EMP_ID , TGT_DEPT_ID , TGT_EMP_ID , q_sbj_id); TemplatedColumn tc = (TemplatedColumn)e.Row.Band.Columns.FromKey("Q_FIRST"); Infragistics.WebUI.WebDataInput.WebNumericEdit ne = (Infragistics.WebUI.WebDataInput.WebNumericEdit)((CellItem)tc.CellItems[e.Row.Index]).FindControl("Q_FIRST"); ne.Value = DataTypeUtility.GetToDouble(questionDatas.Point); if (STATUS_ID.Equals("E")) { ne.ReadOnly = true; } }