提交代码
This commit is contained in:
parent
ed56cc00df
commit
d609421334
|
@ -185,8 +185,8 @@ namespace BLL
|
||||||
/// <param name="isShowPlease">是否显示请选择</param>
|
/// <param name="isShowPlease">是否显示请选择</param>
|
||||||
public static void InitAllProjectContentDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
|
public static void InitAllProjectContentDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
|
||||||
{
|
{
|
||||||
dropName.DataValueField = "BaseId";
|
dropName.DataValueField = "Value";
|
||||||
dropName.DataTextField = "ProjectContent";
|
dropName.DataTextField = "Text";
|
||||||
dropName.DataSource = GetAllProjectContentListByProjectId(projectId);
|
dropName.DataSource = GetAllProjectContentListByProjectId(projectId);
|
||||||
dropName.DataBind();
|
dropName.DataBind();
|
||||||
if (isShowPlease)
|
if (isShowPlease)
|
||||||
|
@ -200,14 +200,20 @@ namespace BLL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="projectId"></param>
|
/// <param name="projectId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static List<Model.QuantityManagement_Base> GetAllProjectContentListByProjectId(string projectId)
|
public static ListItem[] GetAllProjectContentListByProjectId(string projectId)
|
||||||
{
|
{
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
return (from x in db.QuantityManagement_Base
|
var q = (from x in db.QuantityManagement_Base
|
||||||
where x.ProjectId == projectId && x.State == BLL.Const.Base_Complete
|
where x.ProjectId == projectId && x.State == BLL.Const.Base_Complete
|
||||||
orderby x.ProjectContent
|
orderby x.ProjectContent
|
||||||
select x).ToList();
|
select x.ProjectContent).Distinct().ToList();
|
||||||
|
ListItem[] list = new ListItem[q.Count()];
|
||||||
|
for (int i = 0; i < list.Count(); i++)
|
||||||
|
{
|
||||||
|
list[i] = new ListItem(q[i] ?? "", q[i]);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue