65 lines
1.9 KiB
C#
Raw Normal View History

2025-09-16 09:51:40 +08:00
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
{
/// <summary>
/// 肋位号
/// </summary>
public class FrameList
{
/// <summary>
/// 号
/// </summary>
public string Num { get; set; }
/// <summary>
/// 值。单位是m
/// </summary>
public double Value { get; set; }
}
public List<FrameList> 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<FrameList> frameLists = new List<FrameList>();
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;// 或者 无法从数据字典中找到对应的那个下拉
}
}
}
}