private void SetQueryStringData() { if (GetRequest("ESTTERM_REF_ID").Equals("")) { TermInfos term = new TermInfos(); DataView dw = term.GetAllTermInfo().Tables[0].DefaultView; for (int i = 0; i < dw.Table.Rows.Count; i++) { if (Convert.ToInt32(dw.Table.Rows[i]["EST_STATUS"]) == 1) { ESTTERM_REF_ID = int.Parse(dw.Table.Rows[i]["ESTTERM_REF_ID"].ToString()); return; } } } else { ESTTERM_REF_ID = GetRequestByInt("ESTTERM_REF_ID"); } if (GetRequest("EST_DEPT_REF_ID").Equals("")) { EST_DEPT_REF_ID = _estDeptInfo.GetRootEstDeptID(ESTTERM_REF_ID); } else { EST_DEPT_REF_ID = GetRequestByInt("EST_DEPT_REF_ID"); } }
private void InitControlValue() { WebCommon.SetEstTermDropDownList(ddlEstTermInfo); int intEstTermId = (ddlEstTermInfo.Items.Count > 0) ? int.Parse(ddlEstTermInfo.SelectedValue) : 0; WebCommon.SetComDeptDropDownList(ddlEstDept, true); PageUtility.FindByValueDropDownList(ddlEstDept, BizUtility.GetDeptID(EMP_REF_ID)); Biz_Com_Code_Info objCode = new Biz_Com_Code_Info(); objCode.getResultMethod(ddlResultInput, "", true, 120); objCode.GetKpiType(ddlKpiGroupRefID, "", true, 120); lblCopyText.Style.Add("vertical-align", "middle"); ddlEsttermCopy.Style.Add("vertical-align", "middle"); TermInfos objTerm = new TermInfos(); TermInfos objTermOpen = new TermInfos(objTerm.GetOpenEstTermID()); if (objTermOpen.Estterm_ref_id > 0) { ddlEsttermCopy.Items.Add(new ListItem(objTermOpen.Estterm_name, objTermOpen.Estterm_ref_id.ToString())); } else { lblCopyText.Visible = false; ddlEsttermCopy.Visible = false; iBtnKpiCopy.Visible = false; } }
private void GetTermInfos() { TermInfos termInfo = new TermInfos(); DataTable dt = termInfo.GetAllList().Tables[0]; dt = DataTypeUtility.FilterSortDataTable(dt, "", "EST_STARTDATE"); UltraWebGrid1.DataSource = dt; UltraWebGrid1.DataBind(); }
private void SetEstTermInfo(int estterm_ref_id) { TermInfos termInfo = new TermInfos(estterm_ref_id); txtEstTermName.Text = termInfo.Estterm_name; ltrEstTermRefId.Text = termInfo.Estterm_ref_id.ToString(); txtEST_DESC.Text = termInfo.Est_desc; wdcFrom.Value = termInfo.Est_startdate.ToString("yyyy-MM-dd"); wdcTo.Value = termInfo.Est_compdate.ToString("yyyy-MM-dd"); PageUtility.FindByValueDropDownList(ddlMONTHLY_CLOSE_DAY, termInfo.Monthly_close_day.ToString()); PageUtility.FindByValueDropDownList(ddlPRE_CLOSE_DAY, termInfo.Pre_close_day.ToString()); PageUtility.FindByValueDropDownList(ddlKPI_QLT_CLOSE_DAY, termInfo.Kpi_Qlt_Close_Day.ToString()); PageUtility.FindByValueDropDownList(ddlSCORE_VALUATION_TYPE, termInfo.Score_valuation_type); PageUtility.FindByValueDropDownList(ddlCLOSE_RATE_COMPLETE_YN, (termInfo.Close_rate_complete_yn == 1) ? "1" : "0"); PageUtility.FindByValueDropDownList(ddlEXTERNAL_SCORE_TYPE, termInfo.External_score_type); chkEXTERNAL_SCORE_USE_YN.Checked = (termInfo.External_score_use_yn == "Y") ? true : false; // 마감여부 if (termInfo.Yearly_close_yn == 1) { iBtnClose.Visible = false; iBtnModifyTermInfo.Visible = false; iBtnOpen.Visible = true; } else { iBtnModifyTermInfo.Visible = true; iBtnClose.Visible = true; iBtnOpen.Visible = false; } // 사용여부 if (termInfo.Est_status == 1) { iBtnDel.Visible = true; } else { iBtnDel.Visible = false; } iBtnAdd.Visible = false; }
/// <summary> /// 평가기간 /// </summary> /// <param name="ddl"></param> public static void BindEstTerm(DropDownList ddl) { TermInfos term = new TermInfos(); DataSet ds = term.GetAllList(); ddl.DataSource = ds; ddl.DataTextField = "ESTTERM_NAME"; ddl.DataValueField = "ESTTERM_REF_ID"; ddl.DataBind(); // 배포되어있는 평가월의 평가기간을 가져온다 Biz_Bsc_Term_Detail objTD = new Biz_Bsc_Term_Detail(); ddl.ClearSelection(); if (ddl.Items.FindByValue(objTD.GetOpenEstTermID().ToString()) != null) { ddl.Items.FindByValue(objTD.GetOpenEstTermID().ToString()).Selected = true; } }
public void SetResultListGrid() { this.IEstTermRefID = (ddlEstTermInfo.Items.Count > 0) ? int.Parse(ddlEstTermInfo.SelectedValue) : 0; _iresult_input_method = (ddlResultMethod.Items.Count > 0) ? ddlResultMethod.SelectedValue : ""; _ikpi_code = txtKPICode.Text.Trim(); _ikpi_name = txtKPIName.Text.Trim(); _iemp_name = txtChamName.Text.Trim(); _iest_dept_id = (ddlEstDept.Items.Count > 0 && ddlEstDept.SelectedValue != "") ? int.Parse(ddlEstDept.SelectedValue.ToString()) : 0; _ilogin_id = gUserInfo.Emp_Ref_ID; this.IYmd = (ddlEstTermMonth.Items.Count > 0) ? ddlEstTermMonth.SelectedValue : ""; //MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Info objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Info(); //DataSet ds = objBSC.GetKpiListForResultInput(_iestterm_ref_id // , _iresult_input_method // , _ikpi_code // , _ikpi_name // , _iemp_name // , _iest_dept_id // , _iymd // ); MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Qlt_Score_Det objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Qlt_Score_Det(); DataSet ds = objBSC.GetQLTEstListPerEstEmp (this.IEstTermRefID , _iresult_input_method , _ikpi_code , _ikpi_name , _iemp_name , _iest_dept_id , this.IYmd , PageUtility.GetByValueDropDownList(ddlKpiGroupRefID) , _ilogin_id ); ugrdKpiResultList.DataSource = ds; ugrdKpiResultList.DataBind(); MicroBSC.Estimation.Dac.TermInfos objTrm = new TermInfos(); this.IEstDeptRefID = objTrm.GetEstDeptIdPerUser(this.IEstTermRefID, gUserInfo.Emp_Ref_ID); }
protected void iBtnRemoveEstTermInfo_Click(object sender, ImageClickEventArgs e) { TermInfos termInfo = new TermInfos(); CheckBox chk; UltraGridRow row; TemplatedColumn col; bool isOK = false; int estterm_ref_id = 0; for (int i = 0; i < UltraWebGrid1.Rows.Count; i++) { row = UltraWebGrid1.Rows[i]; col = (TemplatedColumn)row.Band.Columns.FromKey("selchk"); chk = (CheckBox)((CellItem)col.CellItems[row.BandIndex]).FindControl("cBox"); if (chk.Checked) { try { estterm_ref_id = int.Parse(row.Cells.FromKey("ESTTERM_REF_ID").Value.ToString()); string msg = termInfo.DeleteData(estterm_ref_id, EMP_REF_ID); } catch (Exception ex) { Literal1.Text = JSHelper.GetAlertScript("삭제 중 오류가 발생하였습니다.. \\n" + ex.Message, false); return; } } } if (!isOK) { Literal1.Text = JSHelper.GetAlertScript("삭제할 항목을 선택주세요.", false); } else { GetTermInfos(); } }
/// <summary> /// 평가기간 입력/수정/삭제/마감처리 /// </summary> /// <param name="strType"></param> private void TxrEstTermInfo(string strType) { if (strType == "A") { if (txtEstTermName.Text.Trim() == "") { Literal1.Text = JSHelper.GetAlertScript("평가기간명을 입력해 주십시오", false); return; } } else if (strType == "U") { if (txtEstTermName.Text.Trim() == "" || this.IEstTermRefID < 1) { Literal1.Text = JSHelper.GetAlertScript("평가기간 정보가 올바르지 않습니다.", false); return; } } else { if (this.IEstTermRefID < 1) { Literal1.Text = JSHelper.GetAlertScript("평가기간명이 선택되지 않았습니다.", false); return; } } int _estterm_ref_id = this.IEstTermRefID; string _estterm_name = txtEstTermName.Text.Trim(); DateTime _est_compdate = Convert.ToDateTime(wdcTo.Value); DateTime _est_startdate = Convert.ToDateTime(wdcFrom.Value); int _monthly_close_day = PageUtility.GetIntByValueDropDownList(ddlMONTHLY_CLOSE_DAY); int _pre_close_day = PageUtility.GetIntByValueDropDownList(ddlPRE_CLOSE_DAY); int _kpi_qlt_close_day = PageUtility.GetIntByValueDropDownList(ddlKPI_QLT_CLOSE_DAY); bool _yearly_close_yn = true; string _score_valuation_type = ddlSCORE_VALUATION_TYPE.SelectedValue; string _est_desc = txtEST_DESC.Text; bool _est_status = true; bool _close_rate_complete_yn = (ddlCLOSE_RATE_COMPLETE_YN.SelectedValue.ToString() == "1") ? true : false; string _external_score_use_yn = (chkEXTERNAL_SCORE_USE_YN.Checked) ? "Y" : "N"; string _external_score_type = PageUtility.GetByValueDropDownList(ddlEXTERNAL_SCORE_TYPE); string rtnResult = ""; string[] _rtnResult = new string[2]; TermInfos objTerm = new TermInfos(); //-------------------------------------------------------------------입력 if (strType == "A") { rtnResult = objTerm.InsertData(_estterm_name, _est_startdate, _est_compdate, _monthly_close_day, _pre_close_day, _kpi_qlt_close_day, _yearly_close_yn, _score_valuation_type, _est_desc, _est_status, _close_rate_complete_yn, _external_score_use_yn, _external_score_type, gUserInfo.Emp_Ref_ID); _rtnResult = rtnResult.Split('\t'); if (_rtnResult[0] == "Y") { this.GetTermInfos(); } } //-------------------------------------------------------------------수정 else if (strType == "U") { rtnResult = objTerm.UpdateData(_estterm_ref_id, _estterm_name, _est_startdate, _est_compdate, _monthly_close_day, _pre_close_day, _kpi_qlt_close_day, _score_valuation_type, _est_desc, _est_status, _close_rate_complete_yn, _external_score_use_yn, _external_score_type, gUserInfo.Emp_Ref_ID); _rtnResult = rtnResult.Split('\t'); if (_rtnResult[0] == "Y") { this.SetEstTermInfo(_estterm_ref_id); } } //-------------------------------------------------------------------삭제 else if (strType == "D") { rtnResult = objTerm.DeleteData(_estterm_ref_id, gUserInfo.Emp_Ref_ID); _rtnResult = rtnResult.Split('\t'); if (_rtnResult[0] == "Y") { this.GetTermInfos(); } } //-------------------------------------------------------------------연간평가마감 else if (strType == "CT") { rtnResult = objTerm.CloseYearlyTerm(_estterm_ref_id, gUserInfo.Emp_Ref_ID); _rtnResult = rtnResult.Split('\t'); if (_rtnResult[0] == "Y") { this.GetTermInfos(); } } //-------------------------------------------------------------------연간평가마감취소 else if (strType == "OT") { rtnResult = objTerm.OpenYearlyTerm(_estterm_ref_id, gUserInfo.Emp_Ref_ID); _rtnResult = rtnResult.Split('\t'); if (_rtnResult[0] == "Y") { this.GetTermInfos(); } } else { return; } Literal1.Text = JSHelper.GetAlertScript(_rtnResult[1], false); }
/// <summary> /// 초기 폼 데이터 설정 /// </summary> private void SetKpiInfo() { if (this.IEstTermRefID > 0 && this.IKpiRefID > 0) { Biz_Bsc_Kpi_Info objKPI = new Biz_Bsc_Kpi_Info(this.IEstTermRefID, this.IKpiRefID); Biz_ComDeptInfo objDept = new Biz_ComDeptInfo(); TermInfos objEst = new TermInfos(this.IEstTermRefID); lblKpiName.Text = objKPI.Ikpi_name; lblWriterName.Text = gUserInfo.Emp_Name; lblTMCode.Text = objEst.Estterm_name + "(" + this.IYMD + ")"; if (this.IType == "U" && this.IListRefID > 0) { Biz_Bsc_Communication_List objList = new Biz_Bsc_Communication_List(this.IListRefID); txtSubject.Text = objList.Ititle; txtContent.Value = objList.Idetails; ltrContent.Text = objList.Idetails; txtReceiver.Text = objList.Iarr_receiver_id; hdfReceiver.Value = objList.Iarr_receiver_id; lblReadCount.Text = objList.Iread_count.ToString(); hAttachNo.Value = objList.Iattach_no; lblCreateDate.Text = objList.Create_date.ToLongDateString(); lblWriterName.Text = objList.Iowner_emp_name; chkMailSend.Checked = (objList.Iis_send_mail == "Y") ? true : false; chkPublicYN.Checked = (objList.Iis_open_list == "Y") ? true : false; int intLoginID = gUserInfo.Emp_Ref_ID; int intRtnRow = 0; // 작성자와 로긴한 사용자가 같을경우 즉, 자기글일경우 if (intLoginID == objList.Iowner_emp_id) { this.IisOwner = "Y"; this.leftLayer.Visible = false; this.txtContent.Visible = true; this.iBtnFeedback.Visible = false; this.iBtnDelete.Visible = true; this.iBtnDownload.Visible = false; this.iBtnUpload.Visible = true; } else { this.IisOwner = "N"; this.leftLayer.Visible = true; this.txtContent.Visible = false; this.iBtnFeedback.Visible = true; this.iBtnModify.Visible = false; this.iBtnFindEmp.Visible = false; this.iBtnDelete.Visible = false; this.iBtnDownload.Visible = (objList.Iattach_no.Trim() == "") ? false : true; this.iBtnUpload.Visible = false; this.chkPublicYN.Enabled = false; this.chkMailSend.Enabled = false; intRtnRow = objList.AddClickCount(this.IListRefID, intLoginID); Biz_Bsc_Communication_User objUser = new Biz_Bsc_Communication_User(this.IListRefID, intLoginID); if (objUser.Iread_yn == "N") { intRtnRow = objUser.UpdateData(this.IListRefID, intLoginID, "Y", intLoginID); } } } else if (this.IType == "A") { this.leftLayer.Visible = false; this.txtContent.Visible = true; this.iBtnDownload.Visible = false; this.iBtnUpload.Visible = true; } else { this.leftLayer.Visible = true; this.txtContent.Visible = false; } } }
private void SetQueryStringData() { _empSysInfo = new EmpSysInfos_Biz(gUserInfo.Emp_Ref_ID); if (GetRequest("ESTTERM_REF_ID").Equals("")) { TermInfos term = new TermInfos(); DataView dw = term.GetAllTermInfo().Tables[0].DefaultView; for (int i = 0; i < dw.Table.Rows.Count; i++) { if (Convert.ToInt32(dw.Table.Rows[i]["EST_STATUS"]) == 1) { ESTTERM_REF_ID = int.Parse(dw.Table.Rows[i]["ESTTERM_REF_ID"].ToString()); return; } } } else { ESTTERM_REF_ID = GetRequestByInt("ESTTERM_REF_ID"); } if (GetRequest("EST_DEPT_REF_ID").Equals("")) { EST_DEPT_REF_ID = _estDeptInfo.GetRootEstDeptID(ESTTERM_REF_ID); } else { EST_DEPT_REF_ID = GetRequestByInt("EST_DEPT_REF_ID"); } MAP_VERSION_ID = GetRequestByInt("MAP_VERSION_ID"); if (GetRequest("TMCODE").Equals("")) { MicroBSC.BSC.Biz.Biz_Bsc_Term_Detail objTerm = new MicroBSC.BSC.Biz.Biz_Bsc_Term_Detail(); TMCODE = objTerm.GetReleasedMonth(); } else { TMCODE = GetRequest("TMCODE"); } string lineType = ""; string showKpiList = ""; if (GetRequest("LINE_TYPE").Equals("")) { lineType = _empSysInfo.GetSysValueByEmpID(1000); } else { lineType = GetRequest("LINE_TYPE"); } if (GetRequest("SHOW_KPI_LIST").Equals("")) { showKpiList = _empSysInfo.GetSysValueByEmpID(1002); } else { showKpiList = GetRequest("SHOW_KPI_LIST"); } ENUMLINETYPE = (lineType == "0") ? LineType.Diagonal : LineType.Straight; ISKPILISTVIEW = (showKpiList == "1") ? true : false; DRAWING_YN = GetRequest("DRAWING_YN", "N"); if (!IsPostBack) { IWORKINGMAP_YN = GetRequest("WORKINGMAPYN", "N"); } FULLSCREEN = GetRequest("FULLSCREEN", "N"); }