예제 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ltrScript.Text = "";
        SetQueryStringData();

        if (EST_DEPT_REF_ID == 0)
        {
            Biz_EstDeptOrgDetails estDeptOrgDetail = new Biz_EstDeptOrgDetails();
            EST_DEPT_REF_ID = estDeptOrgDetail.GetEstDeptRefID(ESTTERM_REF_ID, EMP_REF_ID);
            if (EST_DEPT_REF_ID < 1)
            {
                this.Page.ClientScript.RegisterClientScriptBlock(typeof(string), "noAccess", JSHelper.GetAlertBackScript("권한이 없습니다."));
            }
        }

        if (!IsPostBack)
        {
            WebCommon.FillEstTree(trvEstDept, ESTTERM_REF_ID, EMP_REF_ID);
            txtDeptID.Text = EST_DEPT_REF_ID.ToString();

            WebCommon.SetExternalScoreCheckBox(chkApplyExtScore, ESTTERM_REF_ID);
            chkApplyExtScore.Checked = this.IExtKpiYN;

            ViewKPI = true;

            SetCtrlSetting(ESTTERM_REF_ID
                           , int.Parse(txtDeptID.Text));
        }
    }
예제 #2
0
    protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
    {
        Biz_EstDeptOrgMaps estDeptOrgMap = new Biz_EstDeptOrgMaps(Convert.ToInt32(TreeView1.SelectedNode.Value));

        txtDeptName_Org.Text = estDeptOrgMap.Dept_Name_Org;
        txtSort_Org.Text     = estDeptOrgMap.Sort_Org.ToString();

        PageUtility.FindByValueDropDownList(ddlHearderType, estDeptOrgMap.Header_Img_Org.ToString());
        PageUtility.FindByValueDropDownList(ddlDeptType, estDeptOrgMap.Dept_Type.ToString());

        SetVisibleButton();
        GridBinding();
        CheckDrillDownYN(PageUtility.GetIntByValueDropDownList(ddlEstTermInfo));

        Biz_EstDeptOrgDetails estDeptOrgDetail = new Biz_EstDeptOrgDetails();

        cBoxEstDeptTopYN.Checked = estDeptOrgDetail.IsEstDeptTopYN(PageUtility.GetIntByValueDropDownList(ddlEstTermInfo), Convert.ToInt32(TreeView1.SelectedNode.Value));

        if (iBtnSave_1.Visible == false)
        {
            iBtnSave_1.Visible = true;
            //iBtnSave_2.Visible = true;
            //itnClearEstDeptOrg.Visible = true;
        }
    }
