コード例 #1
0
ファイル: MicroBSC.master.cs プロジェクト: schifflee/bscgit
    /// <summary>
    /// 실적마감율 세팅, 결재할 문서, 커뮤니케이션 문서 존재하는지여부
    /// 공지사항 존재여부
    /// </summary>
    private void SetGlobalStatus()
    {
        MicroBSC.Estimation.Dac.TermInfos    objTermYY = new MicroBSC.Estimation.Dac.TermInfos();
        MicroBSC.BSC.Biz.Biz_Bsc_Term_Detail objTerm   = new MicroBSC.BSC.Biz.Biz_Bsc_Term_Detail();

        int    intEstTerm = objTermYY.GetOpenEstTermID();
        string sFinishMon = objTerm.GetReleasedMonth();

        lblFinishMonth.Text = sFinishMon.Substring(0, 4) + "/" + sFinishMon.Substring(4, 2);

        //실적마감율 세팅
        Biz_lib_MenuControl biz = new Biz_lib_MenuControl();

        lblFinishRate.Text = biz.GetFinishRate(intEstTerm, sFinishMon).ToString();

        // 커뮤니케이션 리스트가 있는지?
        Biz_Bsc_Communication_User objUser = new Biz_Bsc_Communication_User();

        iBtnCommunication.Src = (objUser.GetIsNewListPerUser(this.ILogInUserId)) ? "~/images/NHIT/btn_top_02.gif" : "~/images/NHIT/btn_top_02.gif";//있음:없음

        // 결재할 문서가 있는지?
        //Biz_Bsc_Kpi_Result objBSC = new Biz_Bsc_Kpi_Result();
        //iBtnConfirm.Src = (objBSC.GetIsNewDraftPerUser(intEstTerm, sFinishMon, this.ILogInUserId)) ? "~/images/btn/top_bu_k01_b.gif" : "~/images/btn/top_bu_k01.gif";
        Biz_Com_Approval_Prc objBSC = new Biz_Com_Approval_Prc();
        DataSet rDs = objBSC.GetToDraftList(this.ILogInUserId, "");

        if (rDs.Tables.Count > 0)
        {
            iBtnConfirm.Src = (rDs.Tables[0].Rows.Count > 0) ? "~/images/NHIT/btn_top_01.gif" : "~/images/NHIT/btn_top_01.gif";//있음:없음
        }
        else
        {
            iBtnConfirm.Src = "~/images/NHIT/btn_top_01.gif";
        }


        // 공지사항이 있는지 또는 읽었는지
        Biz_Bsc_Communication_Notice objNot = new Biz_Bsc_Communication_Notice();

        this.IisHaveNoticeYN = (objNot.GetCurrentNotice() ? "Y" : "N");

        string strCookieKey = "NOTICE_" + objNot.Inotice_ref_id.ToString();

        if (Request.Cookies[strCookieKey] != null)
        {
            DateTime dtCookieDate = Convert.ToDateTime(Server.HtmlEncode(Request.Cookies[strCookieKey].Expires.ToShortTimeString()));
            if (dtCookieDate < DateTime.Now)
            {
                this.IisHaveNoticeYN = "N";
            }
        }

        // 회사 이미지로고 세팅
        tblTopMenu.Style.Add(HtmlTextWriterStyle.BackgroundImage, ConfigurationManager.AppSettings["TopMenuLogo.ImageUrl"].ToString());
        imgBottomCopy.ImageUrl = ConfigurationManager.AppSettings["BottomPageCopy.ImageUrl"].ToString();
    }
コード例 #2
0
    private void InitControlValue()
    {
        string sUrl = HttpContext.Current.Request.Url.AbsolutePath;

        // ERRORINFO.ASPX는 쿼리스트링이 고정되지 않은 페이지 이므로 예외처리한다. (해당페이지 권한시 FULL_PATH로 처리되므로 무한루프일수 있다.)
        //if (sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "ERRORINFO.ASPX")
        //    sUrl = HttpContext.Current.Request.Url.PathAndQuery;

        lblEmpName.Text = gUserInfo.Emp_Name;

        #region KPI실적 마감월, 마감율 셋팅
        MicroBSC.Estimation.Dac.TermInfos    objTermYY = new MicroBSC.Estimation.Dac.TermInfos();
        MicroBSC.BSC.Biz.Biz_Bsc_Term_Detail objTerm   = new MicroBSC.BSC.Biz.Biz_Bsc_Term_Detail();

        int    intEstTerm = objTermYY.GetOpenEstTermID();
        string sFinishMon = objTerm.GetReleasedMonth();
        lblFinishMonth.Text = sFinishMon.Substring(0, 4) + "/" + sFinishMon.Substring(4, 2);

        //실적마감율 세팅
        Biz_lib_MenuControl biz = new Biz_lib_MenuControl();
        lblFinishRate.Text = biz.GetFinishRate(intEstTerm, sFinishMon).ToString();

        #endregion
    }
