提交代码
This commit is contained in:
@@ -196,7 +196,7 @@ namespace BLL
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
public static void UpdatePassword(string userId )
|
||||
public static void UpdatePassword(string userId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Sys_User m = db.Sys_User.FirstOrDefault(e => e.UserId == userId);
|
||||
@@ -295,7 +295,8 @@ namespace BLL
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
catch (Exception e)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -397,7 +398,7 @@ namespace BLL
|
||||
{
|
||||
getPUser = (from x in db.Project_ProjectUser
|
||||
join u in db.Project_ProjectUnit on new { x.ProjectId, x.UnitId } equals new { u.ProjectId, u.UnitId }
|
||||
where x.ProjectId == projectId && (u.UnitId == unitId)
|
||||
where x.ProjectId == projectId && (u.UnitId == unitId)
|
||||
select x).ToList();
|
||||
}
|
||||
else
|
||||
@@ -412,7 +413,7 @@ namespace BLL
|
||||
foreach (var item in getPUser)
|
||||
{
|
||||
List<string> roleIdList = Funs.GetStrListByStr(item.RoleId, ',');
|
||||
var getRoles = db.Sys_Role.FirstOrDefault(x =>roleIdList.Contains(x.RoleId));
|
||||
var getRoles = db.Sys_Role.FirstOrDefault(x => roleIdList.Contains(x.RoleId));
|
||||
if (getRoles != null)
|
||||
{
|
||||
string userName = RoleService.getRoleNamesRoleIds(item.RoleId) + "-" + UserService.GetUserNameByUserId(item.UserId);
|
||||
@@ -445,7 +446,7 @@ namespace BLL
|
||||
{
|
||||
users = (from x in db.Sys_User
|
||||
join z in db.Sys_Role on x.RoleId equals z.RoleId
|
||||
where x.IsPost == true
|
||||
where x.IsPost == true
|
||||
orderby x.UserCode
|
||||
select new Model.SpSysUserItem
|
||||
{
|
||||
@@ -600,12 +601,12 @@ namespace BLL
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目号和角色Id获取用户下拉选项
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Sys_User> GetUserListByProjectIdUnitIdRoleId(string projectId,string unitId, string roleIds)
|
||||
public static List<Model.Sys_User> GetUserListByProjectIdUnitIdRoleId(string projectId, string unitId, string roleIds)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
@@ -618,7 +619,7 @@ namespace BLL
|
||||
list = (from x in db.Sys_User
|
||||
join y in db.Project_ProjectUser
|
||||
on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId && x.UnitId == unitId && listRoles.Contains(y.RoleId)
|
||||
where y.ProjectId == projectId && x.UnitId == unitId && listRoles.Contains(y.RoleId)
|
||||
orderby x.UserName
|
||||
select x).ToList();
|
||||
}
|
||||
@@ -635,7 +636,7 @@ namespace BLL
|
||||
else
|
||||
{
|
||||
list = (from x in db.Sys_User
|
||||
where x.UnitId == unitId && x.UserId != BLL.Const.hfnbdId && x.UserId != Const.sedinId
|
||||
where x.UnitId == unitId && x.UserId != BLL.Const.hfnbdId && x.UserId != Const.sedinId
|
||||
orderby x.UserName
|
||||
select x).ToList();
|
||||
|
||||
@@ -734,7 +735,7 @@ namespace BLL
|
||||
{
|
||||
dropName.DataValueField = "UserId";
|
||||
dropName.DataTextField = "UserName";
|
||||
dropName.DataSource = BLL.UserService.GetUserListByProjectIdUnitIdRoleId(projectId,unitId, roleIds);
|
||||
dropName.DataSource = BLL.UserService.GetUserListByProjectIdUnitIdRoleId(projectId, unitId, roleIds);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
@@ -858,6 +859,24 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 用户下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="projectId">项目id</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitUserDropDownList2(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease, string UnitId)
|
||||
{
|
||||
dropName.DataValueField = "Value";
|
||||
dropName.DataTextField = "Text";
|
||||
dropName.DataSource = GetUserByUnitId(projectId, UnitId);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按照单位查询用户
|
||||
/// </summary>
|
||||
@@ -1611,7 +1630,7 @@ namespace BLL
|
||||
{
|
||||
if (getUnit.UnitCode.Length > 4)
|
||||
{
|
||||
prefixValue = getUnit.UnitCode.Substring(getUnit.UnitCode.Length-4, 4);
|
||||
prefixValue = getUnit.UnitCode.Substring(getUnit.UnitCode.Length - 4, 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1623,7 +1642,7 @@ namespace BLL
|
||||
{
|
||||
if (idCard.Length > 4)
|
||||
{
|
||||
suffixValue = idCard.Substring(idCard.Length-4, 4);
|
||||
suffixValue = idCard.Substring(idCard.Length - 4, 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user