Exemple #1
0
    public void setKpiData()
    {
        if (ddlEstTermInfo.Items.Count < 1)
        {
            PageUtility.AlertMessage("등록된 평가기간이 없습니다.");
            return;
        }

        Biz_Bsc_Kpi_Prj objBSC = new Biz_Bsc_Kpi_Prj();

        int    iEstterm_ref_id    = WebUtility.GetIntByValueDropDownList(ddlEstTermInfo);
        string iResult_input_type = WebUtility.GetByValueDropDownList(ddlResultInput);
        string iKpiGroup_ref_id   = WebUtility.GetByValueDropDownList(ddlKpiGroupRefID);
        string iKpi_code          = txtKPICode.Text.Trim();
        string iKpi_name          = txtKPIName.Text.Trim();
        string iChampion_emp_name = txtChamName.Text.Trim();
        int    iDept_ref_id       = (ddlEstDept.SelectedValue.Trim() == "") ? -1 : int.Parse(ddlEstDept.SelectedValue);

        DataSet ds = objBSC.GetKpiList
                         (iEstterm_ref_id
                         , this.IPrjRefID
                         , iResult_input_type
                         , iKpi_code
                         , iKpi_name
                         , iChampion_emp_name
                         , iDept_ref_id
                         , iKpiGroup_ref_id
                         , gUserInfo.Emp_Ref_ID);

        ugrdKpiList.Clear();
        ugrdKpiList.DataSource = ds;
        ugrdKpiList.DataBind();

        //lblCountRow.Text = "Total Rows : " + ds.Tables[0].Rows.Count.ToString();
    }
Exemple #2
0
    public void setKpiData()
    {
        if (ddlEstTermInfo.Items.Count < 1)
        {
            PageUtility.AlertMessage("등록된 평가기간이 없습니다.");
            return;
        }

        string iresult_input_method = ddlResultInput.SelectedValue;
        string ikpi_code            = txtKPICode.Text.Trim();
        string ikpi_name            = txtKPIName.Text.Trim();
        string iemp_name            = txtChamName.Text.Trim();
        int    ilogin_id            = int.Parse(gUserInfo.Emp_Ref_ID.ToString());
        string ikpi_group_ref_id    = PageUtility.GetByValueDropDownList(ddlKpiGroupRefID);

        this.IEstTermRefID = PageUtility.GetIntByValueDropDownList(ddlEstTermInfo);
        this.IEstDeptRefID = PageUtility.GetIntByValueDropDownList(ddlEstDept);
        this.IYmd          = PageUtility.GetByValueDropDownList(ddlEstTermMonth);
        string ikpi_use_yn = "Y";

        MicroBSC.BSC.Biz.Biz_Bsc_Map_Kpi objKpi = new MicroBSC.BSC.Biz.Biz_Bsc_Map_Kpi();
        DataSet ds = objKpi.GetKpiListPerEstDept2(this.IEstTermRefID, this.IEstDeptRefID, this.IYmd, iresult_input_method, ikpi_code, ikpi_name, iemp_name, ikpi_group_ref_id, ikpi_use_yn);

        ugrdMapKpi.Visible            = true;
        ugrdMoonChartForPrint.Visible = false;
        ugrdMoonChartForPrint.Clear();

        ugrdMapKpi.Clear();
        ugrdMapKpi.DataSource = ds;
        ugrdMapKpi.DataBind();

        lblRowCount.Text = ugrdMapKpi.Rows.Count.ToString("#,##0");
    }
Exemple #3
0
    // test


    #region 초기 세팅 메소드

    #endregion

    #region 내부 함수

    public void setKpiData()
    {
        if (ddlEstTermInfo.Items.Count < 1)
        {
            PageUtility.AlertMessage("등록된 평가기간이 없습니다.");
            return;
        }

        string iresult_input_method = "";
        string ikpi_code            = "";
        string ikpi_name            = "";
        string iemp_name            = "";
        int    ilogin_id            = int.Parse(gUserInfo.Emp_Ref_ID.ToString());
        string ikpi_group_ref_id    = "";

        this.SetParameter();

        MicroBSC.BSC.Biz.Biz_Bsc_Map_Kpi objKpi = new MicroBSC.BSC.Biz.Biz_Bsc_Map_Kpi();
        DataSet ds = objKpi.GetKpiListPerEstDept(this.IEstTermRefID, this.IEstDeptRefID, this.IYmd, iresult_input_method, ikpi_code, ikpi_name, iemp_name, ikpi_group_ref_id);

        ugrdMoonChart.Visible = true;
        ugrdMoonChart.Clear();

        lblCountRow.Text = "Total Rows : " + ugrdMoonChart.Rows.Count.ToString();
    }
Exemple #4
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();
    }
