五环二期集团数据对接
This commit is contained in:
@@ -395,6 +395,33 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取分公司表下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitBranchUnitDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "UnitId";
|
||||
dropName.DataTextField = "UnitName";
|
||||
dropName.DataSource = BLL.UnitService.GetMainAndSubUnitList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前单位下分公司拉选项
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Base_Unit> GetMainAndSubUnitList()
|
||||
{
|
||||
return (from x in Funs.DB.Base_Unit where x.UnitId == CommonService.GetThisUnitId() || x.IsBranch == true select x).ToList();//orderby x.IsThisUnit descending
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 单位表下拉框
|
||||
/// </summary>
|
||||
@@ -657,6 +684,27 @@ namespace BLL
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
public static void InitAllUnitDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "UnitId";
|
||||
dropName.DataTextField = "UnitName";
|
||||
dropName.DataSource = GetAllUnitList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有单位名称下拉选择项
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Base_Unit> GetAllUnitList()
|
||||
{
|
||||
var q = (from x in Funs.DB.Base_Unit orderby x.UnitCode select x).ToList();
|
||||
return q;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 字符串转化-》单位名称转化为对应的单位ID
|
||||
|
||||
Reference in New Issue
Block a user