本文整理汇总了C#中BAL.ClsBAL.GetScreens方法的典型用法代码示例。如果您正苦于以下问题:C# ClsBAL.GetScreens方法的具体用法?C# ClsBAL.GetScreens怎么用?C# ClsBAL.GetScreens使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BAL.ClsBAL
的用法示例。
在下文中一共展示了ClsBAL.GetScreens方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ddlservice_SelectedIndexChanged
//protected void GvPermissions_RowDataBound(object sender, GridViewRowEventArgs e)
//{
// if (e.Row.RowType == DataControlRowType.DataRow)
// {
// Label lblScreenID1 = (Label)e.Row.FindControl("lblScreenID");
// Label lblScreenName1 = (Label)e.Row.FindControl("lblScreenName");
// CheckBox ChkAdd1 = (CheckBox)e.Row.FindControl("ChkAdd");
// }
//}
protected void ddlservice_SelectedIndexChanged(object sender, EventArgs e)
{
objBAL = new ClsBAL();
if (ddlservice.SelectedValue == "ALL")
{
ObjDataset = objBAL.GetScreens();
if (ObjDataset != null)
{
if (ObjDataset.Tables.Count > 0)
{
if (ObjDataset.Tables[0].Rows.Count > 0)
{
GvPermissions.DataSource = ObjDataset.Tables[0];
GvPermissions.DataBind();
MVUsers.ActiveViewIndex = 2;
}
}
}
}
else
{
ObjDataset = objBAL.getscreenbyservice(ddlservice.SelectedValue);
if (ObjDataset != null)
{
if (ObjDataset.Tables.Count > 0)
{
if (ObjDataset.Tables[0].Rows.Count > 0)
{
GvPermissions.DataSource = ObjDataset.Tables[0];
GvPermissions.DataBind();
MVUsers.ActiveViewIndex = 2;
}
}
}
}
}
示例2: GvUsers_RowCommand
//.........这里部分代码省略.........
tdmsg.Visible = true;
// tdmsg.Style.Add("background-color:#E77471;", "");
lblMainMsg.Text = "OOPS...Failed to Delete user setails....";
lblMainMsg.ForeColor = System.Drawing.Color.Maroon;
}
//}
//else
//{
// tdmsg.Visible = true;
// tdmsg.Style.Add("background-color:#E77471;", "");
// lblMainMsg.Text = " No Permission to delete Users.Please Contact Administrator for further details...";
// lblMainMsg.ForeColor = System.Drawing.Color.Maroon;
// MVUsers.ActiveViewIndex = 0;
// MVUsers.Visible = true;
//}
// }
}
catch (Exception ex)
{
objBAL.Logerror(this.Page.ToString(), "GvUsers_RowCommand_Remove", ex.Message.ToString(), Convert.ToString(ex.InnerException), Convert.ToString(Request.UserHostAddress.ToString()), DateTime.Now);
throw;
}
}
if (e.CommandName == "Permissions")
{
tdmsg.Visible = false;
lblMainMsg.Text = "";
try
{
GridViewRow gRow = (GridViewRow)(((Button)e.CommandSource).NamingContainer);
Label lblUserName1 = (Label)gRow.FindControl("lblUserName");
Label lblName1 = (Label)gRow.FindControl("lblName");
Label lblRole1 = (Label)gRow.FindControl("lblRole");
Label lblID1 = (Label)gRow.FindControl("lblID");
Label lblPassword1 = (Label)gRow.FindControl("lblPassword");
lblRolePer.Text = lblRole1.Text;
lblUserNamePer.Text = lblUserName1.Text;
lblUserID.Text = lblID1.Text;
objBAL = new ClsBAL();
objBAL.ID = Convert.ToInt32(lblID1.Text);
ObjDataset = (DataSet)objBAL.GetScreens();
if (ObjDataset != null)
{
if (ObjDataset.Tables[0].Rows.Count > 0)
{
ViewState["Screens"] = ObjDataset.Tables[0];
ObjDataset1 = (DataSet)objBAL.GetUserPermissions();
if (ObjDataset1 != null)
{
ViewState["Permissions"] = ObjDataset1.Tables[0];
}
GvPermissions.DataSource = ObjDataset.Tables[0];
GvPermissions.DataBind();
MVUsers.ActiveViewIndex = 2;
}
else
{
ViewState["Permissions"] = null;
objBAL = new ClsBAL();
ObjDataset1 = (DataSet)objBAL.GetScreens();
if (ObjDataset1 != null)
{
GvPermissions.DataSource = ObjDataset1.Tables[0];
GvPermissions.DataBind();
MVUsers.ActiveViewIndex = 2;
}
}
}
else
{
ViewState["Permissions"] = null;
objBAL = new ClsBAL();
ObjDataset1 = (DataSet)objBAL.GetScreens();
if (ObjDataset1 != null)
{
GvPermissions.DataSource = ObjDataset1.Tables[0];
GvPermissions.DataBind();
MVUsers.ActiveViewIndex = 2;
}
}
}
catch (Exception ex)
{
objBAL.Logerror(this.Page.ToString(), "GvUsers_RowCommand_Permissions", ex.Message.ToString(), Convert.ToString(ex.InnerException), Convert.ToString(Request.UserHostAddress.ToString()), DateTime.Now);
throw;
}
finally
{
if (ObjDataset != null) { ObjDataset = null; }
if (ObjDataset1 != null) { ObjDataset1 = null; }
if (ObjDatatable != null) { ObjDatatable = null; }
if (ObjDataview != null) { ObjDataview = null; }
}
}
}