Exemple #5
0
    public void setKpiData()
    {
        if (ddlEstTermInfo.Items.Count < 1)
        {
            PageUtility.AlertMessage("등록된 평가기간이 없습니다.");
            return;
        }

        Biz_Bsc_Mbo_Kpi_Weight objBSC = new Biz_Bsc_Mbo_Kpi_Weight();

        objBSC.IEmp_Ref_Id = (User.IsInRole(ROLE_ADMIN)) ? 0 : EMP_REF_ID;

        DataSet ds = objBSC.GetMyKpiList
                         (PageUtility.GetIntByValueDropDownList(ddlEstTermInfo)
                         , objBSC.IEmp_Ref_Id
                         , ""
                         , txtKPICode.Text
                         , txtKPIName.Text
                         , "Y"
                         , txtChamName.Text
                         , PageUtility.GetByValueDropDownList(ddlKpiGroupRefID)
                         , PageUtility.GetIntByValueDropDownList(ddlEstDept));

        ugrdKpiList.Clear();
        ugrdKpiList.DataSource = ds;
        ugrdKpiList.DataBind();

        lblCountRow.Text = "Total Rows : " + ds.Tables[0].Rows.Count.ToString();
    }
Exemple #6
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);
    }
Exemple #7
0
 private void DoCopyStg()
 {
     MicroBSC.BSC.Biz.Biz_Bsc_Stg_Info objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Stg_Info();
     if (objBSC.CopyStg(WebUtility.GetIntByValueDropDownList(ddlEstTermInfo), WebUtility.GetIntByValueDropDownList(ddlEstTermInfo2), gUserInfo.Emp_Ref_ID))
     {
         PageUtility.AlertMessage("복사하였습니다.");
     }
     else
     {
         PageUtility.AlertMessage("복사 실패!");
     }
     DoSetPossibleCopay();
 }
Exemple #8
0
    protected void iBtnDownload_Click(object sender, ImageClickEventArgs e)
    {
        if (ddlFileUpload.SelectedValue.Trim() == "")
        {
            PageUtility.AlertMessage("첨부된 파일을 선택하세요.");
            return;
        }

        string sText  = ddlFileUpload.SelectedItem.Text;
        string sValue = ddlFileUpload.SelectedItem.Value;

        PageUtility.FileDownLoad(sText.Substring(0, sText.LastIndexOf(" (")), sValue);
    }
Exemple #9
0
 private void DoCopyStg()
 {
     MicroBSC.Estimation.Biz.Biz_EstDeptInfos dept = new MicroBSC.Estimation.Biz.Biz_EstDeptInfos();
     if (dept.CopyEstDept(WebUtility.GetIntByValueDropDownList(ddlEstTermInfo), WebUtility.GetIntByValueDropDownList(ddlEstTermInfo2), gUserInfo.Emp_Ref_ID))
     {
         PageUtility.AlertMessage("복사하였습니다.");
     }
     else
     {
         PageUtility.AlertMessage("복사 실패!" + dept.errMSG.Replace("'", ""));
     }
     DoSetPossibleCopay();
 }
Exemple #10
0
    private void DoCopyStg()
    {
        Biz_EstDeptOrgScoreInfos bizEDOS = new Biz_EstDeptOrgScoreInfos();

        if (bizEDOS.CopyEDOS(WebUtility.GetIntByValueDropDownList(ddlEstTermInfo), WebUtility.GetIntByValueDropDownList(ddlEstTermInfo2), gUserInfo.Emp_Ref_ID))
        {
            PageUtility.AlertMessage("복사하였습니다.");
        }
        else
        {
            PageUtility.AlertMessage("복사 실패!");
        }
        DoSetPossibleCopay();
    }
Exemple #11
0
    public void GetCountConfirmCancel(string strGubun)
    {
        int             itxr_user = EMP_REF_ID;
        CheckBox        chk;
        UltraGridRow    row;
        TemplatedColumn col;


        DataTable dt = new DataTable("tblKpiConfirmList");

        dt.Columns.Add("ESTTERM_REF_ID", typeof(int));
        dt.Columns.Add("KPI_REF_ID", typeof(int));
        dt.Columns.Add("TXR_USER", typeof(int));
        DataRow dr;

        for (int i = 0; i < ugrdKpiList.Rows.Count; i++)
        {
            row = ugrdKpiList.Rows[i];
            col = (TemplatedColumn)row.Band.Columns.FromKey("selchk");
            chk = (CheckBox)((CellItem)col.CellItems[row.BandIndex]).FindControl("cBox");

            if (chk.Checked)
            {
                try
                {
                    dr = dt.NewRow();
                    dr["ESTTERM_REF_ID"] = int.Parse(row.Cells.FromKey("ESTTERM_REF_ID").Value.ToString());
                    dr["KPI_REF_ID"]     = int.Parse(row.Cells.FromKey("KPI_REF_ID").Value.ToString());
                    dr["TXR_USER"]       = itxr_user;
                    dt.Rows.Add(dr);
                }
                catch (Exception ex)
                {
                    PageUtility.AlertMessage(ex.Message);
                    return;
                }
            }
        }

        if (dt.Rows.Count < 1)
        {
            PageUtility.AlertMessage("확정 항목을 선택하세요.");
        }
        else
        {
            this.SetKpiConfirmCancel(dt, strGubun);
            this.setKpiData();
        }
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        HttpFileCollection files = Request.Files;

        for (int i = 0; i < files.Count; i++)
        {
            if (files[i].ContentLength > 0 && files[i].ContentLength <= 20971520)
            {
                SetAdd2(files[i]);
            }
            else
            {
                PageUtility.AlertMessage("파일 최대용량은 20MB까지 입니다.");
            }
        }
    }
