Exemplo n.º 1
0
/*
 *      /// <summary>
 *  /// 메뉴세팅
 *  /// </summary>
 *  private void SetMenu()
 *  {
 *      string sUrl = HttpContext.Current.Request.Url.AbsolutePath;
 *             sUrl = sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper();
 *      string sWhere      = "";
 *      string sShowLeftMenu = "Y";
 *
 *      Biz_lib_MenuControl biz = new Biz_lib_MenuControl();
 *      DataSet dsAuthMenu      = biz.GetTreeMenuPerUser(this.ILogInUserId.ToString());
 *
 *      string strTopMenuFileName = "";
 *      string strCurMenuPageName = "";
 *      string strCurMenuFileName = "";
 *      string strAllMenuPathName = "";
 *      string strUseLeftMenuPage = "Y";
 *
 *      biz.GetMenuPageInfo(sUrl
 *                        , out strCurMenuPageName
 *                        , out strCurMenuFileName
 *                        , out strAllMenuPathName
 *                        , out strTopMenuFileName
 *                        , out strUseLeftMenuPage);
 *
 *      sWhere = "MENU_TYPE = 'T'";
 *      DataRow[] arrTopRow     = dsAuthMenu.Tables[0].Select(sWhere,"MENU_PRIORITY ASC");
 *      DataRow[] arrMidRow     = null;
 *      DataRow[] arrLowRow     = null;
 *
 *      string sTopLiteral = "";
 *      string sMidLiteral = "";
 *      string sLowLiteral = "";
 *
 *      string strMenuTxt  = "";
 *      string strMenuVal  = "";
 *      string strMenuUrl  = "";
 *
 *      int cntTopRow      = arrTopRow.Length;
 *      int cntMidRow      = 0;
 *      int cntLowRow      = 0;
 *
 *      trvMenu.Nodes.Clear();
 *      trvMenu.NodeIndent = 10;
 *      //trvMenu.CollapseImageUrl = "~/images/arrow/arrow_col_01.jpg";
 *      //trvMenu.ExpandImageUrl   = "~/images/arrow/arrow_exp_01.jpg";
 *
 *      for (int i = 0; i < cntTopRow; i++)
 *      {
 *          sTopLiteral += "<img src=\"{3}\" alt=\"\" name=\"img{4}\" style=\"vertical-align:bottom; cursor:hand;\" onclick=\"location.href='{0}';\" onmouseover=\"MM_swapImage('img{1}', '', '{2}')\" onmouseout=\"MM_swapImgRestore()\" />";
 *          sTopLiteral += "&nbsp;";
 *          sTopLiteral = string.Format
 *                            (
 *                               sTopLiteral
 *                             , GetValue(arrTopRow[i]["MENU_FULL_PATH"])
 *                             , GetValue(arrTopRow[i]["MENU_PAGE_NAME"]).Substring(0, GetValue(arrTopRow[i]["MENU_PAGE_NAME"]).LastIndexOf("."))
 *                             , (strTopMenuFileName.ToUpper() == arrTopRow[i]["MENU_PAGE_NAME"].ToString()) ? GetValue(arrTopRow[i]["MENU_NAME_IMAGE_PATH"])   : GetValue(arrTopRow[i]["MENU_NAME_IMAGE_PATH_U"])
 *                             , (strTopMenuFileName.ToUpper() == arrTopRow[i]["MENU_PAGE_NAME"].ToString()) ? GetValue(arrTopRow[i]["MENU_NAME_IMAGE_PATH_U"]) : GetValue(arrTopRow[i]["MENU_NAME_IMAGE_PATH"])
 *                             , GetValue(arrTopRow[i]["MENU_PAGE_NAME"]).Substring(0, GetValue(arrTopRow[i]["MENU_PAGE_NAME"]).LastIndexOf("."))
 *
 *                            );
 *          if ((strTopMenuFileName.ToUpper() == arrTopRow[i]["MENU_PAGE_NAME"].ToString()))
 *          {
 *              leftTopTitle.ImageUrl = arrTopRow[i]["MENU_PREV_ICON_PATH"].ToString();
 *          }
 *
 *          sWhere    = "UP_MENU_ID=" + arrTopRow[i]["MENU_REF_ID"].ToString();
 *          arrMidRow = dsAuthMenu.Tables[0].Select(sWhere, "MENU_PRIORITY ASC");
 *          cntMidRow = arrMidRow.Length;
 *
 *          for (int j = 0; j < cntMidRow; j++)
 *          {
 *
 *              if (strTopMenuFileName.ToUpper().Trim() != arrTopRow[i]["MENU_PAGE_NAME"].ToString().Trim())
 *              {
 *                  break;
 *              }
 *
 *              //if (arrMidRow[j]["MENU_FULL_PATH"].ToString().Trim() == "")
 *              //{
 *              //    strMenuTxt = "<font onclick='return false;'>&nbsp;" + arrMidRow[j]["MENU_NAME"].ToString() + "</font>";
 *              //}
 *              //else
 *              //{
 *              //    strMenuTxt = "&nbsp;"+arrMidRow[j]["MENU_NAME"].ToString();
 *              //}
 *
 *              strMenuTxt = "&nbsp;"+arrMidRow[j]["MENU_NAME"].ToString();
 *              strMenuVal = arrMidRow[j]["MENU_REF_ID"].ToString();
 *
 *              TreeNode trnMenu = new TreeNode(strMenuTxt, strMenuVal);
 *              trvMenu.Nodes.Add(trnMenu);
 *              trnMenu.NavigateUrl = arrMidRow[j]["MENU_FULL_PATH"].ToString().Trim();
 *              trnMenu.SelectAction = TreeNodeSelectAction.Expand;
 *
 *              sWhere    = "UP_MENU_ID=" + arrMidRow[j]["MENU_REF_ID"].ToString();
 *              arrLowRow = dsAuthMenu.Tables[0].Select(sWhere, "MENU_PRIORITY ASC");
 *              cntLowRow = arrLowRow.Length;
 *
 *              trnMenu.Collapse();
 *              for (int k = 0; k < cntLowRow; k++)
 *              {
 *                  if (arrLowRow[k]["MENU_FULL_PATH"].ToString().Trim() == "")
 *                  {
 *                      strMenuTxt = "<font onclick='return false;'>&nbsp;" + arrLowRow[k]["MENU_NAME"].ToString() + "</font>";
 *                  }
 *                  else
 *                  {
 *                      strMenuTxt = "&nbsp;"+arrLowRow[k]["MENU_NAME"].ToString();
 *                  }
 *
 *                  strMenuVal = arrLowRow[k]["MENU_REF_ID"].ToString();
 *
 *                  TreeNode trnSub = new TreeNode(strMenuTxt, strMenuVal);
 *                  trnMenu.ChildNodes.Add(trnSub);
 *                  trnSub.ImageUrl    = "~/images/arrow/arrow_not_sel.gif";
 *                  trnSub.NavigateUrl = arrLowRow[k]["MENU_FULL_PATH"].ToString();
 *
 *
 *                  if (strCurMenuFileName == arrLowRow[k]["MENU_PAGE_NAME"].ToString().Trim().ToUpper())
 *                  {
 *                      trnSub.Parent.Expand();
 *                      trnSub.Select();
 *                      trnSub.Text     = "<font color=\"red\">"+strMenuTxt+"</font>";
 *                      trnSub.ImageUrl = "~/images/arrow/arrow_sel.gif";
 *                  }
 *              }
 *          }
 *              }
 *
 *              ltrTopMenu.Text = sTopLiteral;
 *      lblTitle.Text = strAllMenuPathName;
 *
 *      if (strUseLeftMenuPage == "N")
 *      {
 *          this.tdMenu_Left.Visible     = false;
 *          this.tdMenu_Contents.Width   = "100%";
 *          this.tdMenu_Contents.ColSpan = 2;
 *      }
 *  }
 */

    /// <summary>
    /// 08.03.19 - 류승태
    /// 탑메뉴만 있음
    /// </summary>
    private void SetMenu()
    {
        string sUrl = HttpContext.Current.Request.Url.PathAndQuery;

        Biz_lib_MenuControl biz = new Biz_lib_MenuControl();

        DataSet dsAuthTop = biz.GetAuthTopMenu(gUserInfo.Emp_Ref_ID.ToString());

        int     iTopMenuID = GetTopMenuRefID(sUrl);
        DataSet dsSubMenu  = GetSubMenuDs(iTopMenuID.ToString());

        #region TopMenu 설정
        string sTopLiteral = "";
        int    iTmp        = 0;

        sTopLiteral += "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">    \n";
        sTopLiteral += "    <tr>    \n";

        foreach (DataRow drRow in dsAuthTop.Tables[0].Rows)
        {
            sTopLiteral += "<td><img src=\"../images/blank.gif\" width=\"3\"></td>          ";
            sTopLiteral += "<td";
            //sTopLiteral += "<td style=\"cursor:hand\"               ";
            //sTopLiteral += "                                    onmouseout=\"MM_swapImgRestore()\"              ";
            //sTopLiteral += "                                    onmouseover=\"MM_swapImage('img{1}', '', '{2}')\"   ";//;mfLeftTopTitle('{5}')
            sTopLiteral += "            ><a href='#null' onfocus='this.blur();' onclick=\"location.href='{0}'\"><img src=\"{3}\" name=\"img{4}\" border='0'></a></td>                        ";

            sTopLiteral = string.Format(
                sTopLiteral
                , GetValue(drRow["MENU_FULL_PATH"])
                , GetValue(drRow["MENU_PAGE_NAME"]).Substring(0, GetValue(drRow["MENU_PAGE_NAME"]).LastIndexOf("."))
                , (iTopMenuID == Convert.ToInt32(drRow["MENU_REF_ID"]) ? GetValue(drRow["MENU_NAME_IMAGE_PATH"]) : GetValue(drRow["MENU_NAME_IMAGE_PATH_U"]))
                , (iTopMenuID == Convert.ToInt32(drRow["MENU_REF_ID"]) ? GetValue(drRow["MENU_NAME_IMAGE_PATH_U"]) : GetValue(drRow["MENU_NAME_IMAGE_PATH"]))
                , GetValue(drRow["MENU_PAGE_NAME"]).Substring(0, GetValue(drRow["MENU_PAGE_NAME"]).LastIndexOf("."))
                , GetValue(drRow["MENU_PREV_ICON_PATH"])
                );

            if (iTopMenuID == Convert.ToInt32(drRow["MENU_REF_ID"]))
            {
                leftTopTitle.ImageUrl = GetValue(drRow["MENU_PREV_ICON_PATH"]);
            }

            iTmp++;
        }

        sTopLiteral += "    </tr>   \n";
        sTopLiteral += "</table>    \n";

        ltrTopMenu.Text = sTopLiteral;
        #endregion
    }
