提交代码
This commit is contained in:
parent
ed56cc00df
commit
d609421334
|
@ -185,8 +185,8 @@ namespace BLL
|
|||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitAllProjectContentDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "BaseId";
|
||||
dropName.DataTextField = "ProjectContent";
|
||||
dropName.DataValueField = "Value";
|
||||
dropName.DataTextField = "Text";
|
||||
dropName.DataSource = GetAllProjectContentListByProjectId(projectId);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
|
@ -200,14 +200,20 @@ namespace BLL
|
|||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <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))
|
||||
{
|
||||
return (from x in db.QuantityManagement_Base
|
||||
where x.ProjectId == projectId && x.State == BLL.Const.Base_Complete
|
||||
orderby x.ProjectContent
|
||||
select x).ToList();
|
||||
var q = (from x in db.QuantityManagement_Base
|
||||
where x.ProjectId == projectId && x.State == BLL.Const.Base_Complete
|
||||
orderby x.ProjectContent
|
||||
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