Exemple #13
0
    private void DelRoleInfo()
    {
        int    iChecked = 0;
        bool   bChecked = false;
        string sPKs     = "";

        string[,] saPKs;
        string sScript = "";

        UltraGridRow row;

        // 체크되어있는 사항 있는지 점검
        for (int i = 0; i < this.UltraWebGrid1.Rows.Count; i++)
        {
            row = UltraWebGrid1.Rows[i];

            if (Convert.ToBoolean(row.Cells.FromKey("SelChk").GetText()))
            {
                if (bChecked == false)
                {
                    bChecked = true;
                }

                sPKs += row.Cells.FromKey("EMP_REF_ID").Value.ToString() + ";" + row.Cells.FromKey("ROLE_REF_ID").Value.ToString() + ";";

                iChecked++;
            }
        }

        if (!bChecked)
        {
            PageUtility.AlertMessage("[권한삭제]를 처리하시려면 먼저 삭제할 사항을 선택하셔야 합니다!");
            return;
        }
        else
        {
            saPKs = TypeUtility.GetSplit(sPKs, 2);

            int iRet = 0;
            Biz_ctl_ctl2100_Role biz = new Biz_ctl_ctl2100_Role();

            iRet = biz.DelRoleInfo(saPKs);

            //sScript = string.Format("alert('[{0}]건의 권한을 삭제처리 하였습니다!');", iRet);
            //PageUtility.ExecuteScript(sScript);
        }
    }
Exemple #14
0
    public void setKpiData()
    {
        if (this.IEstTermRefID < 1)
        {
            PageUtility.AlertMessage("평가기간을 알 수 없습니다.");
            return;
        }

        Biz_Bsc_Kpi_Info objBSC = new Biz_Bsc_Kpi_Info();

        objBSC.Iestterm_ref_id    = this.IEstTermRefID;
        objBSC.Iresult_input_type = ddlResultInput.SelectedValue;
        objBSC.Ikpi_code          = txtKPICode.Text.Trim();
        objBSC.Ikpi_name          = txtKPIName.Text.Trim();
        objBSC.Ichampion_emp_name = txtChamName.Text.Trim();
        int iest_dept_id = (ddlEstDept.SelectedValue.Trim() == "") ? -1 : int.Parse(ddlEstDept.SelectedValue);

        objBSC.Iuse_yn   = "";
        objBSC.Itxr_user = int.Parse(gUserInfo.Emp_Ref_ID.ToString());

        //DataSet ds = objBSC.GetKpiListPerUser
        //                        (objBSC.Iestterm_ref_id
        //                       , objBSC.Iresult_input_type
        //                       , objBSC.Ikpi_code
        //                       , objBSC.Ikpi_name
        //                       , objBSC.Iuse_yn
        //                       , objBSC.Ichampion_emp_name
        //                       , iest_dept_id
        //                       , PageUtility.GetByValueDropDownList(ddlKpiGroupRefID)
        //                       , objBSC.Itxr_user);

        DataSet ds = objBSC.GetKpiChildTargetList
                         (this.IEstTermRefID
                         , this.IKpiRefID
                         , txtKPICode.Text
                         , txtKPIName.Text
                         , txtChamName.Text
                         , PageUtility.GetByValueDropDownList(ddlKpiGroupRefID)
                         , PageUtility.GetIntByValueDropDownList(ddlEstDept));

        ugrdKpiList.Clear();
        ugrdKpiList.DataSource = ds;
        ugrdKpiList.DataBind();
    }
Exemple #15
0
    private void AddThreshold()
    {
        string sScript = string.Empty;

        if (Utils.FileExtensionValidator(fileUpload.PostedFile))
        {
            string sErrMsg = "";
            if (!IsMandatory(out sErrMsg))
            {
                PageUtility.ExecuteScript(sErrMsg);
                return;
            }

            string sFileName = "";
            sFileName = MicroBSC.Common.Utils.UploadFile(fileUpload.Value, "Ctl.UploadImages.CTL4100");

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

            Biz_ctl_ctl4100 biz = new Biz_ctl_ctl4100();

            string sType          = TypeUtility.GetNumString(GetRequest("TYPE"));
            string sThresholdName = GetValue(txtThresholdName.Text);
            string sMinValue      = GetValue(txtMinValue.Text);
            string sColor         = GetValue(txtColor.Text);
            string sPoint         = GetValue(txtPoint.Text);

            int iRet = biz.AddThreshold(sType, sThresholdName, sMinValue, sColor, sFileName, sPoint);
            sScript = string.Format("alert('[{0}]건이 등록되었습니다!');", iRet);

            if (iRet > 0)
            {
                sScript += "try{opener.__doPostBack('lbReload', '');}catch(e){};gfCloseWindow();";
            }
        }
        else
        {
            sScript = "alert('유효하지 않은 파일입니다.');";
        }
        PageUtility.ExecuteScript(sScript);
    }
Exemple #16
0
    protected void ibtnRollback_Click(object sender, ImageClickEventArgs e)
    {
        CheckBox        chk;
        UltraGridRow    row;
        TemplatedColumn col;

        int    iChecked = 0;
        string sPKs     = "";

        string[,] saPKs;


        for (int i = 0; i < this.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)
            {
                sPKs += row.Cells.FromKey("EMP_REF_ID") + ";" + row.Cells.FromKey("DEPT_REF_ID") + ";";
                iChecked++;
            }
        }

        if (iChecked <= 0)
        {
            PageUtility.AlertMessage("먼저 사용할 유저를 선택하셔야 합니다!");
            return;
        }
        else
        {
            saPKs = TypeUtility.GetSplit(sPKs, 2);

            int             iRet = 0;
            Biz_ctl_ctl2100 biz  = new Biz_ctl_ctl2100();

            iRet = biz.ChgFlagRelBackDeptInfo(saPKs);

            //SetSelectTree();
            SearchEmpInfo();
        }
    }
