This commit is contained in:
parent
9e9100749a
commit
1066f6ae6f
|
|
@ -469,6 +469,42 @@
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static List<Model.Base_Project> GetProjectByUserIdDropDownList1(string userId)
|
||||
{
|
||||
if (userId == Const.sysglyId || userId == Const.hfnbdId || userId == Const.sedinId)
|
||||
{
|
||||
return (from x in Funs.DB.Base_Project
|
||||
where (x.IsDelete == null || x.IsDelete == false) && (x.ProjectState == null || x.ProjectState == BLL.Const.ProjectState_1) && (x.ProjectAttribute == "GONGCHENG")
|
||||
orderby x.ProjectCode descending
|
||||
select x).ToList();
|
||||
}
|
||||
var getUser = UserService.GetUserByUserId(userId);
|
||||
if (getUser != null)
|
||||
{
|
||||
/// 获取角色类型
|
||||
var getRoleP = Funs.DB.Sys_RolePower.FirstOrDefault(x => x.RoleId == getUser.RoleId && x.IsOffice == false);
|
||||
if (getRoleP != null)
|
||||
{
|
||||
return (from x in Funs.DB.Base_Project
|
||||
where (x.IsDelete == null || x.IsDelete == false) && (x.ProjectState == null || x.ProjectState == BLL.Const.ProjectState_1) && (x.ProjectAttribute == "GONGCHENG")
|
||||
orderby x.ProjectCode descending
|
||||
select x).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
return (from x in Funs.DB.Base_Project
|
||||
join y in Funs.DB.Project_ProjectUser on x.ProjectId equals y.ProjectId
|
||||
where y.UserId == userId && (x.IsDelete == null || x.IsDelete == false) && (x.ProjectState == null || x.ProjectState == BLL.Const.ProjectState_1) && (x.ProjectAttribute == "GONGCHENG")
|
||||
orderby x.ProjectCode descending
|
||||
select x).Distinct().ToList();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public static List<Model.Base_Project> GetUnEndProjectByUserIdDropDownList(string userId, string needProjectId)
|
||||
{
|
||||
if (userId == Const.sysglyId || userId == Const.hfnbdId || userId == Const.sedinId)
|
||||
|
|
@ -714,7 +750,7 @@
|
|||
{
|
||||
dropName.DataValueField = "ProjectId";
|
||||
dropName.DataTextField = "ProjectName";
|
||||
var projectlist = GetProjectByUserIdDropDownList(userId);
|
||||
var projectlist = GetProjectByUserIdDropDownList1(userId);
|
||||
dropName.DataSource = projectlist;
|
||||
dropName.DataBind();
|
||||
if (projectlist.Count() == 0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue