当前位置: 首页>>代码示例>>C#>>正文


C# User.GetRight方法代码示例

本文整理汇总了C#中User.GetRight方法的典型用法代码示例。如果您正苦于以下问题:C# User.GetRight方法的具体用法?C# User.GetRight怎么用?C# User.GetRight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在User的用法示例。


在下文中一共展示了User.GetRight方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "82", this.Page);//頁面按鈕權限管控
                    }

                    if (Request["KeyValue"] != null)
                    {
                        string strKeyValue = Request["KeyValue"].ToString().Trim();
                        lblFlag.Text = strKeyValue;
                        Select("", "", "", "","");
                    }
                    if (Request["SearchKey"] != null)
                    {
                        string strSearchValue = Request["SearchKey"].ToString().Trim();
                        string[] ArrKeyValue = strSearchValue.Split('=');
                        Select(ArrKeyValue[0].Trim().ToString(), ArrKeyValue[1].Trim().ToString(), ArrKeyValue[2].Trim().ToString()
                            , ArrKeyValue[3].Trim(),ArrKeyValue[4].Trim());
                    }
                    else
                    {
                        Select("", "", "", "","");
                    }
                }
            }
            catch
            { }
        }
开发者ID:JohnToCoder,项目名称:ThreeNetTwo,代码行数:35,代码来源:Sys_VersionInfo.aspx.cs

示例2: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            strBasePath = Request.PhysicalApplicationPath;
            if (!IsPostBack)
            {
                try
                {
                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "21", this.Page);//頁面按鈕權限管控
                    }

                    //if(Session[""])
                    //{
                    //判斷是否是修改動作 Edit By Tanyi 2011.3.16
                    if (Request["KeyValue"] != null)
                    {
                        if (Request["strIndex"] != null)
                        {
                            string s = Request["strIndex"].ToString();
                        }
                        string strKeyValue = Request["KeyValue"].ToString().Trim();
                        lblFlag.Text = strKeyValue;
                        if (Request["strIndex"] != null && Request["strIndex"].ToString() != "")
                        {
                            string strIndex = Request["strIndex"];
                            Gv_Movie.PageIndex = Convert.ToInt32(strIndex);
                            txtPageIndex.Text = Gv_Movie.PageIndex.ToString();
                        }
                        BindMovie();
                    }
                    //當是查詢時 Edit By Tanyi 2011.3.16
                    else if (Request["SearchKey"] != null)
                    {
                        string strSearchValue = Request["SearchKey"].ToString().Trim();
                        string[] ArrKeyValue = strSearchValue.Split('=');
                        DataSearchBind(ArrKeyValue[0].Trim().ToString(), ArrKeyValue[1].Trim().ToString(), ArrKeyValue[2].Trim().ToString(), ArrKeyValue[3].Trim().ToString(), ArrKeyValue[4].Trim(), ArrKeyValue[5].Trim());
                    }
                    else
                    {
                        BindMovie();
                    }
                    //}
                    //else
                    //{

                    //}
                }
                catch
                {

                }
            }
        }
开发者ID:JohnToCoder,项目名称:ThreeNetTwo,代码行数:56,代码来源:MD_Movie.aspx.cs

示例3: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "31", this.Page);//頁面按鈕權限管控
                    }
                    //新增,修改后結果展示
                    if (Request["KeyValue"] != null)
                    {
                        string strKeyValue = Request["KeyValue"].ToString().Trim();
                        lblFlag.Text = strKeyValue;

                        //修改后設置頁碼索引
                        if (Request["strIndex"] != null && Request["strIndex"].ToString() != "")
                        {
                            string strIndex = Request["strIndex"];
                            Gv_Album.PageIndex = Convert.ToInt32(strIndex);
                            //保存當前索引
                            txtPageIndex.Text = Gv_Album.PageIndex.ToString();
                        }

                        GvAlbumBind();

                    }
                    //查詢結果展示
                    else if (Request["SearchKey"] != null)
                    {
                        string strSearchValue = Request["SearchKey"].ToString().Trim();
                        string[] ArrKeyValue = strSearchValue.Split('=');
                        DataSearchBind(ArrKeyValue[0].Trim().ToString(), ArrKeyValue[1].Trim().ToString(), ArrKeyValue[2].Trim().ToString(), ArrKeyValue[3].Trim().ToString(), ArrKeyValue[4].Trim(), ArrKeyValue[5].Trim());
                    }
                    else
                    {
                        //從Detail頁面返回時設置頁碼索引值
                        if (Request["strPIndex"] != null && Request["strPIndex"].ToString() != "")
                        {
                            string strPIndex = Request["strPIndex"];
                            Gv_Album.PageIndex = Convert.ToInt32(strPIndex);
                            //保存當前索引
                            txtPageIndex.Text = Gv_Album.PageIndex.ToString();
                        }
                        GvAlbumBind();
                    }
                }
            }
            catch
            {

            }
        }
