Example #1
0
    private void InitControlValue()
    {
        Biz_Bsc_Threshold_Code biz = new Biz_Bsc_Threshold_Code();

        int sCodeID = GetRequestByInt("CODEID");

        IDataReader sdr = biz.InfoThresholdCode(sCodeID);

        if (sdr.Read())
        {
            int totCount = Convert.ToInt32(GetValue(sdr["TOTCOUNT"]));
            GetSequenceBind(totCount);

            txtThresholdEName.Text    = GetValue(sdr["THRESHOLD_ENAME"]);
            txtThresholdKName.Text    = GetValue(sdr["THRESHOLD_KNAME"]);
            imgPrev.ImageUrl          = GetRegFileUrl(GetValue(sdr["IMAGE_FILE_NAME"]));
            rBtnList.SelectedValue    = GetValue(sdr["USE_YN"]);
            ddlSequence.SelectedValue = GetValue(sdr["SEQUENCE"]);
            hdnOldFileName.Value      = GetValue(sdr["IMAGE_FILE_NAME"]);
        }
        else
        {
            PageUtility.ExecuteScript("alert('수정을 위한 정보를 알 수 없습니다!\\n\\n다시 시도해 주십시요!');gfCloseWindow();");
        }
    }
Example #2
0
    // 평가코드 삭제
    private void DelThresHoldCode()
    {
        string sScript = "";

        string[,] saPKID;

        saPKID = GetSelectedThresholdCode_ID(this.UltraWebGrid1);

        if (saPKID.GetUpperBound(0) <= -1)
        {
            PageUtility.AlertMessage("삭제할 대상을 선택하셔야 합니다.");
            return;
        }

        Biz_Bsc_Threshold_Code biz = new Biz_Bsc_Threshold_Code();
        int iRet = biz.DelThresholdCode(saPKID);

        if (iRet == -1)
        {
            sScript += "평가단계에서 사용중인 코드이므로 삭제 할수없습니다\\n\\n평가단계에서 먼저 삭제해야 합니다";
        }
        else
        {
            sScript += string.Format(
                "[{0}]건이 삭제되었습니다!"
                , iRet
                );
        }
        PageUtility.AlertMessage(sScript);
        SearchBind();
    }
Example #3
0
    private void AddThresholdCode()
    {
        string sErrMsg = "";

        if (!IsMandatory(out sErrMsg))
        {
            PageUtility.ExecuteScript(sErrMsg);
            return;
        }

        string sFileName = "";

        if (GetValue(fileUpload.Value) != "")
        {
            sFileName = Utils.FileExtensionValidator(fileUpload.PostedFile) == true ? sFileName = MicroBSC.Common.Utils.UploadFile(fileUpload.Value, CS_FILE_SAVE_INFO) : sFileName = "";
            //sFileName = MicroBSC.Common.Utils.UploadFile(fileUpload.Value, CS_FILE_SAVE_INFO);

            if (sFileName == "")
            {
                PageUtility.AlertMessage("이미지를 저장하는데 실패하였습니다!\\n\\n관리자에게 문의하십시오");
                return;
            }
        }

        Biz_Bsc_Threshold_Code biz = new Biz_Bsc_Threshold_Code();

        string sThresholdEName = GetValue(txtThresholdEName.Text);
        string sThresholdKName = GetValue(txtThresholdKName.Text);
        string sUseYN          = GetValue(rBtnList.SelectedValue);
        int    sSequence       = Convert.ToInt32(GetValue(ddlSequence.SelectedValue));
        int    Emp_Ref_ID      = gUserInfo.Emp_Ref_ID;

        //Response.Write(string.Format("{0}||{1}||{2}||{3}||{4}",sThresholdEName, sThresholdKName, sUseYN, sSequence, Emp_Ref_ID));
        int iRet = biz.InsertThresholdCode(sThresholdEName, sThresholdKName, sFileName, sSequence, sUseYN, Emp_Ref_ID);

        string sScript = "";

        if (iRet == 3)
        {
            sScript += "alert('이미 등록된 THRESHOLD 명이 있습니다');";
        }
        else
        {
            if (iRet > 0)
            {
                sScript += "try{alert('등록되었습니다');opener.__doPostBack('" + this.ICCB1 + "', '');}catch(e){};gfCloseWindow();";
            }
            else
            {
                sScript += "alert('등록되지 않았습니다');";
            }
        }

        PageUtility.ExecuteScript(sScript);
    }
