提交代码
This commit is contained in:
@@ -74,6 +74,36 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 用户下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="projectId">项目id</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitUserDropDownListByUser(FineUIPro.DropDownList dropName, string projectId,string userId, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "CreateMan";
|
||||
dropName.DataTextField = "CreateManName";
|
||||
dropName.DataSource = GetProjectUserListByProjectId(projectId, userId);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
public static void InitAllUserDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "CreateMan";
|
||||
dropName.DataTextField = "CreateManName";
|
||||
dropName.DataSource = GetProjectAllUserListByProjectId();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
public class PerformanceUser {
|
||||
public string CreateMan { get; set; }
|
||||
|
||||
@@ -94,5 +124,39 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
public static List<PerformanceUser> GetProjectUserListByProjectId(string projectId,string userId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var list = (from x in db.CQMS_Performance
|
||||
join y in db.Sys_User on x.CreateMan equals y.UserId
|
||||
where x.ProjectId == projectId && x.States == "1" && x.ScorMan== userId
|
||||
select new PerformanceUser
|
||||
{
|
||||
CreateMan = x.CreateMan,
|
||||
CreateManName = BLL.UserService.GetUserByUserId(x.CreateMan).UserName
|
||||
}).ToList();
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static List<PerformanceUser> GetProjectAllUserListByProjectId()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var list = (from x in db.CQMS_Performance
|
||||
join y in db.Sys_User on x.CreateMan equals y.UserId
|
||||
where x.States == "1"
|
||||
select new PerformanceUser
|
||||
{
|
||||
CreateMan = x.CreateMan,
|
||||
CreateManName = BLL.UserService.GetUserByUserId(x.CreateMan).UserName
|
||||
}).Distinct().ToList();
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user