开发者ID:JohnToCoder,项目名称:ThreeNetTwo,代码行数:56,代码来源:MD_Album.aspx.cs

示例4: Page_Load

        //string strBasePath = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            //strBasePath = Request.PhysicalApplicationPath;
            if (!IsPostBack)
            {
                try
                {
                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "22", this.Page);//頁面按鈕權限管控
                    }

                    //判斷是否為修改動作
                     if (Request["KeyValue"] != null)
                     {
                         string strKeyValue = Request["KeyValue"].ToString().Trim();
                         lblFlag.Text = strKeyValue;

                         if (Request["strIndex"] != null && Request["strIndex"].ToString() != "")
                         {
                             string strIndex = Request["strIndex"];
                             Gv_TVPlay.PageIndex = Convert.ToInt32(strIndex);
                             //保存當前索引
                             txtPageIndex.Text = Gv_TVPlay.PageIndex.ToString();
                         }
                         GvTVPlayBind();
                     }
                       //查詢動作
                      else if(Request["SearchKey"]!=null)
                     {

                         string strSearchValue = Request["SearchKey"].ToString().Trim();
                         string[] ArrKeyValue = strSearchValue.Split('=');
                         DataSearchBind(ArrKeyValue[0].Trim().ToString(), ArrKeyValue[1].Trim().ToString(), ArrKeyValue[2].Trim().ToString(), ArrKeyValue[3].Trim().ToString(), ArrKeyValue[4].Trim(), ArrKeyValue[5].Trim());

                      }
                     else {
                             //從Detail頁面返回時設置頁碼索引值
                             if (Request["strPIndex"] != null && Request["strPIndex"].ToString() != "")
                             {
                                 string strPIndex = Request["strPIndex"];
                                 Gv_TVPlay.PageIndex = Convert.ToInt32(strPIndex);

                                 //保存當前頁碼
                                 txtPageIndex.Text = Gv_TVPlay.PageIndex.ToString();
                             }
                              GvTVPlayBind();
                         }
                }

                catch { }
            }
        }
开发者ID:JohnToCoder,项目名称:ThreeNetTwo,代码行数:56,代码来源:MD_TVPlay.aspx.cs

示例5: Page_Load

        /// <summary> 
        /// 函數名:Page_Load
        /// 函數功能:加載
        /// 開發者: 劉鋒
        /// 開發日期:2011-03-11
        /// 修改者:
        /// 修改日期:
        /// </summary>
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "11", this.Page);//頁面按鈕權限管控
                    }

                    //BindArea();
                    //BindType();
                    if (Request["KeyValue"] != null)
                    {
                        string strKeyValue = Request["KeyValue"].ToString().Trim();
                        lblFlag.Text = strKeyValue;

                        if (Request["strIndex"] != null && Request["strIndex"].ToString() != "")
                        {
                            string strIndex = Request["strIndex"];
                            gdvCurrent.PageIndex = Convert.ToInt32(strIndex);
                        }

                        txtPageIndex.Text = gdvCurrent.PageIndex.ToString();

                        Select("", "", "", "", "", "", "");
                    }
                    else if (Request["SearchKey"] != null)
                    {
                        string strSearchValue = Request["SearchKey"].ToString().Trim();
                        string[] ArrKeyValue = strSearchValue.Split('=');
                        Select(ArrKeyValue[0].Trim().ToString(), "", ArrKeyValue[1].Trim().ToString(), ArrKeyValue[2].Trim().ToString()
                            , "", ArrKeyValue[3].Trim(), ArrKeyValue[4].Trim());
                    }
                    else
                    {
                        //從Detail頁面返回時設置頁碼索引值
                        if (Request["strPIndex"] != null && Request["strPIndex"].ToString() != "")
                        {
                            string strPIndex = Request["strPIndex"];
                            gdvCurrent.PageIndex = Convert.ToInt32(strPIndex);

                            //保存當前頁碼
                            txtPageIndex.Text = gdvCurrent.PageIndex.ToString();
                        }
                        Select("", "", "", "", "", "", "");
                    }
                }
            }
            catch
            { }
        }
