แก้รายงาน รองรับด้านแบบ Multi ในบัญชี 1
This commit is contained in:
parent
aeb61be218
commit
9c24102b62
7 changed files with 78 additions and 8 deletions
62
Extensions/ListObjectExtensions.cs
Normal file
62
Extensions/ListObjectExtensions.cs
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue