protected void iBtnConfirm_Click(object sender, ImageClickEventArgs e) { int effrctRow = 0; Biz_QuestionDeptEmpMaps questionDeptEmpMaps = new Biz_QuestionDeptEmpMaps(); DataTable dataTable = questionDeptEmpMaps.GetDataTableSchema(); dataTable = UltraGridUtility.GetDataTableByAllValue(UltraWebGrid2 , new string[] { "TGT_DEPT_ID", "TGT_EMP_ID" } , dataTable); foreach (DataRow dataRow in dataTable.Rows) { effrctRow += new MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Info().KpiAutoInsert(ESTTERM_REF_ID, view_ref_id, stg_ref_id, poo_ref_id, int.Parse(dataRow["TGT_DEPT_ID"].ToString()), int.Parse(dataRow["TGT_EMP_ID"].ToString())); } if (effrctRow > 0) { ltrScript.Text = JSHelper.GetOpenerControlCallBackScript(POSTBACK_CTRL_NAME, true); } else { ltrScript.Text = JSHelper.GetAlertScript("추가하실 사원을 선택하세요."); } }
protected void iBtnConfirm_Click(object sender, ImageClickEventArgs e) { Biz_QuestionDeptEmpMaps questionDeptEmpMaps = new Biz_QuestionDeptEmpMaps(); DataTable dataTable = questionDeptEmpMaps.GetDataTableSchema(); dataTable = UltraGridUtility.GetDataTableByAllValue(UltraWebGrid2 , new string[] { "TGT_DEPT_ID", "TGT_EMP_ID" } , dataTable); foreach (DataRow dataRow in dataTable.Rows) { dataRow["COMP_ID"] = COMP_ID; dataRow["ESTTERM_REF_ID"] = ESTTERM_REF_ID; dataRow["ESTTERM_SUB_ID"] = ESTTERM_SUB_ID; dataRow["ESTTERM_STEP_ID"] = ESTTERM_STEP_ID; dataRow["EST_ID"] = EST_ID; dataRow["Q_OBJ_ID"] = Q_OBJ_ID; dataRow["DATE"] = DateTime.Now; dataRow["USER"] = EMP_REF_ID; } bool isOK = questionDeptEmpMaps.AddQuestionDeptEmpMap(dataTable); if (isOK) { ltrScript.Text = JSHelper.GetOpenerControlCallBackScript("lbnEmpReload", true); } else { ltrScript.Text = JSHelper.GetAlertScript("추가하실 사원을 선택하세요."); } }
protected void ibnSelect_Click(object sender, ImageClickEventArgs e) { if (TreeView1.CheckedNodes.Count > 0) { string values = ""; string texts = ""; bool isFirst = true; for (int i = 0; i < TreeView1.CheckedNodes.Count; i++) { if (isFirst) { values += TreeView1.CheckedNodes[i].Value; texts += TreeView1.CheckedNodes[i].Text; isFirst = false; } else { values += string.Format(",{0}", TreeView1.CheckedNodes[i].Value); texts += string.Format(",{0}", TreeView1.CheckedNodes[i].Text); } } Response.Write("<script type='text/javascript'>\r\n"); if (!CTRL_VALUE_NAME.Equals("")) { Response.Write("opener.document.getElementById('" + CTRL_VALUE_NAME + "').value='" + values + "';\r\n"); } if (!CTRL_TEXT_NAME.Equals("")) { Response.Write("opener.document.getElementById('" + CTRL_VALUE_VALUE + "').value='" + values + "';\r\n"); Response.Write("opener.document.getElementById('" + CTRL_TEXT_NAME + "').value='" + texts + "';\r\n"); Response.Write("opener.document.getElementById('" + CTRL_TEXT_NAME + "').focus();\r\n"); } if (!POSTBACK_YN.Equals("Y")) { Response.Write("self.close();\r\n"); } Response.Write("</script>\r\n"); if (POSTBACK_YN.Equals("Y")) { ltrScript.Text = JSHelper.GetOpenerControlCallBackScript(POSTBACK_CTRL_NAME, true); return; } } else { ltrScript.Text = JSHelper.GetAlertScript("체크박스를 선택하세요."); } }
protected void ibnSave_Click(object sender, ImageClickEventArgs e) { int cntRow = ugrdPrjList.Rows.Count; CheckBox chkCheck; UltraGridRow ugrdRow; TemplatedColumn col_Check = (TemplatedColumn)ugrdPrjList.Bands[0].Columns.FromKey("selchk"); string values = ""; bool isFirst = true; int chkCnt = 0; for (int i = 0; i < ugrdPrjList.Rows.Count; i++) { chkCheck = (CheckBox)((CellItem)col_Check.CellItems[ugrdPrjList.Rows[i].BandIndex]).FindControl("cBox"); ugrdRow = ugrdPrjList.Rows[i]; if (chkCheck.Checked) { if (isFirst) { values += ugrdRow.Cells.FromKey("PRJ_REF_ID").ToString(); isFirst = false; } else { values += string.Format(",{0}", ugrdRow.Cells.FromKey("PRJ_REF_ID").ToString()); } chkCnt++; } } if (chkCnt == 0) { ltrScript.Text = JSHelper.GetAlertScript("추가할 프로젝트를 선택하세요."); return; } else { Response.Write("<script type='text/javascript'>\r\n"); Response.Write("opener.document.getElementById('" + CTRL_VALUE_NAME + "').value='" + values + "';\r\n"); Response.Write("</script>\r\n"); ltrScript.Text = JSHelper.GetOpenerControlCallBackScript(ICCB1, true); } }
protected void iBtnClose_Click(object sender, ImageClickEventArgs e) { ltrScript.Text = JSHelper.GetOpenerControlCallBackScript(this.ICCB1, true); }
protected void lBtnReload2_Click(object sender, EventArgs e) { ltrScript.Text = JSHelper.GetOpenerControlCallBackScript(this.ICCB1, true); }
protected void lBtnReload2_Click(object sender, EventArgs e) { ltrScript.Text = JSHelper.GetOpenerControlCallBackScript(lBtnReload.ClientID.Replace('_', '$'), true); }
private void SetFormData() { MicroBSC.BSC.Biz.Biz_Bsc_Work_Task objCode = new MicroBSC.BSC.Biz.Biz_Bsc_Work_Task(); objCode.GetTaskList(ddlTask, 0, false, 200, this.IExec_Ref_ID); if (this.IType != "A") { MicroBSC.BSC.Biz.Biz_Bsc_Work_Item objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Work_Item(this.IExec_Ref_ID, this.ITask_Ref_ID, this.IItem_Ref_ID); IExec_Ref_ID = objBSC.Iexec_ref_id; IExec_Name = objBSC.Iexec_ref_id_name; txtExecRefIdName.Text = objBSC.Iexec_ref_id_name; ITask_Ref_ID = objBSC.Itask_ref_id; //PageUtility.FindByValueDropDownList(ddlTask, objBSC.Itask_ref_id); txtTaskRefIdName.Text = objBSC.Itask_ref_id_name; ITask_Name = objBSC.Itask_ref_id_name; IItem_Ref_ID = objBSC.Iitem_ref_id; IItem_Ymd = objBSC.Iitem_ymd; txtItemYMD.Text = objBSC.Iitem_ymd; IItem_Name = objBSC.Iitem_name; txtItemName.Text = objBSC.Iitem_name; txtItemDesc.Value = objBSC.Iitem_desc; txtItemUnit.Text = objBSC.Iitem_unit; txtItemTgt.Text = objBSC.Iitem_tgt; txtItemRst.Text = objBSC.Iitem_rst; this.IAdd_File = objBSC.Iadd_file; this.hdfTargetReasonFile.Value = objBSC.Iadd_file; this.IUse_YN = (objBSC.Iuse_yn == "Y") ? true : false; this.chkUseYN.Checked = (objBSC.Iuse_yn == "Y") ? true : false; iBtnTargetFile_Down.Visible = (objBSC.Iadd_file == "") ? false : true; if (objBSC.Iadd_file == "") { } else { SearchAddFile(); } if (!chkUseYN.Checked) { txtItemDesc.Visible = false; spnItemDesc.Visible = true; } else { txtItemDesc.Visible = true; spnItemDesc.Visible = false; } } else { MicroBSC.BSC.Biz.Biz_Bsc_Work_Exec objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Work_Exec(this.IEstterm_Ref_ID, this.IExec_Ref_ID); txtExecRefIdName.Text = objBSC.Iexec_name; IExec_Name = objBSC.Iexec_name; if (this.ddlTask.Items.Count > 0) { this.ITask_Ref_ID = PageUtility.GetIntByValueDropDownList(ddlTask); } else { ltrScript.Text = JSHelper.GetAlertScript("세부일정 등록 후 사용하세요", false); ltrScript.Text = JSHelper.GetOpenerControlCallBackScript(this.ICCB1, true); } this.chkUseYN.Checked = true; iBtnTargetFile_Down.Visible = false; lbFileList.Items.Clear(); //ddlKpiCategoryTop_SelectedIndexChanged(null, null); } }
protected void iBtnSave_Click(object sender, ImageClickEventArgs e) { DeptInfos dept = new DeptInfos(); string mode = WebUtility.GetRequest("mode"); if (ltrHiddenDeptID.Text.Equals("")) { Literal1.Text = JSHelper.GetAlertScript("부서를 선택해 주세요.", false); return; } if (mode.Equals("New")) { if (txtDeptNew.Text.Equals("")) { Literal1.Text = JSHelper.GetAlertScript("등록하실 부서명을 입력하세요.", false); return; } dept.AddDeptinfo(int.Parse(ltrHiddenDeptID.Text), int.Parse(ltrHiddenLevel.Text) + 1, txtDeptNew.Text, int.Parse(Request["estterm_ref_id"])); //Response.Write(dept.IERRMSG.Replace("'", "")); WebCommon.FillEstTree(TreeView1, WebUtility.GetRequestByInt("estterm_ref_id")); TreeView1.ExpandAll(); Literal1.Text = JSHelper.GetOpenerControlCallBackScript(this.ICCB1, true); } else if (mode.Equals("Rename")) { if (txtDeptRename.Text.Equals("")) { Literal1.Text = JSHelper.GetAlertScript("바꾸실 부서명을 입력하세요.", false); return; } /* 2011-06-13 수정 : 명칭변경시에 sortOrder도 수정하도록 변경 */ //dept.RenameDeptName(int.Parse(Request["estterm_ref_id"]), int.Parse(ltrHiddenDeptID.Text), txtDeptRename.Text); int sortOrder = Convert.ToInt32(txtSortOrder.Text); dept.RenameDeptName(WebUtility.GetRequestByInt("estterm_ref_id"), int.Parse(ltrHiddenDeptID.Text), txtDeptRename.Text, sortOrder); /* 2011-06-13 수정 완료 ****************************************/ WebCommon.FillEstTree(TreeView1, int.Parse(Request["estterm_ref_id"])); TreeView1.ExpandAll(); Literal1.Text = JSHelper.GetOpenerControlCallBackScript(this.ICCB1, true); } else if (mode.Equals("Move")) { if (txtMoveDeptID.Text.Equals("")) { Literal1.Text = JSHelper.GetAlertScript("이동하실 부서경로를 선택 하세요.", false); return; } dept.MoveDeptPath(WebUtility.GetRequestByInt("estterm_ref_id"), int.Parse(ltrHiddenDeptID.Text), int.Parse(txtMoveDeptID.Text), int.Parse(txtMoveLevel.Text) + 1); //WebCommon.FillEstTree(TreeView1, int.Parse(Request["estterm_ref_id"])); Literal1.Text = JSHelper.GetOpenerControlCallBackScript(this.ICCB1, true); } else if (mode.Equals("Remove")) { if (ltrTreePath_Remove.Text.Equals("")) { Literal1.Text = JSHelper.GetAlertScript("삭제하실 부서를 선택 하세요.", false); return; } bool isOK = dept.RemoveDeptInfo(WebUtility.GetRequestByInt("estterm_ref_id"), int.Parse(ltrHiddenDeptID.Text)); WebCommon.FillEstTree(TreeView1, WebUtility.GetRequestByInt("estterm_ref_id")); TreeView1.ExpandAll(); Literal1.Text = JSHelper.GetOpenerControlCallBackScript(this.ICCB1, true); //if (!isOK) //{ // Literal1.Text = JSHelper.GetAlertScript("사용 중인 평가 부서입니다.", false); //} //else //{ // Literal1.Text = JSHelper.GetAlertOpenerControlCallBackScript("정상적으로 부서명이 삭제되었습니다.", "lBtnReload", true); //} } }
protected void UltraWebGrid1_DblClick(object sender, ClickEventArgs e) { if (hdfType.Value.Equals("P")) { Response.Write("<script type='text/javascript'>\r\n"); if (!hdfObjKey.Value.Equals("")) { Response.Write("opener.document.getElementById('" + hdfObjKey.Value + "').value='" + e.Row.Cells.FromKey("EMP_REF_ID").Value + "';\r\n"); } if (!hdfObjVal.Value.Equals("")) { Response.Write("opener.document.getElementById('" + hdfObjVal.Value + "').value='" + e.Row.Cells.FromKey("EMP_NAME").Value + "';\r\n"); //Response.Write("opener.document.getElementById('" + hdfObjVal.Value + "').focus();\r\n"); } Response.Write("self.close();\r\n"); Response.Write("</script>\r\n"); } else if (hdfType.Value.Equals("G")) { Response.Write("<script type='text/javascript'>\r\n"); Response.Write("opener.document.getElementById('" + hdfValue1.Value + "').value='" + e.Row.Cells.FromKey("EMP_REF_ID").Value + "';\r\n"); Response.Write("opener.document.getElementById('" + hdfValue2.Value + "').value='" + e.Row.Cells.FromKey("EMP_NAME").Value + "';\r\n"); Response.Write("opener.document.getElementById('" + hdfValue3.Value + "').value='" + e.Row.Cells.FromKey("DAILY_PHONE").Value + "';\r\n"); Response.Write("opener.document.getElementById('" + hdfValue4.Value + "').value='" + e.Row.Cells.FromKey("CELL_PHONE").Value + "';\r\n"); Response.Write("opener.document.getElementById('" + hdfValue5.Value + "').value='" + e.Row.Cells.FromKey("EMP_EMail").Value + "';\r\n"); //Response.Write("self.close();\r\n"); Response.Write("</script>\r\n"); ltrScript.Text = JSHelper.GetOpenerControlCallBackScript(this.ICCB2, true); } else if (hdfType.Value.Equals("O")) { Response.Write("<script type='text/javascript'>\r\n"); Response.Write("opener.document.getElementById('" + hdfValue1.Value + "').value='" + e.Row.Cells.FromKey("EMP_REF_ID").Value + "';\r\n"); Response.Write("opener.document.getElementById('" + hdfValue2.Value + "').value='" + e.Row.Cells.FromKey("EMP_NAME").Value + "';\r\n"); Response.Write("opener.document.getElementById('" + hdfValue3.Value + "').value='" + e.Row.Cells.FromKey("DEPT_CODE").Value + "';\r\n"); Response.Write("opener.document.getElementById('" + hdfValue4.Value + "').value='" + e.Row.Cells.FromKey("DEPT_NAME").Value + "';\r\n"); //Response.Write("opener.document.getElementById('" + hdfValue5.Value + "').value='" + e.Row.Cells.FromKey("EMP_EMail").Value + "';\r\n"); //Response.Write("self.close();\r\n"); Response.Write("</script>\r\n"); ltrScript.Text = JSHelper.GetOpenerControlCallBackScript(this.ICCB2, true); } else if (hdfType.Value.Equals("S")) { Response.Write("<script type='text/javascript'>\r\n"); Response.Write("opener.document.getElementById('" + hdfValue1.Value + "').value='" + e.Row.Cells.FromKey("EMP_REF_ID").Value + "';\r\n"); Response.Write("opener.document.getElementById('" + hdfValue2.Value + "').value='" + e.Row.Cells.FromKey("EMP_NAME").Value + "';\r\n"); Response.Write("opener.document.getElementById('" + hdfValue3.Value + "').value='" + e.Row.Cells.FromKey("DEPT_CODE").Value + "';\r\n"); Response.Write("opener.document.getElementById('" + hdfValue4.Value + "').value='" + e.Row.Cells.FromKey("DEPT_NAME").Value + "';\r\n"); //Response.Write("opener.document.getElementById('" + hdfValue5.Value + "').value='" + e.Row.Cells.FromKey("EMP_EMail").Value + "';\r\n"); //Response.Write("self.close();\r\n"); Response.Write("</script>\r\n"); ltrScript.Text = JSHelper.GetOpenerControlCallBackScript(this.ICCB2, true); } }