Example #4
0
    // 등급코드를 가져온다
    private void BindThresholdCodeList()
    {
        Biz_Bsc_Threshold_Code biz = new Biz_Bsc_Threshold_Code();

        COD_ESEQ_COUNT = biz.RtnThresholdCodeMaxSeq();

        string  strLevel = GetValue(ddlLevel.SelectedValue);
        DataSet ds       = biz.GetThresholdCodeList(strLevel);

        UltraWebGrid1.DataSource = ds;
        UltraWebGrid1.DataBind();
    }
Example #5
0
    private void SetKpiSignalMaster()
    {
        Biz_Bsc_Threshold_Code objBSC = new Biz_Bsc_Threshold_Code();
        DataTable dt = objBSC.GetThresholdCodeList("").Tables[0];

        foreach (DataRow dr in dt.Rows)
        {
            dr["IMAGE_FILE_NAME"] = string.Format("../images/org/signal_set{0}/{1}", WebUtility.GetConfig("DTree.SignalSet"), dr["IMAGE_FILE_NAME"]);
        }

        grvSignal.DataSource = dt;
        grvSignal.DataBind();
    }
Example #6
0
    private void GetThresholdCodeBind()
    {
        Biz_Bsc_Threshold_Code biz = new Biz_Bsc_Threshold_Code();
        DataSet ds = biz.GetThresholdCodeList("");

        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
        {
            ListItem li = new ListItem();

            li.Text  = ds.Tables[0].Rows[i]["THRESHOLD_ENAME"].ToString();
            li.Value = ds.Tables[0].Rows[i]["THRESHOLD_REF_ID"].ToString();

            ddlThresholdCode.Items.Add(li);
        }
    }
Example #7
0
    /// <summary>
    /// 시그널추이 스키마
    /// YMD | E | G | W | A
    /// </summary>
    /// <returns></returns>
    public DataTable GetGradeSchema()
    {
        DataTable dtGrade            = new DataTable("GRADE");
        Biz_Bsc_Threshold_Code objTC = new Biz_Bsc_Threshold_Code();
        DataSet dsGrade = objTC.GetThresholdCodeList("");
        DataRow drGrade = null;

        DateTime startYM = (DateTime.ParseExact(this.IYmd, "yyyyMM", null)).AddYears(-1);

        dtGrade.Columns.Add(COL_KEY.KEY_FIELD.ToString(), typeof(string));

        iRow = dsGrade.Tables[0].Rows.Count;
        for (int i = iRow - 1; i > -1; i--)
        {
            bool IsDefault = (dsGrade.Tables[0].Rows[i]["DEFAULT_IMG_YN"].ToString().ToUpper() == "N") ? false : true;
            if (!IsDefault)
            {
                DataColumn dc = dtGrade.Columns.Add(dsGrade.Tables[0].Rows[i]["THRESHOLD_REF_ID"].ToString(), typeof(decimal));
                dc.Caption   = dsGrade.Tables[0].Rows[i]["THRESHOLD_COLOR"].ToString();
                dc.Namespace = dsGrade.Tables[0].Rows[i]["THRESHOLD_KNAME"].ToString();
            }

            if (dsGrade.Tables[0].Rows[i]["ALERT_IMG_YN"].ToString().ToUpper() == "Y")
            {
                this.IThresholdRefID = int.Parse(dsGrade.Tables[0].Rows[i]["THRESHOLD_REF_ID"].ToString());
            }
        }

        for (int i = 1; i <= 12; i++)
        {
            drGrade = dtGrade.NewRow();
            drGrade[COL_KEY.KEY_FIELD.ToString()] = startYM.AddMonths(i).ToString("yyyyMM");
            dtGrade.Rows.Add(drGrade);
        }

        return(dtGrade);
    }