Exemplo n.º 2
0
    private void CreateTopMenu()
    {
        int    iTmp = 0;
        string sUrl = HttpContext.Current.Request.Url.AbsolutePath;

        // ERRORINFO.ASPX는 쿼리스트링이 고정되지 않은 페이지 이므로 예외처리한다. (해당페이지 권한시 FULL_PATH로 처리되므로 무한루프일수 있다.)
        if (
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "ERRORINFO.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1002.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1003.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR2001.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1001_1000.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1001_1001.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1001_1009.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1001_1014.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST1100.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST3600.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST4000.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST4100.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "APP2000.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR10001.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR3001.ASPX"
            )
        {
            sUrl = HttpContext.Current.Request.Url.PathAndQuery;
        }

        Biz_lib_MenuControl biz       = new Biz_lib_MenuControl();
        DataSet             dsAuthTop = biz.GetAuthTopMenu(gUserInfo.Emp_Ref_ID.ToString());

        bool bAuthPage = biz.IsAuthPage(gUserInfo.Emp_Ref_ID.ToString(), sUrl);

        //bool bNotUseMenu = biz.IsNotUseMenu(gUserInfo.Emp_Ref_ID.ToString(), sUrl);

        //// 권한이 없을때 처리...
        if (!bAuthPage && err != "err")
        {
            //Server.Transfer("/_common/ErrorPages/ErrorInfo.aspx?ERRMSG=권한이 없습니다!");
            HttpContext.Current.Response.Redirect("/_common/ErrorPages/ErrorInfo.aspx?ERRMSG=권한이 없습니다!");
            return;
        }

        //// 메뉴구성페이지가 아닐때 처리...
        //if (bNotUseMenu)
        //{
        //    return;
        //}

        int iTopMenuID = GetTopMenuRefID(sUrl);
        //DataTable dtSubMenu = GetSubMenu(iTopMenuID.ToString());

        string sTopLiteral = "";

        iTmp = 0;

        sTopLiteral += "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">    \n";
        sTopLiteral += "    <tr>    \n";

        foreach (DataRow drRow in dsAuthTop.Tables[0].Rows)
        {
            sTopLiteral += "<td><img src=\"../images/blank.gif\" width=\"3\"></td>          ";
            sTopLiteral += "<td style=\"cursor:hand\" onclick=\"parent.left_frame.location.href='{0}';mfLeftTopTitle('{5}')\"               ";
            sTopLiteral += "                                    onmouseout=\"MM_swapImgRestore()\"              ";
            sTopLiteral += "                                    onmouseover=\"MM_swapImage('img{1}', '', '{2}')\"   ";
            sTopLiteral += "            ><img src=\"{3}\" name=\"img{4}\" border=0></td>                        ";

            sTopLiteral = string.Format(
                sTopLiteral
                , GetValue(drRow["MENU_FULL_PATH"])
                , GetValue(drRow["MENU_PAGE_NAME"]).Substring(0, GetValue(drRow["MENU_PAGE_NAME"]).LastIndexOf("."))
                , (iTopMenuID == Convert.ToInt32(drRow["MENU_REF_ID"]) ? GetValue(drRow["MENU_NAME_IMAGE_PATH"]) : GetValue(drRow["MENU_NAME_IMAGE_PATH_U"]))
                , (iTopMenuID == Convert.ToInt32(drRow["MENU_REF_ID"]) ? GetValue(drRow["MENU_NAME_IMAGE_PATH_U"]) : GetValue(drRow["MENU_NAME_IMAGE_PATH"]))
                , GetValue(drRow["MENU_PAGE_NAME"]).Substring(0, GetValue(drRow["MENU_PAGE_NAME"]).LastIndexOf("."))
                , GetValue(drRow["MENU_PREV_ICON_PATH"])
                );

            iTmp++;
        }

        sTopLiteral += "    </tr>   \n";
        sTopLiteral += "</table>    \n";

        litTopMenu.Text = sTopLiteral;
    }
