using DocumentFormat.OpenXml.Bibliography;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Learun.Application.TwoDevelopment.ZZDT_EC.Frame
{
public class FrameBll
{
///
/// 肋位号
///
public class FrameList
{
///
/// 号
///
public string Num { get; set; }
///
/// 值。单位是m
///
public double Value { get; set; }
}
public List GetFrameList(string ProjectId)
{
var ec_dataitemBLL = new ec_dataitemBLL();
var settings = new ec_projectSettingsBLL();
var FrameListFlg = settings.GetEntity(GlobalObject.projSetting_enumlist_Frame, ProjectId);
if (FrameListFlg != null)
{
List frameLists = new List();
var res = ec_dataitemBLL.GetDetailList(FrameListFlg.SettingValue, "", ProjectId, false);
if (res == null)
{
return null;// 或者 无法从数据字典中找到对应的那个下拉
}
foreach (var item in res)
{
double value;
if (double.TryParse(item.DataItemCode, out value))
{
frameLists.Add(new FrameList() { Num = item.DataItemName, Value = value });
}
}
frameLists = frameLists.OrderBy(t => t.Value).ToList();
return frameLists;
}
else
{
return null;// 或者 无法从数据字典中找到对应的那个下拉
}
}
}
}