using System; using System.Data; using System.Text; using Swift.DAL.BL.System.UserManagement; using Swift.DAL.SwiftDAL; using Swift.web.Library; namespace Swift.web.SwiftSystem.UserManagement.AdminUserSetup { public partial class UserFunction : System.Web.UI.Page { private const string ViewFunctionId = "10101300"; private readonly SwiftLibrary _sl = new SwiftLibrary(); protected void Page_PreInit(object sender, EventArgs e) { //MasterPageFile = GetMode().ToString() != "1" ? "~/Swift.Master" : "~/ProjectMaster.Master"; } protected void Page_Load(object sender, EventArgs e) { Authenticate(); if (!IsPostBack) { //LoadTab(); LoadGrid(); } } //private void LoadTab() //{ // pnlBreadCrumb.Visible = GetMode() != 1; //} protected string GetUserName() { return GetStatic.ReadQueryString("userName", ""); } private void Authenticate() { _sl.CheckAuthentication(ViewFunctionId); btnSave.Visible = _sl.HasRight(ViewFunctionId); } public void LoadGrid() { string userId = GetStatic.ReadQueryString("userId", ""); var roleDao = new ApplicationRoleDao(); DataTable dt = roleDao.GetUserFunctionList(userId, GetStatic.GetUser()); if (dt.Rows.Count == 0) { rpt_grid.InnerHtml = "
" + dc.ColumnName + " | "); } str.Append("
---|
" + dr[dc.ColumnName] + " | "); } str.Append("