1
This commit is contained in:
@@ -11,7 +11,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class UnitService
|
||||
{
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取单位信息
|
||||
@@ -185,10 +185,7 @@ namespace BLL
|
||||
unitId = Const.UnitId_SEDIN;
|
||||
}
|
||||
var unitIdList = GetChildrenUnitId(unitId);
|
||||
if (unitIdList.Count() > 0)
|
||||
{
|
||||
unitList = (from x in Funs.DB.Base_Unit where unitIdList.Contains(x.UnitId) || x.UnitId == unitId select x).ToList();
|
||||
}
|
||||
unitList = (from x in Funs.DB.Base_Unit where unitIdList.Contains(x.UnitId) || x.UnitId == unitId select x).ToList();
|
||||
return unitList;
|
||||
}
|
||||
|
||||
@@ -200,7 +197,7 @@ namespace BLL
|
||||
public static List<string> GetChildrenUnitId(string unitId)
|
||||
{
|
||||
List<string> unitIdList = new List<string>();
|
||||
var unit = Funs.DB.Base_Unit.FirstOrDefault(e => e.SupUnitId == unitId); //本单位
|
||||
var unit = Funs.DB.Base_Unit.FirstOrDefault(e => e.IsBranch == true); //本单位
|
||||
if (unit != null)
|
||||
{
|
||||
unitIdList.Add(unit.UnitId);
|
||||
@@ -274,7 +271,7 @@ namespace BLL
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var q = (from x in db.Base_Unit
|
||||
|
||||
|
||||
orderby x.UnitCode
|
||||
select x).Distinct().ToList();
|
||||
return q;
|
||||
@@ -316,7 +313,7 @@ namespace BLL
|
||||
unitList = (from x in db.Base_Unit
|
||||
join y in db.Project_ProjectUnit
|
||||
on x.UnitId equals y.UnitId
|
||||
where y.ProjectId == projectId
|
||||
where y.ProjectId == projectId
|
||||
orderby x.UnitCode
|
||||
select x).ToList();
|
||||
}
|
||||
@@ -654,14 +651,14 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
public static void InitSeDinAndCNCECUnitDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
public static void InitSeDinAndCNCECUnitDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.Items.Clear();
|
||||
dropName.DataValueField = "UnitId";
|
||||
dropName.DataTextField = "UnitName";
|
||||
dropName.DataSource = (from x in Funs.DB.Base_Unit
|
||||
where x.UnitId==Const.UnitId_SEDIN || x.UnitId == Const.UnitId_CNCEC
|
||||
select x).OrderByDescending(x => x.UnitCode).ToList();
|
||||
dropName.DataSource = (from x in Funs.DB.Base_Unit
|
||||
where x.UnitId == Const.UnitId_SEDIN || x.UnitId == Const.UnitId_CNCEC
|
||||
select x).OrderByDescending(x => x.UnitCode).ToList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user