2023-06-07 15:34:06 +07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
{
|
2023-06-07 15:41:17 +07:00
|
|
|
|
ret += $"{p.Name} หรือ ";
|
2023-06-07 15:34:06 +07:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-06-07 15:41:17 +07:00
|
|
|
|
ret = $"({ret.Substring(0, ret.Length - 6)})";
|
2023-06-07 15:34:06 +07:00
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
{
|
2023-06-07 15:41:17 +07:00
|
|
|
|
ret += $"{p.Name} หรือ ";
|
2023-06-07 15:34:06 +07:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-06-07 15:41:17 +07:00
|
|
|
|
ret = $"({ret.Substring(0, ret.Length - 6)})";
|
2023-06-07 15:34:06 +07:00
|
|
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|