Exemple #17
0
    public void SetWeight()
    {
        int itxr_user = gUserInfo.Emp_Ref_ID;

        UltraGridRow row;

        Biz_Bsc_Mbo_Kpi_Weight objBSC = new Biz_Bsc_Mbo_Kpi_Weight();

        DataTable dt = new DataTable();

        dt.Columns.Add("ESTTERM_REF_ID", typeof(int));
        dt.Columns.Add("KPI_REF_ID", typeof(int));
        dt.Columns.Add("WEIGHT", typeof(decimal));
        dt.Columns.Add("KPI_CLASS_REF_ID", typeof(string));

        for (int i = 0; i < ugrdMBO.Rows.Count; i++)
        {
            row = ugrdMBO.Rows[i];

            DataRow dr = dt.NewRow();
            dr["ESTTERM_REF_ID"] = DataTypeUtility.GetToInt32(row.Cells.FromKey("ESTTERM_REF_ID").Value);
            dr["KPI_REF_ID"]     = DataTypeUtility.GetToInt32(row.Cells.FromKey("KPI_REF_ID").Value);
            dr["WEIGHT"]         = DataTypeUtility.GetToDouble(row.Cells.FromKey("WEIGHT").Value);

            try
            {
                dr["KPI_CLASS_REF_ID"] = (row.Cells.FromKey("IS_TEAM_KPI").Value.ToString() == "Y" ? "SCO" : "PCO");
            }
            catch { }
            dt.Rows.Add(dr);
        }

        if (objBSC.UpdateMBOWeight(gUserInfo.Emp_Ref_ID, dt))
        {
            PageUtility.AlertMessage("처리하였습니다.");
        }
        else
        {
            PageUtility.AlertMessage("실패하였습니다.");
        }

        DoBinding();
    }
Exemple #18
0
    /// <summary>
    /// SetPassUpdate
    ///     : 비밀번호 일괄수정
    /// </summary>
    private void SetPassUpdate()
    {
        string sSaveFilePath = AppDomain.CurrentDomain.BaseDirectory + PageUtility.GetAppConfig("Excel.Temp");

        string lsAddFileInfo = "";      // 테이블에 저장될 파일정보
        string lsAddName     = "";      //중복되면 시간을 붙여 파일명으로 만든다.
        string lsFileName    = System.IO.Path.GetFileName(hFile.PostedFile.FileName);

        if (Page.IsPostBack == true)
        {
            if (lsFileName == "")
            {
                return;
            }

            if (lsFileName.Substring(lsFileName.LastIndexOf(".") + 1).ToUpper() != "XLS" || lsFileName.Substring(lsFileName.LastIndexOf(".") + 1).ToUpper() != "XLSX")
            {
                PageUtility.AlertMessage("엑셀파일만 업로드할 수 있습니다!");
                return;
            }

            string sGetUpFileName = MicroBSC.Common.Utils.UploadFile(hFile.Value, "Excel.Temp");

            if (sGetUpFileName == "")
            {
                PageUtility.AlertMessage("업로드할 파일을 선택하십시요!");
                return;
            }

            Biz_ctl_ctlPassExcel_Upload biz = new Biz_ctl_ctlPassExcel_Upload();

            int iRet = biz.UpdateEmpPass(sSaveFilePath + "/" + sGetUpFileName);
            PageUtility.ExecuteScript(
                string.Format
                (
                    "alert('[{0}]건을 업데이트 했습니다!');"
                    + "window.close();"
                    , iRet
                )
                );
        }
    }
Exemple #19
0
    private void AddRoleInfo()
    {
        if (PageUtility.GetByValueDropDownList(ddlRole) == "")
        {
            PageUtility.AlertMessage("추가할 권한이 없습니다!");
            return;
        }

        int iEmpRefID  = Convert.ToInt32(TypeUtility.GetNumString(GetRequest("emp_ref_id")));
        int iRoleRefID = Convert.ToInt32(PageUtility.GetByValueDropDownList(ddlRole));

        Biz_ctl_ctl2100_Role biz = new Biz_ctl_ctl2100_Role();

        biz.AddRoleInfo(iEmpRefID, iRoleRefID);

        //if (biz.AddRoleInfo(iEmpRefID, iRoleRefID) > 0)
        //    PageUtility.AlertMessage("권한이 추가되었습니다!");
        //else
        //    PageUtility.AlertMessage("권한이 추가되지 못했습니다!");
    }
