40 lines
923 B
C#
40 lines
923 B
C#
using System;
|
|
|
|
namespace Sozsoft.Platform.Enums;
|
|
|
|
public enum MenuPrefix
|
|
{
|
|
Saas,
|
|
Administration,
|
|
Crm,
|
|
Coordinator,
|
|
SupplyChain,
|
|
Maintenance,
|
|
Store,
|
|
Project,
|
|
Hr,
|
|
Mrp,
|
|
Accounting
|
|
}
|
|
|
|
public static class MenuPrefixExtensions
|
|
{
|
|
public static string ToPrefix(this MenuPrefix menu)
|
|
{
|
|
return menu switch
|
|
{
|
|
MenuPrefix.Saas => "Sas",
|
|
MenuPrefix.Administration => "Adm",
|
|
MenuPrefix.Crm => "Crm",
|
|
MenuPrefix.Coordinator => "Crd",
|
|
MenuPrefix.SupplyChain => "Scp",
|
|
MenuPrefix.Maintenance => "Mnt",
|
|
MenuPrefix.Store => "Str",
|
|
MenuPrefix.Project => "Prj",
|
|
MenuPrefix.Hr => "Hr",
|
|
MenuPrefix.Mrp => "Mrp",
|
|
MenuPrefix.Accounting => "Acc",
|
|
_ => throw new ArgumentOutOfRangeException(nameof(menu), menu, null)
|
|
};
|
|
}
|
|
}
|