63 lines
1.9 KiB
C#
63 lines
1.9 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
|
|||
|
namespace BLL
|
|||
|
{
|
|||
|
public static class ConstValue
|
|||
|
{
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 获取常量下拉框 根据常量组id
|
|||
|
/// </summary>
|
|||
|
/// <param name="groupId">常量组id</param>
|
|||
|
/// <returns>常量集合</returns>
|
|||
|
public static List<Model.Sys_Const> drpConstItemList(string groupId)
|
|||
|
{
|
|||
|
var list = (from x in Funs.DB.Sys_Const
|
|||
|
where x.GroupId == groupId
|
|||
|
orderby x.SortIndex
|
|||
|
select x).ToList();
|
|||
|
return list;
|
|||
|
}
|
|||
|
|
|||
|
public static void InitSysConstDropDownList(FineUIPro.DropDownList dropName, string groupId, bool isShowPlease)
|
|||
|
{
|
|||
|
dropName.DataValueField = "ConstValue";
|
|||
|
dropName.DataTextField = "ConstText";
|
|||
|
dropName.DataSource = drpConstItemList(groupId);
|
|||
|
dropName.DataBind();
|
|||
|
if (isShowPlease)
|
|||
|
{
|
|||
|
Funs.FineUIPleaseSelect(dropName);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 根据ConstValue获取常量信息
|
|||
|
/// </summary>
|
|||
|
/// <param name="constValue"></param>
|
|||
|
/// <param name="groupId"></param>
|
|||
|
/// <returns></returns>
|
|||
|
public static Model.Sys_Const GetSysConstListByGroupId(string constValue, string groupId)
|
|||
|
{
|
|||
|
return Funs.DB.Sys_Const.FirstOrDefault(e => e.ConstValue == constValue && e.GroupId == groupId);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
#region 常量组
|
|||
|
public const string Group_PlanType = "Resource_PlanType";
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 是否
|
|||
|
/// </summary>
|
|||
|
public const string Group_YesOrNo = "YesOrNo";
|
|||
|
#endregion
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 首页筛选条件
|
|||
|
/// </summary>
|
|||
|
public const string Group_Search = "Search";
|
|||
|
}
|
|||
|
}
|