提交代码
This commit is contained in:
@@ -197,5 +197,31 @@
|
||||
orderby x.UnitType, y.UnitCode
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 项目类型单位表下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitUnitDropDownList2(FineUIPro.DropDownList dropName, string projectId, string unitType, bool isShowPlease)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var pUnit = (from x in db.Project_ProjectUnit
|
||||
join y in db.Base_Unit on x.UnitId equals y.UnitId
|
||||
where x.ProjectId == projectId && x.UnitType == unitType
|
||||
orderby y.UnitCode
|
||||
select y).ToList();
|
||||
|
||||
dropName.DataValueField = "UnitName";
|
||||
dropName.DataTextField = "UnitName";
|
||||
dropName.DataSource = pUnit;
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user