예제 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int i = DateTime.Now.Second;

        //if (i > 0 && i <= 20)
        //    ImageType = "1";
        //else if (i > 20 && i <= 40)
        //    ImageType = "2";
        //else
        //    ImageType = "3";

        ImageType = "19";

        Biz_EstDeptOrgDetails estDeptOrgDetail = new Biz_EstDeptOrgDetails();
        Biz_EstDeptOrgMaps    estDeptOrgMap    = null;

        int ESTTERM_REF_ID  = GetRequestByInt("ESTTERM_REF_ID");
        int MONTH           = GetRequestByInt("TMCODE");
        int EST_DEPT_REF_ID = GetRequestByInt("EST_DEPT_REF_ID");;

        if (Request["DRILLDOWN_YN"] == null)
        {
            EST_DEPT_REF_ID = estDeptOrgDetail.GetEstDeptRefID(ESTTERM_REF_ID);

            estDeptOrgMap                 = new Biz_EstDeptOrgMaps(ESTTERM_REF_ID, MONTH);
            estDeptOrgMap.Emp_Ref_ID      = EMP_REF_ID;
            estDeptOrgMap.Is_Embed        = true;
            estDeptOrgMap.Est_Dept_Ref_ID = EST_DEPT_REF_ID;
            //estDeptOrgMap.Est_Dept_Ref_ID       = GetRequestByInt("EST_DEPT_REF_ID", EST_DEPT_REF_ID);
            ltrScript.Text = estDeptOrgMap.GetHtml();
        }
        else if (GetRequest("DRILLDOWN_YN").Equals("X"))
        {
            ltrScript.Text = string.Format("<script language=javascript> parent.location.href='../BSC/BSC0406S1.aspx?ESTTERM_REF_ID={0}&EST_DEPT_REF_ID={1}&YMD={2}'; </script>", ESTTERM_REF_ID, EST_DEPT_REF_ID, MONTH);
        }
        else if (GetRequest("DRILLDOWN_YN").Equals("N"))
        {
            //Literal1.Text = string.Format("<script language=javascript> parent.location.href='usr10001.aspx?ESTTERM_REF_ID={0}&EST_DEPT_REF_ID={1}&TMCODE={2}'; </script>", ESTTERM_REF_ID, EST_DEPT_REF_ID, MONTH);
            ltrScript.Text = string.Format("<script language=javascript> parent.location.href='usr10001.aspx?ESTTERM_REF_ID={0}&EST_DEPT_REF_ID={1}&TMCODE={2}'; </script>", ESTTERM_REF_ID, EST_DEPT_REF_ID, MONTH);

            //usr_ana_view.aspx
        }
        else
        {
            if (estDeptOrgDetail.IsDrillDownPosible(ESTTERM_REF_ID, EST_DEPT_REF_ID))
            {
                estDeptOrgMap                 = new Biz_EstDeptOrgMaps(ESTTERM_REF_ID, MONTH);
                estDeptOrgMap.Emp_Ref_ID      = EMP_REF_ID;
                estDeptOrgMap.Is_Embed        = true;
                estDeptOrgMap.Est_Dept_Ref_ID = EST_DEPT_REF_ID;
                ltrScript.Text                = estDeptOrgMap.GetHtml();
            }
            else
            {
                //Literal1.Text = string.Format("<script language=javascript> parent.location.href='usr10001.aspx?ESTTERM_REF_ID={0}&EST_DEPT_REF_ID={1}&TMCODE={2}'; </script>", ESTTERM_REF_ID, EST_DEPT_REF_ID, MONTH);
                ltrScript.Text = string.Format("<script language=javascript> parent.location.href='usr10001_embed.aspx?ESTTERM_REF_ID={0}&EST_DEPT_REF_ID={1}&TMCODE={2}'; </script>", ESTTERM_REF_ID, EST_DEPT_REF_ID, MONTH);
            }
        }
    }
예제 #4
0
    protected void itnClearDeptDrill_Click(object sender, ImageClickEventArgs e)
    {
        Biz_EstDeptOrgDetails estDeptOrgDetail = new Biz_EstDeptOrgDetails();

        estDeptOrgDetail.RemoveEstDeptOrgDetail(null, null, PageUtility.GetIntByValueDropDownList(ddlEstTermInfo), int.Parse(TreeView1.SelectedValue), 0);

        iBtnSearch_Click(null, null);
        BindingOrgType(PageUtility.GetIntByValueDropDownList(ddlEstTermInfo));

        iBtnSave_1.Visible = false;
    }
예제 #5
0
    protected void itnClearEstDeptOrg_Click(object sender, ImageClickEventArgs e)
    {
        Biz_EstDeptOrgDetails estDeptOrgDetail = new Biz_EstDeptOrgDetails();

        estDeptOrgDetail.RemoveEstDeptOrgDetail(null, null, PageUtility.GetIntByValueDropDownList(ddlEstTermInfo), 0, 0);

        iBtnSearch_Click(null, null);
        BindingOrgType(PageUtility.GetIntByValueDropDownList(ddlEstTermInfo));

        iBtnSave_1.Visible = false;
        //iBtnSave_2.Visible = false;
        //itnClearEstDeptOrg.Visible = false;
    }
예제 #6
0
    private void CheckDrillDownYN(int estterm_ref_id)
    {
        Biz_EstDeptOrgDetails estDeptOrgDetail = new Biz_EstDeptOrgDetails();
        bool isDrilldown = estDeptOrgDetail.IsDrillDown(estterm_ref_id);

        rtlDrildownYN.ClearSelection();

        if (isDrilldown)
        {
            rtlDrildownYN.SelectedIndex = 0;
        }
        else
        {
            rtlDrildownYN.SelectedIndex = 1;
        }
    }
