提交代码

This commit is contained in:
2024-05-15 09:35:42 +08:00
parent 283b550335
commit d2aee964cc
7 changed files with 241 additions and 1 deletions
@@ -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);
}
}
}
}
}