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


C# ClsBAL.GetPerByUser方法代码示例

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


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

示例1: CheckPermission

 protected void CheckPermission()
 {
     try
     {
         ClsBAL objBAL = new ClsBAL();
         objBAL.ID = Convert.ToInt32(Session["UserID"]);
         objBAL.screenName = "Recharge Status";
         _objDataSet = (DataSet)objBAL.GetPerByUser();
         if (_objDataSet != null)
         {
             if (_objDataSet.Tables[0].Rows.Count > 0)
             {
                 ViewState["UserPermissions"] = _objDataSet.Tables[0];
                 ViewState["Book"] = _objDataSet.Tables[0].Rows[0]["Book"].ToString();
             }
             else
             {
                 ViewState["UserPermissions"] = null;
             }
         }
         else
         {
             ViewState["UserPermissions"] = null;
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:30,代码来源:RechargeStatus.aspx.cs

示例2: CheckPermission

    protected void CheckPermission(string pageName, string role)
    {
        try
        {
            pnlMain.Visible = true;
            tdmsg.Style.Add("background-color:#E77471;", "");
            lblMainMsg.Text = " No Permission to this page. Please contact Administrator for further details.";
            lblMainMsg.ForeColor = System.Drawing.Color.Maroon;
            tdmsg.Visible = false;
            if (role == "CSE")
            {
                tdmsg.Visible = true;
                tdmsg.Style.Add("background-color:#E77471;", "");
                pnlMain.Visible = false;

                ClsBAL objBAL = new ClsBAL();
                objBAL.ID = Convert.ToInt32(Session["UserID"]);
                objBAL.screenName = pageName;
                DataSet objDataSet = (DataSet)objBAL.GetPerByUser();
                if (objDataSet != null)
                {
                    if (objDataSet.Tables[0].Rows.Count > 0)
                    {
                        ViewState["UserPermissions"] = objDataSet.Tables[0];
                        ViewState["Book"] = objDataSet.Tables[0].Rows[0]["Book"].ToString();
                    }
                    else { ViewState["UserPermissions"] = null; }
                }
                else { ViewState["UserPermissions"] = null; }

                if (ViewState["UserPermissions"] != null)
                {
                    if (ViewState["Book"] != null)
                    {
                        if (ViewState["Book"].ToString() == "1")
                        {
                            pnlMain.Visible = true;
                            tdmsg.Visible = false;
                        }
                    }
                }
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:48,代码来源:Rating.aspx.cs

示例3: CheckPermission

    protected void CheckPermission(string pageName, string role)
    {
        try
        {
            tblmain.Visible = true;
            tdmsg.Visible = false;
            if (role == "CSE")
            {
                tdmsg.Visible = true;
                tdmsg.Style.Add("background-color:#E77471;", "");
                tblmain.Visible = false;

                ClsBAL objBAL = new ClsBAL();
                objBAL.ID = Convert.ToInt32(Session["UserID"]);
                objBAL.screenName = pageName;
                DataSet objDataSet = (DataSet)objBAL.GetPerByUser();
                if (objDataSet != null)
                {
                    if (objDataSet.Tables[0].Rows.Count > 0)
                    {
                        ViewState["UserPermissions"] = objDataSet.Tables[0];
                        ViewState["Book"] = objDataSet.Tables[0].Rows[0]["Book"].ToString();
                    }
                    else { ViewState["UserPermissions"] = null; }
                }
                else { ViewState["UserPermissions"] = null; }

                if (ViewState["UserPermissions"] != null)
                {
                    if (ViewState["Book"] != null)
                    {
                        if (ViewState["Book"].ToString() == "1")
                        {
                            tblmain.Visible = true;
                            tdmsg.Visible = false;
                        }
                    }
                }
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:45,代码来源:ChangePassword.aspx.cs

示例4: CheckPermission

    protected void CheckPermission()
    {
        try
        {
            objBAL = new ClsBAL();
            objBAL.ID = Convert.ToInt32(Session["UserID"]);
            objBAL.screenName = "Commission";
            ObjDataset = (DataSet)objBAL.GetPerByUser();
            if (ObjDataset != null)
            {
                if (ObjDataset.Tables[0].Rows.Count > 0)
                {
                    ViewState["UserPermissions"] = ObjDataset.Tables[0];
                    ViewState["AddCom"] = ObjDataset.Tables[0].Rows[0]["Add"].ToString();
                    ViewState["ViewCom"] = ObjDataset.Tables[0].Rows[0]["View"].ToString();
                    ViewState["DeleteCom"] = ObjDataset.Tables[0].Rows[0]["Delete"].ToString();
                    ViewState["EditCom"] = ObjDataset.Tables[0].Rows[0]["Edit"].ToString();

                }
                else
                {
                    ViewState["UserPermissions"] = null;
                }
            }
            else
            {
                ViewState["UserPermissions"] = null;
            }
        }
        catch (Exception ex)
        {

            throw ex;
        }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:35,代码来源:Commission.aspx.cs


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