private void CheckPermission(int adminId) { string action = System.IO.Path.GetFileName(Page.Request.FilePath).ToLower(); if (action != Constant.ADM_MANAGEMENT_PAGE.ToLower()) { AssignFunctionRepository repo = new AssignFunctionRepository(); if (!repo.CheckPermission(adminId, action)) { Response.Redirect("~/Administrator/AdministratorPanel.aspx"); } } }
private void CheckPermission(int adminId) { string action = System.IO.Path.GetFileName(Page.Request.FilePath).ToLower(); if (String.Equals(action, "customerspage.aspx")) { action = "customermanagement.aspx"; } else if (String.Equals(action, "salesmenpage.aspx")) { action = "salesmanmanagement.aspx"; } if (action != Constant.ADM_MANAGEMENT_PAGE.ToLower()) { AssignFunctionRepository repo = new AssignFunctionRepository(); if (!repo.CheckPermission(adminId, action)) { Response.Redirect("~/Administrator/AdministratorPanel.aspx"); } } }