Exemple #20
0
    private void DelThresHold()
    {
        Infragistics.WebUI.UltraWebGrid.UltraGridRow    ugRow;
        Infragistics.WebUI.UltraWebGrid.TemplatedColumn ugCol;

        string sPKID = "";

        string[,] saPKID;

        string sScript = "";

        bool bCheck = false;

        for (int i = 0; i < this.UltraWebGrid1.Rows.Count; i++)
        {
            ugRow  = this.UltraWebGrid1.Rows[i];
            bCheck = Convert.ToBoolean(ugRow.Cells.FromKey("selChk").Value);

            if (bCheck)
            {
                sPKID += GetValue(ugRow.Cells.FromKey("V_CODE_ID").Value) + ";";
            }
        }

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

        Biz_ctl_ctl4100 biz  = new Biz_ctl_ctl4100();
        int             iRet = biz.DelThreshold(saPKID);

        sScript += string.Format(
            "[{0}]건이 삭제되었습니다!"
            , iRet
            );
        PageUtility.AlertMessage(sScript);
        SearchDB();
    }
Exemple #21
0
    private void UpdateThreshold()
    {
        string sErrMsg = "";

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

        string sFileName = "";

        if (fileUpload.Value != "")
        {
            sFileName = Utils.FileExtensionValidator(fileUpload.PostedFile) == true ? sFileName = MicroBSC.Common.Utils.UploadFile(fileUpload.Value, CS_FILE_SAVE_INFO) : sFileName = "";
            if (sFileName == "")
            {
                PageUtility.AlertMessage("이미지를 저장하는데 실패하였습니다!\n\n관리자에게 문의하십시오!");
                return;
            }
        }

        Biz_ctl_ctl4100 biz = new Biz_ctl_ctl4100();

        string sCodeID        = TypeUtility.GetNumString(GetRequest("CODE_ID"));
        string sThresholdName = GetValue(txtThresholdName.Text);
        string sMinValue      = GetValue(txtMinValue.Text);
        string sColor         = GetValue(txtColor.Text);
        string sPoint         = GetValue(txtPoint.Text);

        int    iRet    = biz.UpdateThreshold(sCodeID, sThresholdName, sMinValue, sColor, sFileName, sPoint);
        string sScript = string.Format("alert('[{0}]건이 수정되었습니다!');", iRet);

        if (iRet > 0)
        {
            sScript += "try{opener.__doPostBack('lbReload', '');}catch(e){};gfCloseWindow();";
        }

        PageUtility.ExecuteScript(sScript);
    }
Exemple #22
0
    public void setKpiData()
    {
        if (ddlEstTermInfo.Items.Count < 1)
        {
            PageUtility.AlertMessage("등록된 평가기간이 없습니다.");
            return;
        }

        MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Info objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Info();

        objBSC.Iestterm_ref_id    = (ddlEstTermInfo.Items.Count > 0) ? int.Parse(ddlEstTermInfo.SelectedValue) : 0;
        objBSC.Iresult_input_type = ddlResultInput.SelectedValue;
        objBSC.Ikpi_code          = txtKPICode.Text.Trim();
        objBSC.Ikpi_name          = txtKPIName.Text.Trim();
        objBSC.Ichampion_emp_name = txtChamName.Text.Trim();
        int iest_dept_id = (ddlEstDept.SelectedValue.Trim() == "") ? -1 : int.Parse(ddlEstDept.SelectedValue);

        objBSC.Iuse_yn   = "";
        objBSC.Itxr_user = int.Parse(gUserInfo.Emp_Ref_ID.ToString());

        DataSet ds = objBSC.GetKpiListPerUser
                         (objBSC.Iestterm_ref_id
                         , objBSC.Iresult_input_type
                         , objBSC.Ikpi_code
                         , objBSC.Ikpi_name
                         , objBSC.Iuse_yn
                         , objBSC.Ichampion_emp_name
                         , iest_dept_id
                         , PageUtility.GetByValueDropDownList(ddlKpiGroupRefID)
                         , "Y"
                         , objBSC.Itxr_user);

        ugrdKpiList.Clear();
        ugrdKpiList.DataSource = ds;
        ugrdKpiList.DataBind();

        //lblCountRow.Text = "Total Rows : " + ds.Tables[0].Rows.Count.ToString();
    }
Exemple #23
0
    /// <summary>
    /// 전략풀 그리드 조회
    /// </summary>
    protected void SetStgGrid()
    {
        if (TypeUtility.GetNumString(PageUtility.GetByValueDropDownList(ddlEstTermInfo)) == "")
        {
            PageUtility.AlertMessage("평가기간을 알 수 없습니다!");
            return;
        }

        MicroBSC.BSC.Biz.Biz_Bsc_Stg_Tree objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Stg_Tree();
        objBSC.IEstterm_Ref_Id = this.IEstTermRefID;
        objBSC.IVersion_Ref_Id = this.IVersionRefID;

        //DataSet rDs = objBSC.GetAllList(objBSC.Iestterm_ref_id, objBSC.Istg_code, objBSC.Istg_name, objBSC.Iuse_yn);
        DataSet rDs = objBSC.GetUsedStgCount(objBSC.IEstterm_Ref_Id, objBSC.IVersion_Ref_Id);

        ugrdStgList.Clear();

        if (rDs.Tables.Count > 0)
        {
            ugrdStgList.DataSource = rDs;
            ugrdStgList.DataBind();
        }
    }
