本文整理汇总了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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}