コード例 #3
0
ファイル: MenuControl.ascx.cs プロジェクト: schifflee/bscgit
    private void InitControlValue()
    {
        string pathAndQuery = HttpContext.Current.Request.Url.PathAndQuery;
        string sUrl         = HttpContext.Current.Request.Url.AbsolutePath;

        // ERRORINFO.ASPX는 쿼리스트링이 고정되지 않은 페이지 이므로 예외처리한다. (해당페이지 권한시 FULL_PATH로 처리되므로 무한루프일수 있다.)
        //if (sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "ERRORINFO.ASPX")
        //    sUrl = HttpContext.Current.Request.Url.PathAndQuery;

        lblEmpName.Text = gUserInfo.Emp_Name;
        tblTopMenu.Style.Add(HtmlTextWriterStyle.BackgroundImage, ConfigurationManager.AppSettings["TopMenuLogo.ImageUrl"].ToString());


        MicroBSC.Estimation.Dac.TermInfos    objTermYY = new MicroBSC.Estimation.Dac.TermInfos();
        MicroBSC.BSC.Biz.Biz_Bsc_Term_Detail objTerm   = new MicroBSC.BSC.Biz.Biz_Bsc_Term_Detail();

        int    intEstTerm = objTermYY.GetOpenEstTermID();
        string sFinishMon = objTerm.GetReleasedMonth();


        #region KPI실적 마감월 셋팅
        lblFinishMonth.Text = sFinishMon.Substring(0, 4) + "/" + sFinishMon.Substring(4, 2);
        #endregion

        #region KPI실적 마감율 셋팅
        Biz_lib_MenuControl biz = new Biz_lib_MenuControl();
        lblFinishRate.Text = biz.GetFinishRate(intEstTerm, sFinishMon).ToString();
        #endregion

        #region 커뮤니케이션 리스트가 있는지?
        MicroBSC.BSC.Biz.Biz_Bsc_Communication_User objUser = new MicroBSC.BSC.Biz.Biz_Bsc_Communication_User();
        iBtnCommunication.Src = (objUser.GetIsNewListPerUser(this.ILogInUserId)) ? "~/images/btn/top_bu_k02_b.gif" : "~/images/btn/top_bu_k02.gif";

        // 결재할 문서가 있는지?
        //Biz_Bsc_Kpi_Result objBSC = new Biz_Bsc_Kpi_Result();
        //iBtnConfirm.Src = (objBSC.GetIsNewDraftPerUser(intEstTerm, sFinishMon, this.ILogInUserId)) ? "~/images/btn/top_bu_k01_b.gif" : "~/images/btn/top_bu_k01.gif";
        Biz_Com_Approval_Prc objBSC = new Biz_Com_Approval_Prc();
        DataSet rDs = objBSC.GetToDraftList(this.ILogInUserId, "");
        if (rDs.Tables.Count > 0)
        {
            iBtnConfirm.Src = (rDs.Tables[0].Rows.Count > 0) ? "~/images/btn/top_bu_k01_b.gif" : "~/images/btn/top_bu_k01.gif";
        }
        else
        {
            iBtnConfirm.Src = "~/images/btn/top_bu_k01.gif";
        }


        // 공지사항이 있는지 또는 읽었는지
        MicroBSC.BSC.Biz.Biz_Bsc_Communication_Notice objNot = new MicroBSC.BSC.Biz.Biz_Bsc_Communication_Notice();
        this.IisHaveNoticeYN = (objNot.GetCurrentNotice() ? "Y" : "N");

        string strCookieKey = "NOTICE_" + objNot.Inotice_ref_id.ToString();
        if (Request.Cookies[strCookieKey] != null)
        {
            DateTime dtCookieDate = Convert.ToDateTime(Server.HtmlEncode(Request.Cookies[strCookieKey].Expires.ToShortTimeString()));
            if (dtCookieDate < DateTime.Now)
            {
                this.IisHaveNoticeYN = "N";
            }
        }

        #endregion

        #region 타이틀 셋팅
        if (sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST110104.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST110104_01.ASPX")
        {
            lblTitle.Text = biz.GetMenuTitle(pathAndQuery);
        }
        else
        {
            lblTitle.Text = biz.GetMenuTitle(sUrl);
        }

        if (lblTitle.Text.Trim().Equals(""))
        {
            imgTitle.Visible = false;
        }
        #endregion
    }