Exemple #24
0
    /// <summary>
    /// 지표상세정보 조회
    /// </summary>
    public void setKpiData()
    {
        if (ddlEstTermInfo.Items.Count < 1)
        {
            PageUtility.AlertMessage("등록된 평가기간이 없습니다.");
            return;
        }

        Biz_Bsc_Interface_Kpi_Query objBSC = new Biz_Bsc_Interface_Kpi_Query();
        DataSet rDs = objBSC.GetQueryMappingStatus
                          (PageUtility.GetIntByValueDropDownList(ddlEstTermInfo)
                          , this.IDiCode
                          , txtKPICode.Text
                          , txtKPIName.Text
                          , txtChamName.Text
                          , ""
                          , "Y"
                          , PageUtility.GetByValueDropDownList(ddlIS_SET_QUERY));

        ugrdKpiList.Clear();
        ugrdKpiList.DataSource = rDs;
        ugrdKpiList.DataBind();
    }
Exemple #25
0
    private void SearchDB()
    {
        // dialogArguments가 있는지 체크한다.
        mArgs = hArgArray.Value.ToString().Split(';');

        if (mArgs.Length >= 1)
        {
            // 엑셀파일 저장인지 확인한다.
            if (mArgs[GetArgsInfo(EN_ARGS_INFO.TBLINFO)] == "EXCEL")
            {
                return;
            }
        }

        if (mArgs.Length < 3)
        {
            PageUtility.AlertMessage("파일첨부에 대한 정보를 알 수 없습니다!", false, true);
            return;
        }

        hSaveAttachNo.Value = mArgs[GetArgsInfo(EN_ARGS_INFO.ATTACHNO)];

        Biz_Base_FileUpload bizCom = new Biz_Base_FileUpload();
        DataSet             lDS    = bizCom.GetFileUploaded(mArgs[GetArgsInfo(EN_ARGS_INFO.ATTACHNO)]);

        DataTable lDT = lDS.Tables[0];

        this.ITotalSize = 0;
        lbFileList.Items.Clear();
        for (int i = 0; i < lDT.Rows.Count; i++)
        {
            lbFileList.Items.Add(new ListItem(lDT.Rows[i]["v_FileText"].ToString(), lDT.Rows[i]["v_FileValue"].ToString()));
            this.ITotalSize += Convert.ToInt32(lDT.Rows[i]["P_FILESIZE"].ToString()) / 1000;
        }

        lblEnableAttKbyte.Text = this.GetRemainFileSize();
    }
Exemple #26
0
    protected void btnDownFile_Click(object sender, EventArgs e)
    {
        string sText  = "";
        string sValue = "";

        if (lbFileList.Items.Count <= 0)
        {
            PageUtility.AlertMessage("첨부된 파일이 없습니다!");
            return;
        }

        if (lbFileList.SelectedIndex >= 0)
        {
            sText  = lbFileList.SelectedItem.Text;
            sValue = lbFileList.SelectedItem.Value;

            PageUtility.FileDownLoad(sText.Substring(0, sText.LastIndexOf(" (")), sValue);
        }
        else
        {
            PageUtility.AlertMessage("다운로드 할 파일을 선택하십시요!");
            return;
        }
    }
Exemple #27
0
    private void AddThresholdStep(Infragistics.WebUI.UltraWebGrid.UltraWebGrid uGrid)
    {
        string[,] saPKID;

        saPKID = GetSelectedThresholdCode_ID(uGrid);

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

        if (ddlLevel.SelectedValue.Equals(""))
        {
            PageUtility.AlertMessage("추가할 평가단계를 선택하셔야 합니다.");
            return;
        }

        string  thresholdlevel = ddlLevel.SelectedValue;
        decimal point          = 0;
        int     emp_ref_id     = gUserInfo.Emp_Ref_ID;

        Biz_Bsc_Threshold_Step biz = new Biz_Bsc_Threshold_Step();
        int iRet = biz.InsertThresholdStep(saPKID, thresholdlevel, point, "N", emp_ref_id);

        //string sScript = "";

        //sScript += string.Format(
        //                        "[{0}]건이 추가되었습니다!"
        //                       , iRet
        //                        );

        //PageUtility.AlertMessage(sScript);

        SearchBind();
    }
Exemple #28
0
    protected void SetStgGrid()
    {
        if (TypeUtility.GetNumString(PageUtility.GetByValueDropDownList(ddlEstTermInfo)) == "")
        {
            PageUtility.AlertMessage("평가기간을 알 수 없습니다!");
            return;
        }

        MicroBSC.BSC.Biz.Biz_Bsc_Stg_Info objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Stg_Info();
        objBSC.Iestterm_ref_id = Convert.ToInt32(PageUtility.GetByValueDropDownList(ddlEstTermInfo));
        objBSC.Istg_code       = txtKPICode.Text;
        objBSC.Istg_name       = txtKPIName.Text;
        objBSC.Iuse_yn         = PageUtility.GetByValueDropDownList(ddlUseYn);

        DataSet rDs = objBSC.GetAllList(objBSC.Iestterm_ref_id, objBSC.Istg_code, objBSC.Istg_name, objBSC.Iuse_yn);

        ugrdStgList.Clear();

        if (rDs.Tables.Count > 0)
        {
            ugrdStgList.DataSource = rDs;
            ugrdStgList.DataBind();
        }
    }
