Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //SetPageLayout(phdLayout, "MenuControl_NotLeftMenu.ascx");

        ddlEstTermInfo = MenuControl1.DdlEstTermInfo;
        ddlMonthInfo   = MenuControl1.DdlEstMonth;
        lblDeptPath    = MenuControl1.LblDeptPath;

        ddlEstTermInfo.SelectedIndexChanged += new EventHandler(ddlEstTermInfo_SelectedIndexChanged);
        ddlMonthInfo.SelectedIndexChanged   += new EventHandler(ddlMonthInfo_SelectedIndexChanged);

        if (!Page.IsPostBack)
        {
            //if (!PageUtility.IsContainSystemAdminUser(EMP_REF_ID))
            //{
            UltraWebTab1.Tabs.FromKeyTab("GROUP_VIEW").Visible = false;
            //}

            WebCommon.SetEstTermDropDownList(ddlEstTermInfo);
            //WebCommon.SetMonthDropDownList(ddlMonthInfo);
            WebCommon.SetTermMonthDropDownList(ddlMonthInfo, PageUtility.GetIntByValueDropDownList(ddlEstTermInfo));
            WebCommon.FillEstTree(trvEstDept, PageUtility.GetIntByValueDropDownList(ddlEstTermInfo), EMP_REF_ID);

            //StrategyMapInfos stgMapInfo = new StrategyMapInfos();

            if (Request["ESTTERM_REF_ID"] != null)
            {
                PageUtility.FindByValueDropDownList(ddlEstTermInfo, GetRequest("ESTTERM_REF_ID"));
                //UltraWebTab1.SelectedTabIndex = 2;
            }

            if (Request["TMCODE"] != null)
            {
                PageUtility.FindByValueDropDownList(ddlMonthInfo, GetRequest("TMCODE"));
            }
            else
            {
                MicroBSC.BSC.Biz.Biz_Bsc_Term_Detail objTerm = new MicroBSC.BSC.Biz.Biz_Bsc_Term_Detail();
                PageUtility.FindByValueDropDownList(ddlMonthInfo, objTerm.GetReleasedMonth());
            }

            if (Request["EST_DEPT_REF_ID"] != null)
            {
                PageUtility.SelectTreeNode(trvEstDept, GetRequest("EST_DEPT_REF_ID"));
            }
            else
            {
                //if (trvEstDept.Nodes.Count > 0)
                //    trvEstDept.Nodes[0].Select();

                int return_est_dept_ref_id = PageUtility.SetTopEstDeptRefID(trvEstDept);
                PageUtility.SelectTreeNode(trvEstDept, return_est_dept_ref_id.ToString());
            }

            ChageTabPage();

            ddlEstTermInfo.AutoPostBack = true;
            ddlMonthInfo.AutoPostBack   = true;
        }

        lblDeptPath.Text = WebCommon.GetDeptTreePathText(trvEstDept);
        ltrScript.Text   = "";

        this.UltraWebTab1.Tabs.FromKeyTab("CEO_COM").Text    = this.GetText("LBL_00004", "Communication");
        this.UltraWebTab1.Tabs.FromKeyTab("CEO_COM").Tooltip = this.GetText("LBL_00004", "Communication");
    }