Exemplo n.º 3
0
    private void SetAllTimeTop()
    {
        int    iTmp = 0;
        string sUrl = HttpContext.Current.Request.Url.AbsolutePath;

        // ERRORINFO.ASPX는 쿼리스트링이 고정되지 않은 페이지 이므로 예외처리한다. (해당페이지 권한시 FULL_PATH로 처리되므로 무한루프일수 있다.)
        if (
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "ERRORINFO.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1002.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1003.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1005.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR2001.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR3001.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR2001.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR_DEPT_ORG.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR_DEPT_ORG_EMBED.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1001_1000.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1001_1001.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1001_1009.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1001_1014.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR10001.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST1100.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST3600.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST4000.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST4100.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "APP2000.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "BSC0406S1.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "BSC0304S2.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "BSC0403S4.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "BSC0404S1.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST110104.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST110104_01.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST110204.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST110204_01.ASPX"
            )
        {
            sUrl = HttpContext.Current.Request.Url.PathAndQuery;
        }

        Biz_lib_MenuControl biz        = new Biz_lib_MenuControl();
        DataSet             dsAuthTop  = biz.GetAuthTopMenu(gUserInfo.Emp_Ref_ID.ToString());
        DataSet             dsAuthSub  = biz.GetAuthSubMenu(gUserInfo.Emp_Ref_ID.ToString());
        DataSet             dsAuthMenu = biz.GetAuthMenu(gUserInfo.Emp_Ref_ID.ToString());

        bool bAuthPage   = biz.IsAuthPage(gUserInfo.Emp_Ref_ID.ToString(), sUrl);
        bool bNotUseMenu = biz.IsNotUseMenu(gUserInfo.Emp_Ref_ID.ToString(), sUrl);

        //// 권한이 없을때 처리...
        if (!bAuthPage && err != "err")
        {
            //Server.Transfer("/_common/ErrorPages/ErrorInfo.aspx?ERRMSG=권한이 없습니다!");
            HttpContext.Current.Response.Redirect("/_common/ErrorPages/ErrorInfo.aspx?ERRMSG=권한이 없습니다!");
            return;
        }

        // 메뉴구성페이지가 아닐때 처리...
        //if (bNotUseMenu)
        //{
        //    return;
        //}

        int iTopMenuID = GetTopMenuRefID(sUrl);

/*
 *      DataTable dtSubMenu = GetSubMenu(iTopMenuID.ToString());
 */
        #region TopMenu 설정
        string sTopLiteral = "";
        iTmp = 0;

        sTopLiteral += "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">    \n";
        sTopLiteral += "    <tr>    \n";

        foreach (DataRow drRow in dsAuthTop.Tables[0].Rows)
        {
            //sTopLiteral += "<td {5}><img src=\"../images/blank.gif\" width=\"1\"><table                         ";
            //sTopLiteral += "     cellpadding=0 cellspacing=0>                                                   ";
            //sTopLiteral += "        <tr>                                                                        ";
            //sTopLiteral += "            <td style=\"cursor:hand\" onclick=\"location.href='{0}';mfLeftTopTitle('{6}')\"               ";
            //sTopLiteral += "                                    onmouseout=\"MM_swapImgRestore()\"              ";
            //sTopLiteral += "                                    onmouseover=\"MM_swapImage('img{1}', '', '{2}')\"   ";
            //sTopLiteral += "            ><img src=\"{3}\" name=\"img{4}\" border=0></td>                        ";
            //sTopLiteral += "        </tr>                                                                       ";
            //sTopLiteral += "    </table>                                                                        ";
            //sTopLiteral += "</td>                                                                               ";

            //sTopLiteral = string.Format(
            //                            sTopLiteral
            //                           , GetValue(drRow["MENU_FULL_PATH"])
            //                           , GetValue(drRow["MENU_PAGE_NAME"]).Substring(0, GetValue(drRow["MENU_PAGE_NAME"]).LastIndexOf("."))
            //                           , (iTopMenuID == Convert.ToInt32(drRow["MENU_REF_ID"]) ? GetValue(drRow["MENU_NAME_IMAGE_PATH"]) : GetValue(drRow["MENU_NAME_IMAGE_PATH_U"]))
            //                           , (iTopMenuID == Convert.ToInt32(drRow["MENU_REF_ID"]) ? GetValue(drRow["MENU_NAME_IMAGE_PATH_U"]) : GetValue(drRow["MENU_NAME_IMAGE_PATH"]))
            //                           , GetValue(drRow["MENU_PAGE_NAME"]).Substring(0, GetValue(drRow["MENU_PAGE_NAME"]).LastIndexOf("."))
            //                           , (iTmp == 0 ? "align=\"left\"" : "width=130")
            //                           , GetValue(drRow["MENU_PREV_ICON_PATH"])
            //                           );


            sTopLiteral += "<td><img src=\"../images/blank.gif\" width=\"3\"></td>          ";
            sTopLiteral += "<td";
            //sTopLiteral += "<td style=\"cursor:hand\"               ";
            //sTopLiteral += "                                    onmouseout=\"MM_swapImgRestore()\"              ";
            //sTopLiteral += "                                    onmouseover=\"MM_swapImage('img{1}', '', '{2}')\"   ";//;mfLeftTopTitle('{5}')
            sTopLiteral += "            ><a href='#null' onfocus='this.blur();' onclick=\"location.replace('{0}')\"><img src=\"{3}\" name=\"img{4}\" border='0'></a></td> ";



            //sTopLiteral += "<td><img src=\"../images/blank.gif\" width=\"6\"></td>          ";
            //sTopLiteral += "<td style=\"cursor:hand\" onclick=\"location.href='{0}';mfLeftTopTitle('{5}')\"               ";
            ////sTopLiteral += "                                    onmouseout=\"MM_swapImgRestore()\"              ";
            ////sTopLiteral += "                                    onmouseover=\"MM_swapImage('img{1}', '', '{2}')\"   ";
            //sTopLiteral += "            ><img src=\"{3}\" name=\"img{4}\" border=0></td>                        ";
            sTopLiteral = string.Format(
                sTopLiteral
                , GetValue(drRow["MENU_FULL_PATH"])
                , GetValue(drRow["MENU_PAGE_NAME"]).Substring(0, GetValue(drRow["MENU_PAGE_NAME"]).LastIndexOf("."))
                , (iTopMenuID == Convert.ToInt32(drRow["MENU_REF_ID"]) ? GetValue(drRow["MENU_NAME_IMAGE_PATH"]) : GetValue(drRow["MENU_NAME_IMAGE_PATH_U"]))
                , (iTopMenuID == Convert.ToInt32(drRow["MENU_REF_ID"]) ? GetValue(drRow["MENU_NAME_IMAGE_PATH_U"]) : GetValue(drRow["MENU_NAME_IMAGE_PATH"]))
                , GetValue(drRow["MENU_PAGE_NAME"]).Substring(0, GetValue(drRow["MENU_PAGE_NAME"]).LastIndexOf("."))
                , GetValue(drRow["MENU_PREV_ICON_PATH"])
                );

            if (iTopMenuID == Convert.ToInt32(drRow["MENU_REF_ID"]))
            {
                leftTopTitle.ImageUrl = GetValue(drRow["MENU_PREV_ICON_PATH"]);
            }

            iTmp++;
        }

        sTopLiteral += "    </tr>   \n";
        sTopLiteral += "</table>    \n";

        litTopMenu.Text = sTopLiteral;
        #endregion

        #region SubMenuStyle 설정 - 08.03.20 류승태 -- 주석처리 메뉴추가관련

/*
 *      string sSubLiteral = "";
 *      int iPrevLevel = 1; // 이전레벨
 *      int iTmpLevel = 0;
 *
 *      string sMenuID = "";    // 토글메뉴시 사용
 *
 *      foreach (DataRow drRow in dtSubMenu.Rows)
 *      {
 *          iTmpLevel = Convert.ToInt32(drRow["LEVEL"]);
 *
 *          if (iPrevLevel != iTmpLevel)
 *          {
 *              if (iPrevLevel < iTmpLevel)
 *              {
 *                  // 세부항목 여는 행위
 *                  if (iTmpLevel >= 3)
 *                      //sSubLiteral += "        <tr><td height=\"19\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'\" class=\"stext\">▶ " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *                      sSubLiteral += "        <tr><td height=\"19\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"" + (GetValue(drRow["MENU_FULL_PATH"]) == "" ? "#" : "javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'") + "\" class=\"stext\">▶ " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *                  else if (iTmpLevel >= 2)
 *                  {
 *                      sSubLiteral += "<span id=\"" + sMenuID + "\">                                                               \n";
 *                      sSubLiteral += "    <table width=\"137\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">      \n";
 *                      sSubLiteral += "        <tr><td width=\"128\" height=3></td></tr>                               \n";
 *
 *                      //sSubLiteral += "        <tr><td height=\"19\"><a href=\"javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'\" class=\"stext\">>> " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *                      sSubLiteral += "        <tr><td height=\"19\"><a href=\"" + (GetValue(drRow["MENU_FULL_PATH"]) == "" ? "#" : "javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'") + "\" class=\"stext\">>> " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *                  }
 *                  else
 *                  {
 *                      if (GetValue(drRow["MENU_TYPE"]) == "M")
 *                      {
 *                          // 메뉴그룹이라면 토글시 사용할 ID를 정한다.
 *                          //sMenuID = "spn" + GetValue(drRow["MENU_PAGE_NAME"]).Substring(0, GetValue(drRow["MENU_PAGE_NAME"]).LastIndexOf("."));
 *                          sMenuID = "spn" + GetValue(drRow["MENU_REF_ID"]);
 *
 *                          sSubLiteral += "<script type=\"text/javascript\">saMenu[saMenu.length] = '" + sMenuID + "';</script>";
 *                      }
 *
 *                      sSubLiteral += "<table width=\"169\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" runat=\"server\">   \n";
 *                      sSubLiteral += "    <tr><td height=\"1\" bgcolor=\"#FFFFFF\"></td></tr>                                                 \n";
 *                      sSubLiteral += "    <tr>                                                                                                \n";
 *                      sSubLiteral += "        <td height=\"21\" bgcolor=\"EEEEEE\" class=\"left_menu3\"><img                                  \n";
 *                      sSubLiteral += "            src=\"../images/icon/left_icon01.gif\" height=\"10\" align=\"absmiddle\"                    \n";
 *                      sSubLiteral += "            style=\"cursor:hand\"                                                                       \n";
 *                      sSubLiteral += "            ><a href=\"" + (GetValue(drRow["MENU_FULL_PATH"]) == "" ? "#" : "javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'") + "\" ";
 *
 *                      if (GetValue(drRow["MENU_TYPE"]) == "M")
 *                      {
 *                          // 메뉴그룹이라면 토클함수를 콜한다.
 *                          sSubLiteral += "onclick=\"return mfToggleMenu('" + sMenuID + "')\" ";
 *                      }
 *
 *                      sSubLiteral += "> " + GetValue(drRow["MENU_NAME"]) + "</a> \n";
 *                      sSubLiteral += "        </td>                                                                                           \n";
 *                      sSubLiteral += "    </tr>                                                                                               \n";
 *                      sSubLiteral += "    <tr bgcolor=\"F0F0F0\"><td height=\"1\" bgcolor=\"D6D6D6\"></td></tr>                               \n";
 *                      sSubLiteral += "</table>                                                                                                \n";
 *                  }
 *              }
 *              else
 *              {
 *                  // 레벨이 달라지는 경우이므로 레벨이 2인경우는 닫고 다시연다.
 *                  if (iTmpLevel >= 3)
 *                      ;
 *                  else if (iTmpLevel >= 2)
 *                  {
 *                      sSubLiteral += "        <tr><td height=5></td></tr>                                             \n";
 *                      sSubLiteral += "    </table>                                                                    \n";
 *                      sSubLiteral += "</span>                                                                         \n";
 *
 *                      //////sMenuID = "spn" + GetValue(drRow["MENU_REF_ID"]);
 *
 *                      sSubLiteral += "<span id=\"" + sMenuID + "\">                                                               \n";
 *                      sSubLiteral += "    <table width=\"137\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">      \n";
 *                      sSubLiteral += "        <tr><td width=\"128\" height=3></td></tr>                               \n";
 *
 *                  }
 *
 *                  // 세부항목 닫는 행위
 *                  if (iTmpLevel >= 3)
 *                      //sSubLiteral += "        <tr><td height=\"19\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'\" class=\"stext\">▶ " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *                      sSubLiteral += "        <tr><td height=\"19\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"" + (GetValue(drRow["MENU_FULL_PATH"]) == "" ? "#" : "javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'") + "\" class=\"stext\">▶ " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *                  else if (iTmpLevel >= 2)
 *                  {
 *                      //sSubLiteral += "        <tr><td height=\"19\"><a href=\"javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'\" class=\"stext\">>> " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *                      sSubLiteral += "        <tr><td height=\"19\"><a href=\"" + (GetValue(drRow["MENU_FULL_PATH"]) == "" ? "#" : "javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'") + "\" class=\"stext\">>> " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *                  }
 *                  else
 *                  {
 *                      sSubLiteral += "        <tr><td height=5></td></tr>                                             \n";
 *                      sSubLiteral += "    </table>                                                                    \n";
 *                      sSubLiteral += "</span>                                                                         \n";
 *
 *                      if (GetValue(drRow["MENU_TYPE"]) == "M")
 *                      {
 *                          // 메뉴그룹이라면 토글시 사용할 ID를 정한다.
 *                          //sMenuID = "spn" + GetValue(drRow["MENU_PAGE_NAME"]).Substring(0, GetValue(drRow["MENU_PAGE_NAME"]).LastIndexOf("."));
 *                          sMenuID = "spn" + GetValue(drRow["MENU_REF_ID"]);
 *
 *                          sSubLiteral += "<script type=\"text/javascript\">saMenu[saMenu.length] = '" + sMenuID + "';</script>";
 *                      }
 *
 *                      sSubLiteral += "<table width=\"169\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" runat=\"server\">   \n";
 *                      sSubLiteral += "    <tr><td height=\"1\" bgcolor=\"#FFFFFF\"></td></tr>                                                 \n";
 *                      sSubLiteral += "    <tr>                                                                                                \n";
 *                      sSubLiteral += "        <td height=\"21\" bgcolor=\"EEEEEE\" class=\"left_menu3\"><img                                  \n";
 *                      sSubLiteral += "            src=\"../images/icon/left_icon01.gif\" height=\"10\" align=\"absmiddle\"                    \n";
 *                      sSubLiteral += "            style=\"cursor:hand\"                                                                       \n";
 *                      sSubLiteral += "            ><a href=\"" + (GetValue(drRow["MENU_FULL_PATH"]) == "" ? "#" : "javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'") + "\" ";
 *
 *                      if (GetValue(drRow["MENU_TYPE"]) == "M")
 *                      {
 *                          // 메뉴그룹이라면 토클함수를 콜한다.
 *                          sSubLiteral += "onclick=\"return mfToggleMenu('" + sMenuID + "')\" ";
 *                      }
 *
 *                      sSubLiteral += "> " + GetValue(drRow["MENU_NAME"]) + "</a> \n";
 *
 *                      sSubLiteral += "        </td>                                                                                           \n";
 *                      sSubLiteral += "    </tr>                                                                                               \n";
 *                      sSubLiteral += "    <tr bgcolor=\"F0F0F0\"><td height=\"1\" bgcolor=\"D6D6D6\"></td></tr>                               \n";
 *                      sSubLiteral += "</table>                                                                                                \n";
 *                  }
 *              }
 *
 *              iPrevLevel = iTmpLevel;
 *          }
 *          else
 *          {
 *              if (iTmpLevel >= 3)
 *                  //sSubLiteral += "        <tr><td height=\"19\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'\" class=\"stext\">▶ " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *                  sSubLiteral += "        <tr><td height=\"19\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"" + (GetValue(drRow["MENU_FULL_PATH"]) == "" ? "#" : "javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'") + "\" class=\"stext\">▶ " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *              else if (iTmpLevel >= 2)
 *                  //sSubLiteral += "        <tr><td height=\"19\"><a href=\"javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'\" class=\"stext\">>> " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *                  sSubLiteral += "        <tr><td height=\"19\"><a href=\"" + (GetValue(drRow["MENU_FULL_PATH"]) == "" ? "#" : "javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'") + "\" class=\"stext\">>> " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *              else
 *              {
 *                  if (GetValue(drRow["MENU_TYPE"]) == "M")
 *                  {
 *                      // 메뉴그룹이라면 토글시 사용할 ID를 정한다.
 *                      //sMenuID = "spn" + GetValue(drRow["MENU_PAGE_NAME"]).Substring(0, GetValue(drRow["MENU_PAGE_NAME"]).LastIndexOf("."));
 *                      sMenuID = "spn" + GetValue(drRow["MENU_REF_ID"]);
 *
 *                      sSubLiteral += "<script type=\"text/javascript\">saMenu[saMenu.length] = '" + sMenuID + "';</script>";
 *                  }
 *
 *                  sSubLiteral += "<table width=\"169\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" runat=\"server\">   \n";
 *                  sSubLiteral += "    <tr><td height=\"1\" bgcolor=\"#FFFFFF\"></td></tr>                                                 \n";
 *                  sSubLiteral += "    <tr>                                                                                                \n";
 *                  sSubLiteral += "        <td height=\"21\" bgcolor=\"EEEEEE\" class=\"left_menu3\"><img                                  \n";
 *                  sSubLiteral += "            src=\"../images/icon/left_icon01.gif\" height=\"10\" align=\"absmiddle\"                    \n";
 *                  sSubLiteral += "            style=\"cursor:hand\"                                                                       \n";
 *                  sSubLiteral += "            ><a href=\"" + (GetValue(drRow["MENU_FULL_PATH"]) == "" ? "#" : "javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'") + "\" ";
 *
 *                  if (GetValue(drRow["MENU_TYPE"]) == "M")
 *                  {
 *                      // 메뉴그룹이라면 토클함수를 콜한다.
 *                      sSubLiteral += "onclick=\"return mfToggleMenu('" + sMenuID + "')\" ";
 *                  }
 *
 *                  sSubLiteral += "> " + GetValue(drRow["MENU_NAME"]) + "</a> \n";
 *
 *                  sSubLiteral += "        </td>                                                                                           \n";
 *                  sSubLiteral += "    </tr>                                                                                               \n";
 *                  sSubLiteral += "    <tr bgcolor=\"F0F0F0\"><td height=\"1\" bgcolor=\"D6D6D6\"></td></tr>                               \n";
 *                  sSubLiteral += "</table>                                                                                                \n";
 *
 *              }
 *          }
 *
 *          //if (GetValue(drRow["MENU_DIR"]) + GetValue(drRow["MENU_PAGE_NAME"]) == sUrl.ToUpper())
 *          if (GetValue(drRow["MENU_FULL_PATH"]) == sUrl.ToUpper())
 *          {
 *              // 현재페이지가 속해있는 메뉴그룹 셋팅 (계속 펼쳐져 있도록 한다.)
 *              sSubLiteral += "<script type=\"text/javascript\">sMenu = '" + sMenuID + "';</script>";
 *          }
 *      }
 *
 *      // iPrevLevel이 2보다 크거나 같으면 닫아준다.
 *      if (iPrevLevel >= 2)
 *      {
 *          sSubLiteral += "        <tr><td height=5></td></tr>                                             \n";
 *          sSubLiteral += "    </table>                                                                    \n";
 *          sSubLiteral += "</span>                                                                         \n";
 *      }
 *
 *      // 최초 시작시 메뉴를 전부 닫고 현재페이지가 속한 메뉴만 오픈한다.
 *      sSubLiteral += "<script type=\"text/javascript\">mfStartMenu();</script>";
 *
 *      litSubMenu.Text = sSubLiteral;
 */
        #endregion
    }
