This commit is contained in:
39
server/AyaNova/kpi/KPIFactory.cs
Normal file
39
server/AyaNova/kpi/KPIFactory.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System.Collections.Generic;
|
||||
using AyaNova.Biz;
|
||||
using AyaNova.Models;
|
||||
|
||||
|
||||
namespace AyaNova.KPI
|
||||
{
|
||||
internal static class KPIFactory
|
||||
{
|
||||
|
||||
//Instantiate list object specified from type
|
||||
internal static IAyaKPI GetAyaKPI(string name)
|
||||
{
|
||||
switch (name)
|
||||
{
|
||||
//CoreBizObject add here if it will be "picked" on any other form
|
||||
case "WorkOrderItemLaborQuantitySummary":
|
||||
return new WorkOrderItemLaborQuantitySummary() as IAyaKPI;
|
||||
|
||||
//@##### WARNING: BE SURE TO ADD NEW TYPES BELOW OR USERS WON"T BE ABLE TO EDIT THE TEMPLATE FOR THEM
|
||||
|
||||
default:
|
||||
throw new System.NotImplementedException($"KPI {name} NOT IMPLEMENTED");
|
||||
|
||||
}
|
||||
//return null;
|
||||
}
|
||||
|
||||
//List all the KPI types available
|
||||
internal static List<string> GetListOfAllKPI()
|
||||
{
|
||||
List<string> ret = new List<string>();
|
||||
|
||||
ret.Add("WorkOrderItemLaborQuantitySummary");
|
||||
|
||||
return ret;
|
||||
}
|
||||
}//eoc
|
||||
}//eons
|
||||
Reference in New Issue
Block a user