开发者ID:JohnToCoder,项目名称:ThreeNetTwo,代码行数:63,代码来源:MD_Channel.aspx.cs

示例6: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["User"] != null)
         {
             User objUser = new User();
             objUser = Session["User"] as User;
             objUser.GetRight(objUser.RoleCode, "88", this.Page);//頁面按鈕權限管控
         }
         BindError();
     }
 }
开发者ID:JohnToCoder,项目名称:ThreeNetTwo,代码行数:13,代码来源:Sys_UpdataError.aspx.cs

示例7: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                try
                {
                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "83", this.Page);//頁面按鈕權限管控
                    }

                    if (Request["KeyValue"] == null)
                    {
                        Databind("", "", "", "", "");
                    }
                    else
                    {
                        string strKeyValue = Request["KeyValue"].ToString().Trim();
                        string[] ArrKeyValue = strKeyValue.Split('=');

                        string strMac = "";
                        string strMeno = "";
                        string strId = "";
                        string strVerName = "";
                        string strVerDesc = "";

                        if (ArrKeyValue.Length != 1)
                        {
                            strMac = ArrKeyValue[0];
                            strMeno = ArrKeyValue[1];
                            strId = ArrKeyValue[2];
                            strVerName = ArrKeyValue[3];
                            strVerDesc = ArrKeyValue[4];
                        }

                        Databind(strMac, strMeno, strId, strVerName, strVerDesc);
                    }
                }
                catch
                {

                }
            }
        }
开发者ID:JohnToCoder,项目名称:ThreeNetTwo,代码行数:46,代码来源:Sys_ClientVersion.aspx.cs

示例8: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                try
                {
                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "72", this.Page);//頁面按鈕權限管控
                    }

                    if (Request["KeyValue"] == null)
                    {
                        databind("", "");
                    }

                    else
                    {
                        string strKeyValue = Request["KeyValue"].ToString().Trim();
                        string[] ArrKeyValue = strKeyValue.Split('=');

                        string strRole = "";
                        string strDesc = "";
                        if (ArrKeyValue.Length != 1)
                        {
                            strRole = ArrKeyValue[0];
                            strDesc = ArrKeyValue[1];
                        }

                        databind(strRole, strDesc);
                        txtSuccess.Text = strKeyValue;
                    }

                    txtKeyValue.Text = "Role";
                }
                catch
                {

                }
            }
        }
开发者ID:JohnToCoder,项目名称:ThreeNetTwo,代码行数:43,代码来源:Sys_Roles.aspx.cs

示例9: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["User"] != null)
                {
                    User objUser = new User();
                    objUser = Session["User"] as User;
                    objUser.GetRight(objUser.RoleCode, "33", this.Page);//頁面按鈕權限管控
                }

                if (Request["SearchKey"] != null)
                {
                    string strSearchValue = Request["SearchKey"].ToString().Trim();
                    string[] ArrKeyValue = strSearchValue.Split('=');
                    DateSearchBindForMyMusic(ArrKeyValue[0].Trim().ToString(), ArrKeyValue[1].Trim().ToString(), ArrKeyValue[2].Trim().ToString(), ArrKeyValue[3].Trim().ToString(), ArrKeyValue[4].Trim(),ArrKeyValue[5].Trim().ToString());
                }
                else
                {
                    GvMyMusicBind();
                }
            }
        }
开发者ID:JohnToCoder,项目名称:ThreeNetTwo,代码行数:23,代码来源:MD_MyMusic.aspx.cs

