示例#1
0
    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();
        }
    }
示例#2
0
    /// <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);
    }