Exemple #29
0
    private void SetAdd()
    {
        lblStatus.Text = "";

        // dialogArguments가 있는지 체크한다.
        mArgs = hArgArray.Value.ToString().Split(';');

        if (mArgs.Length < 3)
        {
            PageUtility.AlertMessage("파일첨부에 대한 정보를 알 수 없습니다!", false, true);
            return;
        }

        // AttachNo 추출여부 확인
        if (hSaveAttachNo.Value == "")
        {
            Biz_Base_FileUpload bizCom = new Biz_Base_FileUpload();
            hSaveAttachNo.Value = bizCom.GetAttachNo(mArgs[GetArgsInfo(EN_ARGS_INFO.SAVEINFO)] + "_F");
        }

        //string dir = Server.MapPath(CS_MAPPATH);
        string dir    = CS_MAPPATH + mArgs[GetArgsInfo(EN_ARGS_INFO.SAVEINFO)] + "/" + DateTime.Now.ToString("yyyyMMdd") + "/";
        string status = "";

        string lsAddFileInfo = "";      // 테이블에 저장될 파일정보
        string lsAddName     = "";      //중복되면 시간을 붙여 파일명으로 만든다.
        string lsFileName    = System.IO.Path.GetFileName(FindFile.PostedFile.FileName);

        string sText  = "";
        string sValue = "";

        string sTmpText = "";

        if (Page.IsPostBack == true)
        {
            if (lsFileName == "")
            {
                return;
            }

            for (int i = 0; i < lbFileList.Items.Count; i++)
            {
                sTmpText = lbFileList.Items[i].Text;
                if (sTmpText.Substring(0, sTmpText.LastIndexOf(" (")) == lsFileName)
                {
                    PageUtility.AlertMessage("이미 추가되어 있습니다!");

                    if (lbFileList.SelectedIndex >= 0)
                    {
                        lbFileList.Items[lbFileList.SelectedIndex].Selected = false;
                    }

                    lbFileList.Items[i].Selected = true;

                    return;
                }
            }


            try
            {
                if (!Directory.Exists(dir))
                {
                    Directory.CreateDirectory(dir);
                }

                while (true)
                {
                    if (File.Exists(dir + lsAddName + lsFileName))
                    {
                        lsAddName = DateTime.Now.ToString("HHmmss") + "_";
                    }
                    else
                    {
                        break;
                    }
                }

                FindFile.PostedFile.SaveAs(dir + lsAddName + lsFileName);
                miFilesProcessed++;
                status += "&nbsp;&nbsp;- " + lsFileName + "<br>";

                sValue = dir + lsAddName + lsFileName;
                sText  = System.IO.Path.GetFileName(FindFile.PostedFile.FileName) + " (" + TypeUtility.GetByte2Str(FindFile.PostedFile.InputStream.Length) + ")";

                lbFileList.Items.Add(new ListItem(sText, sValue));
                lblStatus.Text = "These " + miFilesProcessed + " file(s) were uploaded:<br>" + status;

                hSaveFiles.Value += sText + ";" + sValue;

                /*
                 * AttachNo, v_FileName, v_FileSize, p_FileSize, p_FullPath
                 * */
                lsAddFileInfo = hSaveAttachNo.Value + ";"
                                + System.IO.Path.GetFileName(FindFile.PostedFile.FileName) + ";"
                                + TypeUtility.GetByte2Str(FindFile.PostedFile.InputStream.Length) + ";"
                                + FindFile.PostedFile.InputStream.Length.ToString() + ";"
                                + (dir + lsAddName + lsFileName);

                // 파일저장 테이블에 인서트
                int iProcess = 0;
                Biz_Base_FileUpload bizUpload = new Biz_Base_FileUpload();

                switch (mArgs[GetArgsInfo(EN_ARGS_INFO.TBLINFO)])
                {
                case "FILE":
                    iProcess = bizUpload.AddFileInfo(TypeUtility.GetSplit(lsAddFileInfo));
                    break;

                case "PROCFILE":
                    // 추후에 ICM_PROCFILE에 업데이트 하는 모듈 개발해야 한다. (2006.02.25 강신규)
                    iProcess = bizUpload.AddFileInfo(TypeUtility.GetSplit(lsAddFileInfo));
                    break;
                }
            }
            catch (Exception err)
            {
                // 파일처리가 되었다면 삭제한다.
                DeleteFile(true);

                lblStatus.Text = "Error saving file " + dir + "<br>" + err.ToString();
            }
        }
        else
        {
        }
    }