예제 #7
0
    private void GridBinding()
    {
        Biz_EstDeptOrgDetails estDeptOrgDetail = new Biz_EstDeptOrgDetails();
        Biz_DeptTypeInfo      deptTypeInfo     = new Biz_DeptTypeInfo();

        if (rtlDrildownYN.SelectedIndex == 1)
        {
            if (TreeView1.Nodes.Count > 0)
            {
                UltraWebGrid1.Clear();
                UltraWebGrid1.DataSource = estDeptOrgDetail.GetEstDeptOrgDetail(PageUtility.GetIntByValueDropDownList(ddlEstTermInfo), Convert.ToInt32(TreeView1.Nodes[0].Value));
                UltraWebGrid1.DataBind();
            }
            else
            {
                UltraWebGrid1.DataSource = deptTypeInfo.GetDeptTypeList();
                UltraWebGrid1.DataBind();
            }
        }
        else
        {
            if (TreeView1.Nodes.Count > 0)
            {
                if (TreeView1.SelectedNode != null)
                {
                    UltraWebGrid1.Clear();
                    DataSet ds = estDeptOrgDetail.GetEstDeptOrgDetail(PageUtility.GetIntByValueDropDownList(ddlEstTermInfo), Convert.ToInt32(TreeView1.SelectedNode.Value));
                    UltraWebGrid1.DataSource = ds;
                    UltraWebGrid1.DataBind();
                }
                else
                {
                    UltraWebGrid1.DataSource = deptTypeInfo.GetDeptTypeList();
                    UltraWebGrid1.DataBind();
                }
            }
            else
            {
                UltraWebGrid1.DataSource = deptTypeInfo.GetDeptTypeList();
                UltraWebGrid1.DataBind();
            }
        }
    }
