This commit is contained in:
2020-12-29 00:05:34 +00:00
parent 079d832db0
commit 0eb6c4206d
2 changed files with 185 additions and 126 deletions

View File

@@ -376,9 +376,9 @@ namespace AyaNova.PlugIn.V8
public static bool DateIsPast(object o, bool neverEmpty = false) { return DateIsPast(o.ToString(), neverEmpty); }
public static bool DateIsPast(string s, bool neverEmpty = false)
{
if (string.IsNullOrWhiteSpace(s))
if (string.IsNullOrWhiteSpace(s))
return false;//no date so not past
DateTime result = new DateTime();
if (DateTime.TryParse(s, out result))
@@ -456,138 +456,140 @@ namespace AyaNova.PlugIn.V8
}
}
public enum AyaType : int
{
//COREBIZOBJECT attribute must be set on objects that are:
//Attachable objects can have attachments,
//wikiable objects can have a wiki
//reviewable objects can have a review which is basically the same as a Reminder but with an object attached (was follow up schedmarker in v7)
//PIckList-able (has picklist template)
//Pretty much everything that represents some kind of real world object is wikiable or attachable as long as it has an ID and a type
//exceptions would be utility type objects like datalistview, formcustom etc that are not
public enum AyaType : int
{
//COREBIZOBJECT attribute must be set on objects that are:
//Attachable objects can have attachments,
//wikiable objects can have a wiki
//reviewable objects can have a review which is basically the same as a Reminder but with an object attached (was follow up schedmarker in v7)
//PIckList-able (has picklist template)
//Pretty much everything that represents some kind of real world object is wikiable or attachable as long as it has an ID and a type
//exceptions would be utility type objects like datalistview, formcustom etc that are not
//NOTE: NEW CORE OBJECTS - All areas of server AND CLIENT code that require adding any new core objects have been tagged with the following comment:
//CoreBizObject add here
//Search for that IN SERVER AND CLIENT CODE and you will see all areas that need coding for the new object
//NOTE: NEW CORE OBJECTS - All areas of server AND CLIENT code that require adding any new core objects have been tagged with the following comment:
//CoreBizObject add here
//Search for that IN SERVER AND CLIENT CODE and you will see all areas that need coding for the new object
//***IMPORTANT: Also need to add translations for any new biz objects added that don't match exactly the name here in the key
//because enumlist gets it that way, i.e. "Global" would be the expected key
//***IMPORTANT: Also need to add translations for any new biz objects added that don't match exactly the name here in the key
//because enumlist gets it that way, i.e. "Global" would be the expected key
NoType = 0,
Global = 1,
//corebizobject
Widget = 2,
//corebizobject
User = 3,
ServerState = 4,
License = 5,
LogFile = 6,
PickListTemplate = 7,
//corebizobject
Customer = 8,
ServerJob = 9,
//corebizobject
Contract = 10,
TrialSeeder = 11,
ServerMetrics = 12,
Translation = 13,
UserOptions = 14,
//corebizobject
HeadOffice = 15,
//corebizobject
LoanUnit = 16,
FileAttachment = 17,
DataListView = 18,
FormCustom = 19,
//corebizobject
Part = 20,
//corebizobject
PM = 21,
//corebizobject
PMItem = 22,
//corebizobject
PMTemplate = 23,
//corebizobject
PMTemplateItem = 24,
//corebizobject
Project = 25,
//corebizobject
PurchaseOrder = 26,
//corebizobject
Quote = 27,
//corebizobject
QuoteItem = 28,
//corebizobject
QuoteTemplate = 29,
//corebizobject
QuoteTemplateItem = 30,
//corebizobject
Unit = 31,
//corebizobject
UnitModel = 32,
//corebizobject
Vendor = 33,
//--- WorkOrder
//corebizobject
WorkOrder = 34,
//corebizobject
WorkOrderItem = 35,
//corebizobject
WorkOrderItemExpense = 36,
//corebizobject
WorkOrderItemLabor = 37,
//corebizobject
WorkOrderItemLoan = 38,
//corebizobject
WorkOrderItemPart = 39,
//corebizobject
WorkOrderItemPartRequest = 40,
//corebizobject
WorkOrderItemScheduledUser = 41,
//corebizobject
WorkOrderItemTask = 42,
//corebizobject
WorkOrderItemTravel = 43,
//corebizobject
WorkOrderItemUnit = 44,
//---
//corebizobject
WorkOrderTemplate = 45,
//corebizobject
WorkOrderTemplateItem = 46,
GlobalOps = 47,//really only used for rights, not an object type of any kind
BizMetrics = 48,//deprecate? Not used for anything as of nov 2020
Backup = 49,
Notification = 50,
NotifySubscription = 51,
//corebizobject
Reminder = 52,
UnitMeterReading = 53,
CustomerServiceRequest = 54,
ServiceBank = 55,
OpsNotificationSettings = 56,
Report = 57,
DashboardView = 58,
//corebizobject
CustomerNote = 59,
//corebizobject
Memo = 60,
//corebizobject
Review = 61
NoType = 0,
Global = 1,
//corebizobject
Widget = 2,
//corebizobject
User = 3,
ServerState = 4,
License = 5,
LogFile = 6,
PickListTemplate = 7,
//corebizobject
Customer = 8,
ServerJob = 9,
//corebizobject
Contract = 10,
TrialSeeder = 11,
ServerMetrics = 12,
Translation = 13,
UserOptions = 14,
//corebizobject
HeadOffice = 15,
//corebizobject
LoanUnit = 16,
FileAttachment = 17,
DataListView = 18,
FormCustom = 19,
//corebizobject
Part = 20,
//corebizobject
PM = 21,
//corebizobject
PMItem = 22,
//corebizobject
PMTemplate = 23,
//corebizobject
PMTemplateItem = 24,
//corebizobject
Project = 25,
//corebizobject
PurchaseOrder = 26,
//corebizobject
Quote = 27,
//corebizobject
QuoteItem = 28,
//corebizobject
QuoteTemplate = 29,
//corebizobject
QuoteTemplateItem = 30,
//corebizobject
Unit = 31,
//corebizobject
UnitModel = 32,
//corebizobject
Vendor = 33,
//--- WorkOrder
//corebizobject
WorkOrder = 34,
//corebizobject
WorkOrderItem = 35,
//corebizobject
WorkOrderItemExpense = 36,
//corebizobject
WorkOrderItemLabor = 37,
//corebizobject
WorkOrderItemLoan = 38,
//corebizobject
WorkOrderItemPart = 39,
//corebizobject
WorkOrderItemPartRequest = 40,
//corebizobject
WorkOrderItemScheduledUser = 41,
//corebizobject
WorkOrderItemTask = 42,
//corebizobject
WorkOrderItemTravel = 43,
//corebizobject
WorkOrderItemUnit = 44,
//---
//corebizobject
WorkOrderTemplate = 45,
//corebizobject
WorkOrderTemplateItem = 46,
GlobalOps = 47,//really only used for rights, not an object type of any kind
BizMetrics = 48,//deprecate? Not used for anything as of nov 2020
Backup = 49,
Notification = 50,
NotifySubscription = 51,
//corebizobject
Reminder = 52,
UnitMeterReading = 53,
CustomerServiceRequest = 54,
ServiceBank = 55,
OpsNotificationSettings = 56,
Report = 57,
DashboardView = 58,
//corebizobject
CustomerNote = 59,
//corebizobject
Memo = 60,
//corebizobject
Review = 61,
ServiceRate = 62,
TravelRate = 63
//NOTE: New objects added here need to also be added to the following classes:
//AyaNova.Biz.BizObjectExistsInDatabase
//AyaNova.Biz.BizObjectFactory
//AyaNova.Biz.BizRoles
//AyaNova.Biz.BizObjectNameFetcherDIRECT
//and in the CLIENT in ayatype.js
//and their model needs to have the ICoreBizObjectModel interface
//NOTE: New objects added here need to also be added to the following classes:
//AyaNova.Biz.BizObjectExistsInDatabase
//AyaNova.Biz.BizObjectFactory
//AyaNova.Biz.BizRoles
//AyaNova.Biz.BizObjectNameFetcherDIRECT
//and in the CLIENT in ayatype.js
//and their model needs to have the ICoreBizObjectModel interface
//and need TRANSLATION KEYS because any type could show in the event log at the client end
//and need TRANSLATION KEYS because any type could show in the event log at the client end
}
}