示例10: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                try
                {
                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "84", this.Page);//頁面按鈕權限管控
                    }

                    if (Request["KeyValue"] != null)
                    {
                        string strKeyValue = Request["KeyValue"].ToString().Trim();
                        string[] arrKeyValue = strKeyValue.Split('=');

                        if (arrKeyValue.Length == 1)
                        {
                            GvDataLogBind();
                        }
                        else
                        {
                            GvDataLogSearchBind(arrKeyValue[0].Trim(), arrKeyValue[1].Trim(), arrKeyValue[2].Trim(), arrKeyValue[3].Trim(), arrKeyValue[4].Trim(), arrKeyValue[5].Trim(), arrKeyValue[6].Trim(),arrKeyValue[7].Trim());
                        }
                    }
                    else
                    {
                        GvDataLogBind();
                    }
                }
                catch
                { }
            }
        }
开发者ID:JohnToCoder,项目名称:ThreeNetTwo,代码行数:36,代码来源:Sys_LoadDataLog.aspx.cs

示例11: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    if (Request["strID"] != null)
                    {
                        txtID.Text = Request["strID"].ToString();
                    }
                    //記錄父頁面的索引值以備返回時使用
                    if (Request["pageIndex"] != null)
                    {
                        txtParentIndex.Text = Request["pageIndex"].ToString();
                        Session["ParentIndex"] = txtParentIndex.Text;
                    }

                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "31", this.Page);//頁面按鈕權限管控
                    }
                    //修改,刪除數據動作后執行
                    if (Request["KeyValue"] != null)
                    {
                        //獲取專輯ID
                        string strID = Request["AlbumID"].ToString();
                        txtID.Text = strID;
                        string strKeyValue = Request["KeyValue"].ToString().Trim();
                        lblFlag.Text = strKeyValue;

                        //修改動作后設置本頁面頁碼
                        if (Request["strIndex"] != null && Request["strIndex"].ToString() != "")
                        {
                            string strIndex = Request["strIndex"];
                            Gv_Music.PageIndex = Convert.ToInt32(strIndex);

                            txtPageIndex.Text = Gv_Music.PageIndex.ToString();
                        }
                        //綁定修改后信息
                        GvMusicBind(strID);
                        txtParentIndex.Text = Session["ParentIndex"].ToString();
                    }

                    //查詢動作信息綁定
                    else if (Request["SearchKey"] != null)
                    {
                        string strSearchValue = Request["SearchKey"].ToString().Trim();
                        string[] ArrKeyValue = strSearchValue.Split('=');
                        DataSearchBind(ArrKeyValue[0].Trim().ToString(), ArrKeyValue[1].Trim().ToString(), ArrKeyValue[2].Trim().ToString(), ArrKeyValue[3].Trim().ToString(), ArrKeyValue[4].Trim(), ArrKeyValue[5].Trim(), ArrKeyValue[6].Trim());
                        txtID.Text = ArrKeyValue[1].Trim().ToString();
                    }
                    else
                    {
                        string strID = Request["strID"].ToString();
                        GvMusicBind(strID);
                    }
                }
            }
            catch
            {

            }
        }
开发者ID:JohnToCoder,项目名称:ThreeNetTwo,代码行数:65,代码来源:MD_Music.aspx.cs

示例12: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "41", this.Page);//頁面按鈕權限管控
                    }

                    //回傳Key:
                    //若是查詢時標示為SearchKey,且后接查詢參數值
                    //若是其他的動作則為KeyValue,如Add,Delete,Update操作
                    if (Request["SearchKey"] != null){
                        string [] paras = Request["SearchKey"].Split('=');
                        GvPhotoBind(paras);
                    }else{
                        lblFlag.Text = Request["KeyValue"];
                        GvPhotoBind();
                    }
                }
            }
            catch
            {
            }
        }
开发者ID:JohnToCoder,项目名称:ThreeNetTwo,代码行数:29,代码来源:MD_Photos.aspx.cs

