20230606新增费用申请页面、项目列表按活跃度排序
This commit is contained in:
@@ -71,12 +71,70 @@ namespace BLL
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取费用类型下拉列表项
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="costTypeItemId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Base_CostTypeItem GetCostTypeItemById(string costTypeItemId)
|
||||
{
|
||||
return Funs.DB.Base_CostTypeItem.FirstOrDefault(e => e.CostTypeItemId == costTypeItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取费用类型下拉列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Base_CostType> GetCostTypeList()
|
||||
{
|
||||
return (from x in Funs.DB.Base_CostType orderby x.CostTypeCode select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取费用类型明细项下拉列表
|
||||
/// </summary>
|
||||
/// <param name="costTypeId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Base_CostTypeItem> GetCostTypeItemList(string costTypeId)
|
||||
{
|
||||
return (from x in Funs.DB.Base_CostTypeItem
|
||||
where x.CostTypeId == costTypeId
|
||||
orderby x.SortIndex
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 费用类型下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitCostTypeDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "CostTypeId";
|
||||
dropName.DataTextField = "CostTypeName";
|
||||
dropName.DataSource = GetCostTypeList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 费用类型下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitCostTypeItemDropDownList(FineUIPro.DropDownList dropName,string costTypeId, bool isShowPlease)
|
||||
{
|
||||
dropName.Items.Clear();
|
||||
dropName.DataValueField = "CostTypeItemId";
|
||||
dropName.DataTextField = "CostTypeItemName";
|
||||
dropName.DataSource = GetCostTypeItemList(costTypeId);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user