63 lines
1.1 KiB
C#
63 lines
1.1 KiB
C#
|
|
|
|||
|
|
|
|||
|
|
namespace BMA.EHR.Organization.Service.Extensions
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
public class PositionPathSideObject
|
|||
|
|
{
|
|||
|
|
public Guid? Id { get; set; }
|
|||
|
|
|
|||
|
|
public string Name { get; set; } = string.Empty;
|
|||
|
|
|
|||
|
|
public string Note { get; set; } = string.Empty;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public class PositionExecutiveSideObject
|
|||
|
|
{
|
|||
|
|
public Guid? Id { get; set; }
|
|||
|
|
|
|||
|
|
public string Name { get; set; } = string.Empty;
|
|||
|
|
|
|||
|
|
public string Note { get; set; } = string.Empty;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public static class ListObjectExtensions
|
|||
|
|
{
|
|||
|
|
public static string GetNameList(this List<PositionPathSideObject> list)
|
|||
|
|
{
|
|||
|
|
if (list == null || list.Count == 0) return "";
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
var ret = string.Empty;
|
|||
|
|
|
|||
|
|
foreach (var p in list)
|
|||
|
|
{
|
|||
|
|
ret += $"{p.Name} หรือ\r\n";
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
ret = $"({ret.Substring(0, ret.Length - 7)})";
|
|||
|
|
|
|||
|
|
return ret;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public static string GetNameList(this List<PositionExecutiveSideObject> list)
|
|||
|
|
{
|
|||
|
|
if (list == null || list.Count == 0) return "";
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
var ret = string.Empty;
|
|||
|
|
|
|||
|
|
foreach (var p in list)
|
|||
|
|
{
|
|||
|
|
ret += $"{p.Name} หรือ\r\n";
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
ret = $"({ret.Substring(0, ret.Length - 7)})";
|
|||
|
|
|
|||
|
|
return ret;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|