示例13: Page_Load

        /// <summary>
        /// 函數功能:加載
        /// 開發者: 劉鋒
        /// 開發日期:2011-04-06        
        /// </summary>
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "31", this.Page);//頁面按鈕權限管控
                    }

                    //記錄父頁面的頁碼索引值以備返回時使用
                    if (Request["pageIndex"] != null)
                    {
                        txtParentIndex.Text = Request["pageIndex"].ToString();
                        Session["ParentIndex"] = txtParentIndex.Text;
                    }

                    if (Request["SearchKey"] != null)
                    {
                        string strSearchValue = Request["SearchKey"].ToString().Trim();
                        string[] ArrKeyValue = strSearchValue.Split('=');
                        SelectMore(ArrKeyValue[0], ArrKeyValue[1],ArrKeyValue[2]);

                        txtID.Text = ArrKeyValue[0].Trim().ToString();

                        txtParentIndex.Text = Session["ParentIndex"].ToString();
                    }
                    else if (Request["KeyValue"] != null)
                    {
                        string strKeyValue = Request["KeyValue"].ToString().Trim();
                        lblFlag.Text = strKeyValue;

                        string channelid=Request["ChannelID"].ToString().Trim();

                        if (Request["PlayingDate"] != null)
                        {
                            string playingDate = Request["PlayingDate"].ToString();
                            SelectMore(channelid, "", playingDate);
                        }
                        else
                        {
                            Select(channelid);
                        }

                        txtID.Text = channelid;

                        txtParentIndex.Text = Session["ParentIndex"].ToString();

                        //txtPageIndex.Text = gdvCurrent.PageIndex.ToString();
                    }
                    else if (Request["strID"].ToString() != null)
                    {
                        string strID = Request["strID"].ToString();
                        Select(strID);

                        txtID.Text = strID;
                    }
                }
            }
            catch
            { }
        }
开发者ID:JohnToCoder,项目名称:ThreeNetTwo,代码行数:70,代码来源:MD_ChannelMoreInfo.aspx.cs

示例14: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["User"] != null)
                {
                    User objUser = new User();
                    objUser = Session["User"] as User;
                    objUser.GetRight(objUser.RoleCode, "42", this.Page);//頁面按鈕權限管控
                }

                if (Request["SearchKey"] != null)
                {
                    string[] paras = Request["SearchKey"].Split('=');
                    GvMyPhotoBind(paras);
                }
                else
                {
                    GvMyPhotoBind();
                }
            }
        }
开发者ID:JohnToCoder,项目名称:ThreeNetTwo,代码行数:22,代码来源:MD_MyPhotos.aspx.cs

示例15: Page_Load

        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

                try
                {
                    if (Session["User"] != null)
                    {
                        User objUser = new User();
                        objUser = Session["User"] as User;
                        objUser.GetRight(objUser.RoleCode, "81", this.Page);//頁面按鈕權限管控
                    }

                    if (Request["KeyValue"] == null)
                    {
                        DataBind("", "","","","","","","","","","");
                    }

                    else
                    {
                        string strKeyValue = Request["KeyValue"].ToString().Trim();
                        string[] ArrKeyValue = strKeyValue.Split('=');

                        string strMac = "";
                        string strMeno = "";
                        string strName = "";
                        string strTel = "";
                        string strMobile = "";
                        string strRole = "";
                        string strUserId = "";
                        string strSex = "";
                        string strBirthDay = "";
                        string strEmail = "";
                        string strAddress = "";

                        if (ArrKeyValue.Length != 1)
                        {
                            strMac = ArrKeyValue[0];
                            strMeno = ArrKeyValue[1];
                            strName = ArrKeyValue[2];
                            strTel = ArrKeyValue[3];
                            strMobile = ArrKeyValue[4];
                            strRole = ArrKeyValue[5];
                            strUserId = ArrKeyValue[6];
                            strSex = ArrKeyValue[7];
                            strBirthDay = ArrKeyValue[8];
                            strEmail = ArrKeyValue[9];
                            strAddress = ArrKeyValue[10];
                        }

                        DataBind(strMac, strMeno,strName,strTel,strMobile,strRole,strUserId,strSex,strBirthDay,strEmail,strAddress);
                        txtSuccess.Text = strKeyValue;
                    }
                    txtKeyValue.Text = "Mac";
                }
                catch
                {

                }
            }
        }
开发者ID:JohnToCoder,项目名称:ThreeNetTwo,代码行数:67,代码来源:Sys_Mac.aspx.cs


注:本文中的User.GetRight方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。