Exemplo n.º 4
0
/*
 *      /// <summary>
 *  /// 메뉴세팅
 *  /// </summary>
 *  private void SetMenu()
 *  {
 *      string sUrl = HttpContext.Current.Request.Url.AbsolutePath;
 *             sUrl = sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper();
 *      string sWhere      = "";
 *      string sShowLeftMenu = "Y";
 *
 *      Biz_lib_MenuControl biz = new Biz_lib_MenuControl();
 *      DataSet dsAuthMenu      = biz.GetTreeMenuPerUser(this.ILogInUserId.ToString());
 *
 *      string strTopMenuFileName = "";
 *      string strCurMenuPageName = "";
 *      string strCurMenuFileName = "";
 *      string strAllMenuPathName = "";
 *      string strUseLeftMenuPage = "Y";
 *
 *      biz.GetMenuPageInfo(sUrl
 *                        , out strCurMenuPageName
 *                        , out strCurMenuFileName
 *                        , out strAllMenuPathName
 *                        , out strTopMenuFileName
 *                        , out strUseLeftMenuPage);
 *
 *      sWhere = "MENU_TYPE = 'T'";
 *      DataRow[] arrTopRow     = dsAuthMenu.Tables[0].Select(sWhere,"MENU_PRIORITY ASC");
 *      DataRow[] arrMidRow     = null;
 *      DataRow[] arrLowRow     = null;
 *
 *      string sTopLiteral = "";
 *      string sMidLiteral = "";
 *      string sLowLiteral = "";
 *
 *      string strMenuTxt  = "";
 *      string strMenuVal  = "";
 *      string strMenuUrl  = "";
 *
 *      int cntTopRow      = arrTopRow.Length;
 *      int cntMidRow      = 0;
 *      int cntLowRow      = 0;
 *
 *      trvMenu.Nodes.Clear();
 *      trvMenu.NodeIndent = 10;
 *      //trvMenu.CollapseImageUrl = "~/images/arrow/arrow_col_01.jpg";
 *      //trvMenu.ExpandImageUrl   = "~/images/arrow/arrow_exp_01.jpg";
 *
 *      for (int i = 0; i < cntTopRow; i++)
 *      {
 *          sTopLiteral += "<img src=\"{3}\" alt=\"\" name=\"img{4}\" style=\"vertical-align:bottom; cursor:hand;\" onclick=\"location.href='{0}';\" onmouseover=\"MM_swapImage('img{1}', '', '{2}')\" onmouseout=\"MM_swapImgRestore()\" />";
 *          sTopLiteral += "&nbsp;";
 *          sTopLiteral = string.Format
 *                            (
 *                               sTopLiteral
 *                             , GetValue(arrTopRow[i]["MENU_FULL_PATH"])
 *                             , GetValue(arrTopRow[i]["MENU_PAGE_NAME"]).Substring(0, GetValue(arrTopRow[i]["MENU_PAGE_NAME"]).LastIndexOf("."))
 *                             , (strTopMenuFileName.ToUpper() == arrTopRow[i]["MENU_PAGE_NAME"].ToString()) ? GetValue(arrTopRow[i]["MENU_NAME_IMAGE_PATH"])   : GetValue(arrTopRow[i]["MENU_NAME_IMAGE_PATH_U"])
 *                             , (strTopMenuFileName.ToUpper() == arrTopRow[i]["MENU_PAGE_NAME"].ToString()) ? GetValue(arrTopRow[i]["MENU_NAME_IMAGE_PATH_U"]) : GetValue(arrTopRow[i]["MENU_NAME_IMAGE_PATH"])
 *                             , GetValue(arrTopRow[i]["MENU_PAGE_NAME"]).Substring(0, GetValue(arrTopRow[i]["MENU_PAGE_NAME"]).LastIndexOf("."))
 *
 *                            );
 *          if ((strTopMenuFileName.ToUpper() == arrTopRow[i]["MENU_PAGE_NAME"].ToString()))
 *          {
 *              leftTopTitle.ImageUrl = arrTopRow[i]["MENU_PREV_ICON_PATH"].ToString();
 *          }
 *
 *          sWhere    = "UP_MENU_ID=" + arrTopRow[i]["MENU_REF_ID"].ToString();
 *          arrMidRow = dsAuthMenu.Tables[0].Select(sWhere, "MENU_PRIORITY ASC");
 *          cntMidRow = arrMidRow.Length;
 *
 *          for (int j = 0; j < cntMidRow; j++)
 *          {
 *
 *              if (strTopMenuFileName.ToUpper().Trim() != arrTopRow[i]["MENU_PAGE_NAME"].ToString().Trim())
 *              {
 *                  break;
 *              }
 *
 *              //if (arrMidRow[j]["MENU_FULL_PATH"].ToString().Trim() == "")
 *              //{
 *              //    strMenuTxt = "<font onclick='return false;'>&nbsp;" + arrMidRow[j]["MENU_NAME"].ToString() + "</font>";
 *              //}
 *              //else
 *              //{
 *              //    strMenuTxt = "&nbsp;"+arrMidRow[j]["MENU_NAME"].ToString();
 *              //}
 *
 *              strMenuTxt = "&nbsp;"+arrMidRow[j]["MENU_NAME"].ToString();
 *              strMenuVal = arrMidRow[j]["MENU_REF_ID"].ToString();
 *
 *              TreeNode trnMenu = new TreeNode(strMenuTxt, strMenuVal);
 *              trvMenu.Nodes.Add(trnMenu);
 *              trnMenu.NavigateUrl = arrMidRow[j]["MENU_FULL_PATH"].ToString().Trim();
 *              trnMenu.SelectAction = TreeNodeSelectAction.Expand;
 *
 *              sWhere    = "UP_MENU_ID=" + arrMidRow[j]["MENU_REF_ID"].ToString();
 *              arrLowRow = dsAuthMenu.Tables[0].Select(sWhere, "MENU_PRIORITY ASC");
 *              cntLowRow = arrLowRow.Length;
 *
 *              trnMenu.Collapse();
 *              for (int k = 0; k < cntLowRow; k++)
 *              {
 *                  if (arrLowRow[k]["MENU_FULL_PATH"].ToString().Trim() == "")
 *                  {
 *                      strMenuTxt = "<font onclick='return false;'>&nbsp;" + arrLowRow[k]["MENU_NAME"].ToString() + "</font>";
 *                  }
 *                  else
 *                  {
 *                      strMenuTxt = "&nbsp;"+arrLowRow[k]["MENU_NAME"].ToString();
 *                  }
 *
 *                  strMenuVal = arrLowRow[k]["MENU_REF_ID"].ToString();
 *
 *                  TreeNode trnSub = new TreeNode(strMenuTxt, strMenuVal);
 *                  trnMenu.ChildNodes.Add(trnSub);
 *                  trnSub.ImageUrl    = "~/images/arrow/arrow_not_sel.gif";
 *                  trnSub.NavigateUrl = arrLowRow[k]["MENU_FULL_PATH"].ToString();
 *
 *
 *                  if (strCurMenuFileName == arrLowRow[k]["MENU_PAGE_NAME"].ToString().Trim().ToUpper())
 *                  {
 *                      trnSub.Parent.Expand();
 *                      trnSub.Select();
 *                      trnSub.Text     = "<font color=\"red\">"+strMenuTxt+"</font>";
 *                      trnSub.ImageUrl = "~/images/arrow/arrow_sel.gif";
 *                  }
 *              }
 *          }
 *              }
 *
 *              ltrTopMenu.Text = sTopLiteral;
 *      lblTitle.Text = strAllMenuPathName;
 *
 *      if (strUseLeftMenuPage == "N")
 *      {
 *          this.tdMenu_Left.Visible     = false;
 *          this.tdMenu_Contents.Width   = "100%";
 *          this.tdMenu_Contents.ColSpan = 2;
 *      }
 *  }
 */

    /// <summary>
    /// 08.03.19 - 류승태
    /// 탑메뉴만 있음
    /// </summary>
    private void SetMenu()
    {
        string sUrl = HttpContext.Current.Request.Url.PathAndQuery;

        Biz_lib_MenuControl biz = new Biz_lib_MenuControl();

        DataSet dsAuthTop = biz.GetAuthTopMenu(gUserInfo.Emp_Ref_ID.ToString());

        int iTopMenuID = GetTopMenuRefID(sUrl);

        if (iTopMenuID == 0 && Request.Url.AbsolutePath.IndexOf("NHIT_Main_Screen") > 0)
        {
            iTopMenuID = GetTopMenuRefID("/DASHBOARD/NHIT_MAIN_1280.ASPX");
        }

        DataSet dsSubMenu = GetSubMenuDs(iTopMenuID.ToString());

        #region TopMenu 설정
        string sTopLiteral = "";
        int    iTmp        = 0;

        sTopLiteral += "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">    \n";
        sTopLiteral += "    <tr>    \n";

        foreach (DataRow drRow in dsAuthTop.Tables[0].Rows)
        {
            if (GetValue(drRow["MENU_NAME_IMAGE_PATH"]).ToUpper().IndexOf("MENU_04") > -1)
            {
                //경영실적의 경우 탑메뉴에서 분리
                this.lnkChartPage.Visible = true;
                this.lnkChartPage.Attributes.Add("onclick", string.Format("location.href='{0}'", GetValue(drRow["MENU_FULL_PATH"])));
                if (iTopMenuID == Convert.ToInt32(drRow["MENU_REF_ID"]))
                {
                    leftTopTitle.ImageUrl = GetValue(drRow["MENU_PREV_ICON_PATH"]);
                }
            }
            else
            {
                if (iTmp > 0)
                {
                    sTopLiteral += "<td><img src=\"../images/NHIT/Menu_col.gif\" width=\"2\"></td>          ";//대메뉴 사이 공백
                }
                sTopLiteral += "<td style=\"vertical-align:bottom;\"";
                //sTopLiteral += "<td style=\"cursor:hand\"               ";
                //sTopLiteral += "                                    onmouseout=\"MM_swapImgRestore()\"              ";
                //sTopLiteral += "                                    onmouseover=\"MM_swapImage('img{1}', '', '{2}')\"   ";//;mfLeftTopTitle('{5}')
                sTopLiteral += "            ><a href='#null' onfocus='this.blur();' onclick=\"location.href='{0}'\"><img src=\"{3}\" name=\"img{4}\" border='0'></a></td>                        ";

                sTopLiteral = string.Format(
                    sTopLiteral
                    , GetValue(drRow["MENU_FULL_PATH"])
                    , GetValue(drRow["MENU_PAGE_NAME"]).Substring(0, GetValue(drRow["MENU_PAGE_NAME"]).LastIndexOf("."))
                    , (iTopMenuID == Convert.ToInt32(drRow["MENU_REF_ID"]) ? GetValue(drRow["MENU_NAME_IMAGE_PATH"]) : GetValue(drRow["MENU_NAME_IMAGE_PATH_U"]))
                    , (iTopMenuID == Convert.ToInt32(drRow["MENU_REF_ID"]) ? GetValue(drRow["MENU_NAME_IMAGE_PATH_U"]) : GetValue(drRow["MENU_NAME_IMAGE_PATH"]))
                    , GetValue(drRow["MENU_PAGE_NAME"]).Substring(0, GetValue(drRow["MENU_PAGE_NAME"]).LastIndexOf("."))
                    , GetValue(drRow["MENU_PREV_ICON_PATH"])
                    );

                if (iTopMenuID == Convert.ToInt32(drRow["MENU_REF_ID"]))
                {
                    leftTopTitle.ImageUrl = GetValue(drRow["MENU_PREV_ICON_PATH"]);
                }

                iTmp++;
            }
        }

        sTopLiteral += "    </tr>   \n";
        sTopLiteral += "</table>    \n";

        ltrTopMenu.Text = sTopLiteral;
        #endregion
    }