Exemple #30
0
    private void SetAdd2()
    {
        lblStatus.Text = "";

        string dir    = "";
        string status = "";

        string lsAddFileInfo = "";      // 테이블에 저장될 파일정보
        string lsAddName     = "";      //중복되면 시간을 붙여 파일명으로 만든다.
        string lsFileName    = System.IO.Path.GetFileName(FindFile.PostedFile.FileName);

        string sText  = "";
        string sValue = "";

        string sTmpText = "";

        // dialogArguments가 있는지 체크한다.
        mArgs = hArgArray.Value.ToString().Split(';');

        if (Page.IsPostBack == true)
        {
            if (lsFileName == "")
            {
                return;
            }

            if (mArgs[GetArgsInfo(EN_ARGS_INFO.TBLINFO)] == "EXCEL")
            {
                // 엑셀파일일 경우는 파일 하나만 추가하도록 조정한다.
                dir = CS_EXCELPATH + DateTime.Now.ToString("yyyyMMdd") + "/";

                if (lsFileName.Substring(lsFileName.LastIndexOf(".") + 1).ToUpper() != "XLS" ||
                    lsFileName.Substring(lsFileName.LastIndexOf(".") + 1).ToUpper() != "XLSX")
                {
                    PageUtility.AlertMessage("엑셀파일만 업로드할 수 있습니다!");
                    return;
                }

                if (lbFileList.Items.Count > 0)
                {
                    PageUtility.AlertMessage("엑셀파일이 이미 추가되어 있습니다.");
                    return;
                }
            }
            else
            {
                // 일반파일일 경우
                dir = CS_MAPPATH + mArgs[GetArgsInfo(EN_ARGS_INFO.SAVEINFO)] + "/" + DateTime.Now.ToString("yyyyMMdd") + "/";

                if (mArgs.Length < 3)
                {
                    PageUtility.AlertMessage("파일첨부에 대한 정보를 알 수 없습니다!", false, true);
                    return;
                }

                // AttachNo 추출여부 확인
                if (hSaveAttachNo.Value == "")
                {
                    //Biz_Base_FileUpload biz = new Biz_Base_FileUpload();
                    //hSaveAttachNo.Value = biz.GetAttachNo(mArgs[GetArgsInfo(EN_ARGS_INFO.SAVEINFO)] + "_F");

                    hSaveAttachNo.Value = mArgs[GetArgsInfo(EN_ARGS_INFO.SAVEINFO)] + "_F" + DateTime.Now.ToString("yyyyMMddHHmmss");
                }

                for (int i = 0; i < lbFileList.Items.Count; i++)
                {
                    sTmpText = lbFileList.Items[i].Text;
                    if (sTmpText.Substring(0, sTmpText.LastIndexOf(" (")) == lsFileName)
                    {
                        PageUtility.AlertMessage("이미 추가되어 있습니다!");

                        if (lbFileList.SelectedIndex >= 0)
                        {
                            lbFileList.Items[lbFileList.SelectedIndex].Selected = false;
                        }

                        lbFileList.Items[i].Selected = true;

                        return;
                    }
                }
            }

            int iPostedFileSize = (FindFile.PostedFile.ContentLength / 1000);
            try
            {
                if (!Directory.Exists(dir))
                {
                    Directory.CreateDirectory(dir);
                }

                while (true)
                {
                    if (File.Exists(dir + lsAddName + lsFileName))
                    {
                        lsAddName = DateTime.Now.ToString("HHmmss") + "_";
                    }
                    else
                    {
                        break;
                    }
                }

                if ((this.ITotalSize + iPostedFileSize) > this.IFileLimitSize)
                {
                    PageUtility.AlertMessage("파일용량을 초과하였습니다.");
                    return;
                }

                FindFile.PostedFile.SaveAs(dir + lsAddName + lsFileName);
                miFilesProcessed++;
                status += "&nbsp;&nbsp;- " + lsFileName + "<br>";

                sValue = dir + lsAddName + lsFileName;
                sText  = System.IO.Path.GetFileName(FindFile.PostedFile.FileName) + " (" + TypeUtility.GetByte2Str(FindFile.PostedFile.InputStream.Length) + ")";

                lbFileList.Items.Add(new ListItem(sText, sValue));
                lblStatus.Text = "These " + miFilesProcessed + " file(s) were uploaded:<br>" + status;

                hSaveFiles.Value += sText + ";" + sValue;

                /*
                 * AttachNo, v_FileName, v_FileSize, p_FileSize, p_FullPath
                 * */
                lsAddFileInfo = hSaveAttachNo.Value + ";"
                                + System.IO.Path.GetFileName(FindFile.PostedFile.FileName) + ";"
                                + TypeUtility.GetByte2Str(FindFile.PostedFile.InputStream.Length) + ";"
                                + FindFile.PostedFile.InputStream.Length.ToString() + ";"
                                + (dir + lsAddName + lsFileName);

                // 파일저장 테이블에 인서트
                int iProcess = 0;
                Biz_Base_FileUpload bizUpload = new Biz_Base_FileUpload();

                switch (mArgs[GetArgsInfo(EN_ARGS_INFO.TBLINFO)])
                {
                case "EXCEL":
                    // 저장이 엑셀업로드용 이라면 실제 디렉토리정보를 리턴한다.
                    hSaveAttachNo.Value = (dir + lsAddName + lsFileName);
                    break;

                case "FILE":
                    iProcess = bizUpload.AddFileInfo(TypeUtility.GetSplit(lsAddFileInfo));
                    break;

                case "PROCFILE":
                    // 추후에 ICM_PROCFILE에 업데이트 하는 모듈 개발해야 한다. (2006.02.25 강신규)
                    iProcess = bizUpload.AddFileInfo(TypeUtility.GetSplit(lsAddFileInfo));
                    break;
                }

                // 파일 저장정보 변경시 changeflag 셋팅
                if (this.hChangeFlag.Value != "T")
                {
                    this.hChangeFlag.Value = "T";
                }

                this.ITotalSize       += iPostedFileSize;
                lblEnableAttKbyte.Text = this.GetRemainFileSize();
            }
            catch (Exception err)
            {
                // 파일처리가 되었다면 삭제한다.
                DeleteFile(true);

                lblStatus.Text = "Error saving file " + dir + "<br>" + err.ToString();
            }
        }
        else
        {
        }
    }