Changed Checkout to correctly reflect cash. Minor updates.
This commit is contained in:
14
Tanshu.Accounts.Contracts/Helper Functions/EnumHelper.cs
Normal file
14
Tanshu.Accounts.Contracts/Helper Functions/EnumHelper.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using Tanshu.Accounts.Entities;
|
||||
using Tanshu.Accounts.Contracts;
|
||||
|
||||
namespace Tanshu.Common.Helpers
|
||||
{
|
||||
public static class EnumHelper
|
||||
{
|
||||
public static string Display(this SettleOption settleOption)
|
||||
{
|
||||
var attribute = (DisplayAttribute)settleOption.GetType().GetField(settleOption.ToString()).GetCustomAttributes(typeof(DisplayAttribute), false)[0];
|
||||
return attribute != null ? attribute.Name : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user