예제 #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string master_site = WebUtility.GetConfig("SITE", "") + "/";

        ImageType = WebUtility.GetConfig("DEPT_ORG_IMAGE", "1");
        string back_img = string.Format("background-image:url(../images/{0}org/back_org_{1}.jpg); background-position:top; background-repeat:repeat-x", master_site, ImageType);

        //legend 위치 - 루트노드에서 우측으로 위치
        legend_offsetLeft = WebUtility.GetRequestByInt("LEGEND_OFFSETLEFT", 150);
        legend_offsetTop  = WebUtility.GetRequestByInt("LEGEND_OFFSETTOP", 15);
        legend_colCnt     = WebUtility.GetRequestByInt("LEGEND_COLCNT", 1);

        tblMain.Attributes.Add("style", back_img);
        // 조직상황판 백그라운드 이미지 타입 (1부터 시작)


        Biz_EstDeptOrgDetails estDeptOrgDetail = new Biz_EstDeptOrgDetails();
        Biz_EstDeptOrgMaps    estDeptOrgMap    = null;

        int    ESTTERM_REF_ID  = GetRequestByInt("ESTTERM_REF_ID");
        int    MONTH           = GetRequestByInt("TMCODE");
        int    EST_DEPT_REF_ID = GetRequestByInt("EST_DEPT_REF_ID");
        string EXT_KPI_YN      = GetRequest("EXT_KPI_YN", "N");

        DEPT_ORG_SCORE_USE_YN = WebUtility.GetConfig("DEPT_ORG_SCORE_USE_YN", "Y");
        WORKING_MAP_USE_YN    = WebUtility.GetConfig("WORKING_MAP_USE_YN", "N");

        WebUtility.GetConfig("", "");
        string lineColor = "#cccccc";
        string lineWidth = "2";

        if (Request["DRILLDOWN_YN"] == null)
        {
            EST_DEPT_REF_ID = estDeptOrgDetail.GetEstDeptRefID(ESTTERM_REF_ID);

            bool Include_Ext_Kpi_Score = (EXT_KPI_YN == "Y") ? true : false;


            if (legend_colCnt > 0)
            {
                estDeptOrgMap = new Biz_EstDeptOrgMaps(ESTTERM_REF_ID, MONTH, Include_Ext_Kpi_Score, lineColor, lineWidth, legend_colCnt);
            }
            else
            {
                estDeptOrgMap = new Biz_EstDeptOrgMaps(ESTTERM_REF_ID, MONTH, Include_Ext_Kpi_Score, lineColor, lineWidth);
            }


            estDeptOrgMap.Emp_Ref_ID         = EMP_REF_ID;
            estDeptOrgMap.Est_Dept_Ref_ID    = GetRequestByInt("EST_DEPT_REF_ID", EST_DEPT_REF_ID);
            estDeptOrgMap.DeptTitleWidth     = 152;
            estDeptOrgMap.DeptTitleHeight    = 39;
            estDeptOrgMap.SignalPaddingRight = 3;


            ltrScript.Text = estDeptOrgMap.GetHtml();
        }
        else if (GetRequest("DRILLDOWN_YN").Equals("X"))
        {
            ltrScript.Text = string.Format("<script language=javascript> parent.location.href='/BSC/BSC0404S1.aspx?ESTTERM_REF_ID={0}&EST_DEPT_REF_ID={1}&YMD={2}&SUM_TYPE=MS&EXT_KPI_YN={3}'; </script>", ESTTERM_REF_ID, EST_DEPT_REF_ID, MONTH, EXT_KPI_YN);
        }
        else if (GetRequest("DRILLDOWN_YN").Equals("N"))
        {
            ///ltrScript.Text = string.Format("<script language=javascript> parent.location.href='usr_ana_view.aspx?ESTTERM_REF_ID={0}&EST_DEPT_REF_ID={1}&TMCODE={2}'; </script>", ESTTERM_REF_ID, EST_DEPT_REF_ID, MONTH);
            ltrScript.Text = string.Format("<script language=javascript> parent.location.href='usr10001.aspx?ESTTERM_REF_ID={0}&EST_DEPT_REF_ID={1}&YMD={2}&EXT_KPI_YN={3}'; </script>", ESTTERM_REF_ID, EST_DEPT_REF_ID, MONTH, EXT_KPI_YN);
        }
        else if (GetRequest("DRILLDOWN_YN").Equals("S"))
        {
            ltrScript.Text = string.Format("<script language=javascript> parent.location.href='/BSC/BSC0403S4.aspx?ITYPE=POP&ESTTERM_REF_ID={0}&EST_DEPT_REF_ID={1}&YMD={2}&SUM_TYPE=MS&EXT_KPI_YN={3}'; </script>", ESTTERM_REF_ID, EST_DEPT_REF_ID, MONTH, EXT_KPI_YN);
        }
        else if (GetRequest("DRILLDOWN_YN").Equals("W"))
        {
            ltrScript.Text = string.Format("<script language=javascript> parent.location.href='usr10002.aspx?ESTTERM_REF_ID={0}&EST_DEPT_REF_ID={1}&EXT_KPI_YN={2}'; </script>", ESTTERM_REF_ID, EST_DEPT_REF_ID, EXT_KPI_YN);
        }
        else
        {
            if (estDeptOrgDetail.IsDrillDownPosible(ESTTERM_REF_ID, EST_DEPT_REF_ID))
            {
                estDeptOrgMap                 = new Biz_EstDeptOrgMaps(ESTTERM_REF_ID, MONTH);
                estDeptOrgMap.Emp_Ref_ID      = EMP_REF_ID;
                estDeptOrgMap.Est_Dept_Ref_ID = EST_DEPT_REF_ID;
                ltrScript.Text                = estDeptOrgMap.GetHtml();
            }
            else
            {
                //ltrScript.Text = string.Format("<script language=javascript> parent.location.href='usr_ana_view.aspx?ESTTERM_REF_ID={0}&EST_DEPT_REF_ID={1}&TMCODE={2}'; </script>", ESTTERM_REF_ID, EST_DEPT_REF_ID, MONTH);
                ltrScript.Text = string.Format("<script language=javascript> parent.location.href='usr10001.aspx?ESTTERM_REF_ID={0}&EST_DEPT_REF_ID={1}&YMD={2}&EXT_KPI_YN={3}'; </script>", ESTTERM_REF_ID, EST_DEPT_REF_ID, MONTH, EXT_KPI_YN);
            }
        }
    }
