private void DeleteWorkTask() { if (!this.CheckFormData()) { return; } this.IType = "D"; MicroBSC.BSC.Biz.Biz_Bsc_Work_Task objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Work_Task(); objBSC.Iexec_ref_id = this.IExec_Ref_ID; objBSC.Itask_ref_id = this.ITask_Ref_ID; objBSC.Itxr_user = gUserInfo.Emp_Ref_ID; int intRtn = objBSC.DeleteData(objBSC.Iexec_ref_id, objBSC.Itask_ref_id, objBSC.Itxr_user); if (objBSC.Transaction_Result == "Y") { // this.TxrWorkPoolQuestion(); ltrScript.Text = JSHelper.GetAlertOpenerControlCallBackScript(objBSC.Transaction_Message, this.ICCB1, true); } else { ltrScript.Text = JSHelper.GetAlertScript(objBSC.Transaction_Message, false); this.IType = "U"; } }
private void InsertWorkTask() { if (!this.CheckFormData()) { return; } MicroBSC.BSC.Biz.Biz_Bsc_Work_Task objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Work_Task(); objBSC.Iexec_ref_id = this.IExec_Ref_ID; objBSC.Itask_name = txtTaskName.Text.Trim(); objBSC.Itask_desc = txtTaskDesc.Value; objBSC.Itask_weight = Convert.ToDecimal(GetStringDigit(this.txtTaskWeight.Text, "###0.0")); DateTime mydt1 = new DateTime(1900, 1, 1, 0, 0, 0); objBSC.Itgt_str_date = (calTgtStrDate.Value == null || calTgtStrDate.Value == "") ? mydt1 : Convert.ToDateTime(calTgtStrDate.Value); objBSC.Itgt_end_date = (calTgtEndDate.Value == null || calTgtEndDate.Value == "") ? mydt1 : Convert.ToDateTime(calTgtEndDate.Value); objBSC.Itgt_cost = Convert.ToInt32(GetStringDigit(this.txtTgtCost.Text, "###0")); objBSC.Irst_str_date = (calRstStrDate.Value == null || calRstStrDate.Value == "") ? mydt1 : Convert.ToDateTime(calRstStrDate.Value); objBSC.Irst_end_date = (calRstEndDate.Value == null || calRstEndDate.Value == "") ? mydt1 : Convert.ToDateTime(calRstEndDate.Value); objBSC.Irst_cost = Convert.ToInt32(GetStringDigit(this.txtRstCost.Text, "###0")); objBSC.Ido_rate = Convert.ToDecimal(GetStringDigit(this.txtDoRate.Text, "###0.0")); objBSC.Iadd_file = this.hdfTargetReasonFile.Value; objBSC.Iuse_yn = (this.chkUseYN.Checked) ? "Y" : "N"; objBSC.Itxr_user = gUserInfo.Emp_Ref_ID; int intRtn = objBSC.InsertData(objBSC.Iexec_ref_id, objBSC.Itask_ref_id, objBSC.Itask_name, objBSC.Itask_desc, objBSC.Itask_weight, objBSC.Itgt_str_date, objBSC.Itgt_end_date, objBSC.Itgt_cost, objBSC.Irst_str_date, objBSC.Irst_end_date, objBSC.Irst_cost, objBSC.Ido_rate, objBSC.Iadd_file, objBSC.Iuse_yn, objBSC.Itxr_user); ltrScript.Text = JSHelper.GetAlertScript(objBSC.Transaction_Message, false); if (objBSC.Transaction_Result == "Y") { this.IExec_Ref_ID = objBSC.Iexec_ref_id; this.ITask_Ref_ID = objBSC.Itask_ref_id; this.IType = "U"; this.SetFormData(); this.SetButton(); } }
private void SetFormData() { if (this.IType != "A") { txtCostRate.Text = "0"; MicroBSC.BSC.Biz.Biz_Bsc_Work_Task objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Work_Task(this.IExec_Ref_ID, this.ITask_Ref_ID); IExec_Ref_ID = objBSC.Iexec_ref_id; txtExecRefIdName.Text = objBSC.Iexec_ref_id_name; ITask_Ref_ID = objBSC.Itask_ref_id; txtTaskName.Text = objBSC.Itask_name; txtTaskDesc.Value = objBSC.Itask_desc; spnTaskDesc.InnerHtml = objBSC.Itask_desc; txtTaskWeight.Text = Convert.ToString(objBSC.Itask_weight); calTgtStrDate.Value = (Convert.ToString(objBSC.Itgt_str_date) == "1900-01-01 오전 12:00:00") ? "" : Convert.ToString(objBSC.Itgt_str_date); calTgtEndDate.Value = (Convert.ToString(objBSC.Itgt_end_date) == "1900-01-01 오전 12:00:00") ? "" : Convert.ToString(objBSC.Itgt_end_date); txtTgtCost.Text = Convert.ToString(objBSC.Itgt_cost); calRstStrDate.Value = (Convert.ToString(objBSC.Irst_str_date) == "1900-01-01 오전 12:00:00") ? "" : Convert.ToString(objBSC.Irst_str_date); calRstEndDate.Value = (Convert.ToString(objBSC.Irst_end_date) == "1900-01-01 오전 12:00:00") ? "" : Convert.ToString(objBSC.Irst_end_date); txtRstCost.Text = Convert.ToString(objBSC.Irst_cost); if (objBSC.Itgt_cost != 0 && objBSC.Irst_cost != 0) { txtCostRate.Text = string.Format("{0:F2}", (Convert.ToDouble(objBSC.Irst_cost) / Convert.ToDouble(objBSC.Itgt_cost) * 100)); } else { txtCostRate.Text = "0"; } txtDoRate.Text = Convert.ToString(objBSC.Ido_rate); 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) { txtTaskDesc.Visible = false; spnTaskDesc.Visible = true; iBtnTargetFile_Up.Visible = false; } else { txtTaskDesc.Visible = true; spnTaskDesc.Visible = false; iBtnTargetFile_Up.Visible = true; } } else { //ltrScript.Text = JSHelper.GetAlertScript("this.IEstterm_Ref_ID=" + Convert.ToString(this.IEstterm_Ref_ID) + " this.IEst_Dept_Ref_ID=" + Convert.ToString(this.IEst_Dept_Ref_ID) + " this.IWork_Ref_ID=" + Convert.ToString(this.IWork_Ref_ID) + " this.IExec_Ref_ID=" + Convert.ToString(this.IExec_Ref_ID), false); MicroBSC.BSC.Biz.Biz_Bsc_Work_Exec objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Work_Exec(this.IEstterm_Ref_ID, this.IEst_Dept_Ref_ID, this.IWork_Ref_ID, this.IExec_Ref_ID); txtExecRefIdName.Text = objBSC.Iexec_name; txtTaskWeight.Value = "0"; calTgtStrDate.Value = System.DateTime.Now; calTgtEndDate.Value = System.DateTime.Now; calRstStrDate.Value = ""; calRstEndDate.Value = ""; txtCostRate.Text = "0"; txtDoRate.Value = "0"; this.chkUseYN.Checked = true; iBtnTargetFile_Down.Visible = false; lbFileList.Items.Clear(); //ddlKpiCategoryTop_SelectedIndexChanged(null, null); } }
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); } }