1、用户导入;
2、用户角色支持多个; 3、单位资质;
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
////权限按钮方法
|
||||
@@ -39,14 +39,20 @@
|
||||
{
|
||||
string strSql = @"SELECT Roles.RoleId,Roles.RoleName,Roles.RoleCode,Roles.Def,Roles.IsSystemBuilt,IsAuditFlow"
|
||||
+ @" ,(CASE WHEN IsOffice=1 THEN '本部角色' ELSE '项目角色' END) AS IsOfficeName"
|
||||
+ @" FROM dbo.Sys_Role AS Roles "
|
||||
+ @" FROM dbo.Sys_Role AS Roles "
|
||||
+ @" WHERE 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(this.txtRoleName.Text.Trim()))
|
||||
{
|
||||
strSql += " AND RoleName LIKE @RoleName";
|
||||
listStr.Add(new SqlParameter("@RoleName", "%" + this.txtRoleName.Text.Trim() + "%"));
|
||||
}
|
||||
}
|
||||
var roleType = this.dpRoleType.SelectedValue;
|
||||
if (!string.IsNullOrWhiteSpace(roleType))
|
||||
{
|
||||
strSql += " AND IsOffice = @RoleType";
|
||||
listStr.Add(new SqlParameter("@RoleType", roleType));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
@@ -55,7 +61,7 @@
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
|
||||
#region 删除数据
|
||||
/// <summary>
|
||||
/// 右键删除事件
|
||||
@@ -84,7 +90,7 @@
|
||||
{
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, roles.RoleCode, roles.RoleId, Const.RoleMenuId, Const.BtnDelete);
|
||||
BLL.RoleService.DeleteRole(rowID);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -102,7 +108,7 @@
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
@@ -160,7 +166,7 @@
|
||||
}
|
||||
string Id = Grid1.SelectedRowID;
|
||||
var roles = BLL.RoleService.GetRoleByRoleId(Id);
|
||||
if (roles != null && (!roles.IsSystemBuilt.HasValue || roles.IsSystemBuilt == false || this.CurrUser.UserId == BLL.Const.sysglyId ))
|
||||
if (roles != null && (!roles.IsSystemBuilt.HasValue || roles.IsSystemBuilt == false || this.CurrUser.UserId == BLL.Const.sysglyId))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("RoleListEdit.aspx?roleId={0}", Id, "编辑 - ")));
|
||||
}
|
||||
@@ -188,7 +194,7 @@
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.btnMenuEdit.Hidden = false;
|
||||
this.btnMenuEdit.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
@@ -222,7 +228,7 @@
|
||||
{
|
||||
content = "该角色已在【用户信息】中使用,不能删除!";
|
||||
}
|
||||
|
||||
|
||||
if (string.IsNullOrEmpty(content))
|
||||
{
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user