예제 #9
0
    protected void iBtnSave_2_Click(object sender, ImageClickEventArgs e)
    {
        UltraGridRow    row;
        CheckBox        cBoxHome_YN_Org;
        CheckBox        cBoxHeader_YN_Org;
        CheckBox        cBoxContent_YN_Org;
        DropDownList    ddlPosition_Org;
        TemplatedColumn home_yn_col;
        TemplatedColumn header_yn_col;
        TemplatedColumn content_yn_col;
        TemplatedColumn position_col;
        int             est_dept_ref_id = 0;
        string          ynStr           = "N";

        Biz_DeptTypeInfo      deptTypeInfo     = new Biz_DeptTypeInfo();
        Biz_EstDeptOrgDetails estDeptOrgDetail = new Biz_EstDeptOrgDetails();

        IDbConnection conn = DbAgentHelper.CreateDbConnection();

        conn.Open();
        IDbTransaction trx = conn.BeginTransaction();

        try
        {
            // 드릴다운 사용 안할 때
            if (rtlDrildownYN.SelectedValue.Equals("0"))
            {
                if (TreeView1.Nodes.Count > 0)
                {
                    est_dept_ref_id = int.Parse(TreeView1.Nodes[0].Value);
                }
                else
                {
                    ltrScript.Text = JSHelper.GetAlertScript("조직정보가 없습니다.", false);
                    return;
                }

                ynStr = "Y";
                estDeptOrgDetail.RemoveEstDeptOrgDetail(conn, trx, PageUtility.GetIntByValueDropDownList(ddlEstTermInfo), 0, 0);
            }
            else // 드릴다운 사용
            {
                if (TreeView1.SelectedNode != null)
                {
                    est_dept_ref_id = int.Parse(TreeView1.SelectedValue);
                    estDeptOrgDetail.ModifyEstDeptOrgDetail(conn, trx, PageUtility.GetIntByValueDropDownList(ddlEstTermInfo), "N");
                    estDeptOrgDetail.RemoveEstDeptOrgDetail(conn, trx, PageUtility.GetIntByValueDropDownList(ddlEstTermInfo), est_dept_ref_id, 0);
                }
                else
                {
                    ltrScript.Text = JSHelper.GetAlertScript("드릴다운 방식으로 하실 때에는 조직 부서를 선택하셔야 합니다.", false);
                    return;
                }

                ynStr = TypeUtility.GetBooleanToYN(cBoxEstDeptTopYN.Checked);
            }

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

                home_yn_col    = (TemplatedColumn)row.Band.Columns.FromKey("HOME_YN_ORG");
                header_yn_col  = (TemplatedColumn)row.Band.Columns.FromKey("HEADER_YN_ORG");
                content_yn_col = (TemplatedColumn)row.Band.Columns.FromKey("CONTENT_YN_ORG");
                position_col   = (TemplatedColumn)row.Band.Columns.FromKey("POSITION_ORG");

                cBoxHome_YN_Org    = (CheckBox)((CellItem)home_yn_col.CellItems[row.BandIndex]).FindControl("cBoxHome_YN_Org");
                cBoxHeader_YN_Org  = (CheckBox)((CellItem)header_yn_col.CellItems[row.BandIndex]).FindControl("cBoxHeader_YN_Org");
                cBoxContent_YN_Org = (CheckBox)((CellItem)content_yn_col.CellItems[row.BandIndex]).FindControl("cBoxContent_YN_Org");
                ddlPosition_Org    = (DropDownList)((CellItem)position_col.CellItems[row.BandIndex]).FindControl("ddlPosition_Org");

                estDeptOrgDetail.AddEstDeptOrgDetail(conn
                                                     , trx
                                                     , PageUtility.GetIntByValueDropDownList(ddlEstTermInfo)
                                                     , est_dept_ref_id
                                                     , int.Parse(row.Cells.FromKey("TYPE_REF_ID").Value.ToString())
                                                     , TypeUtility.GetBooleanToYN(cBoxHome_YN_Org.Checked)
                                                     , TypeUtility.GetBooleanToYN(cBoxHeader_YN_Org.Checked)
                                                     , TypeUtility.GetBooleanToYN(cBoxContent_YN_Org.Checked)
                                                     , ynStr
                                                     , int.Parse(ddlPosition_Org.SelectedValue)
                                                     , gUserInfo.Emp_Ref_ID);

                if (cBoxHome_YN_Org.Checked ||
                    cBoxHeader_YN_Org.Checked)
                {
                    ddlPosition_Org.Enabled = true;
                }
                else
                {
                    ddlPosition_Org.Enabled = false;
                }
            }

            trx.Commit();

            ltrScript.Text = JSHelper.GetAlertScript("정상적으로 저장되었습니다.", false);
        }
        catch (Exception ex)
        {
            trx.Rollback();
            conn.Close();
        }
        finally
        {
            conn.Close();
        }
    }