From 3c4acc3911471d342e9247d99caac3370ad39a60 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 28 Apr 2020 00:02:33 +0000 Subject: [PATCH] --- source/Plugins/AyaNova.Plugin.V8/V8.cs | 93 +++++--------------------- 1 file changed, 18 insertions(+), 75 deletions(-) diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index 545bec7..349bfbe 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -370,18 +370,13 @@ namespace AyaNova.PlugIn.V8 } #endregion clients + #region TAG ITEMS #region Unitmodelcategories private void ExportUnitModelCategories(ProgressForm progress) { UnitModelCategories l = UnitModelCategories.GetItems(); - progress.Append("Exporting " + l.Count.ToString() + " Unit model categories"); - - - foreach (UnitModelCategory i in l) - { - TagMap.Add(i.ID, util.NormalizeTag(i.Name + "." + "unitmodelcategory")); - } - + progress.Append("Compiling " + l.Count.ToString() + " Unit model categories"); + foreach (UnitModelCategory i in l) TagMap.Add(i.ID, util.NormalizeTag(i.Name + "." + "unitmodelcategory")); } #endregion @@ -389,124 +384,72 @@ namespace AyaNova.PlugIn.V8 private void ExportUnitServiceTypes(ProgressForm progress) { UnitServiceTypes l = UnitServiceTypes.GetItems(); - progress.Append("Dumping " + l.Count.ToString() + " Unit service types"); - + progress.Append("Compiling " + l.Count.ToString() + " Unit service types"); foreach (UnitServiceType i in l) - { - TagMap.Add(i.ID, util.NormalizeTag(i.Name + "." + "unitservicetype")); - - } } #endregion #region WorkorderItemTypes private void ExportWorkorderItemTypes(ProgressForm progress) { - List objectExcludeProperties = new List(standardExcludePropertiesList); - //objectExcludeProperties.Add("ContractName"); - //objectExcludeProperties.Add("uiHasTechNotes"); + WorkorderItemTypes l = WorkorderItemTypes.GetItems(); - progress.Append("Dumping " + l.Count.ToString() + " Workorder item types"); - + progress.Append("Compiling " + l.Count.ToString() + " Workorder item types"); foreach (WorkorderItemType i in l) - { - - DumpObjectToFolder(tempArchiveFolder, i, "workorderitemtype." + i.ID.ToString(), objectExcludeProperties, TypeAndID.Empty); - - } + TagMap.Add(i.ID, util.NormalizeTag(i.Name + "." + "workorderitemtype")); } #endregion #region Client groups private void ExportClientGroups(ProgressForm progress) { - List objectExcludeProperties = new List(standardExcludePropertiesList); - //objectExcludeProperties.Add("ContractName"); - //objectExcludeProperties.Add("uiHasTechNotes"); ClientGroups l = ClientGroups.GetItems(); - progress.Append("Dumping " + l.Count.ToString() + " Client groups"); - + progress.Append("Compiling " + l.Count.ToString() + " Client groups"); foreach (ClientGroup i in l) - { - - DumpObjectToFolder(tempArchiveFolder, i, "clientgroup." + i.ID.ToString(), objectExcludeProperties, TypeAndID.Empty); - - } + TagMap.Add(i.ID, util.NormalizeTag(i.Name + "." + "clientgroup")); } #endregion #region Workorder categories private void ExportWorkorderCategories(ProgressForm progress) { - List objectExcludeProperties = new List(standardExcludePropertiesList); - //objectExcludeProperties.Add("ContractName"); - //objectExcludeProperties.Add("uiHasTechNotes"); WorkorderCategories l = WorkorderCategories.GetItems(); - progress.Append("Dumping " + l.Count.ToString() + " Workorder categories"); - + progress.Append("Compiling " + l.Count.ToString() + " Workorder categories"); foreach (WorkorderCategory i in l) - { - - DumpObjectToFolder(tempArchiveFolder, i, "workordercategory." + i.ID.ToString(), objectExcludeProperties, TypeAndID.Empty); - - } + TagMap.Add(i.ID, util.NormalizeTag(i.Name + "." + "workordercategory")); } #endregion #region Part categories private void ExportPartCategories(ProgressForm progress) { - List objectExcludeProperties = new List(standardExcludePropertiesList); - //objectExcludeProperties.Add("ContractName"); - //objectExcludeProperties.Add("uiHasTechNotes"); PartCategories l = PartCategories.GetItems(); - progress.Append("Dumping " + l.Count.ToString() + " Part categories"); - - foreach (PartCategory i in l) - { - - DumpObjectToFolder(tempArchiveFolder, i, "partcategory." + i.ID.ToString(), objectExcludeProperties, TypeAndID.Empty); - - } + progress.Append("Compiling " + l.Count.ToString() + " Part categories"); + foreach (PartCategory i in l) TagMap.Add(i.ID, util.NormalizeTag(i.Name + "." + "partcategory")); } #endregion #region ScheduleableUserGroups private void ExportScheduleableUserGroups(ProgressForm progress) { - List objectExcludeProperties = new List(standardExcludePropertiesList); - objectExcludeProperties.Add("ContractName"); - objectExcludeProperties.Add("uiHasTechNotes"); ScheduleableUserGroupPickList pl = ScheduleableUserGroupPickList.GetList(); - progress.Append("Dumping " + pl.Count.ToString() + " Scheduleable user groups"); + progress.Append("Compiling " + pl.Count.ToString() + " Scheduleable user groups"); foreach (ScheduleableUserGroupPickList.ScheduleableUserGroupPickListInfo i in pl) - { - ScheduleableUserGroup c = ScheduleableUserGroup.GetItem(i.ID); - DumpObjectToFolder(tempArchiveFolder, c, "scheduleableusergroup." + c.ID.ToString(), objectExcludeProperties, TypeAndID.Empty); - - } + TagMap.Add(i.ID, util.NormalizeTag(i.Name + "." + "partcategory")); } #endregion clients #region Dispatch zones private void ExportDispatchZones(ProgressForm progress) { - List objectExcludeProperties = new List(standardExcludePropertiesList); - //objectExcludeProperties.Add("ContractName"); - //objectExcludeProperties.Add("uiHasTechNotes"); DispatchZones l = DispatchZones.GetItems(false); - progress.Append("Dumping " + l.Count.ToString() + " Dispatch zones"); - + progress.Append("Compiling " + l.Count.ToString() + " Dispatch zones"); foreach (DispatchZone i in l) - { - - DumpObjectToFolder(tempArchiveFolder, i, "dispatchzone." + i.ID.ToString(), objectExcludeProperties, TypeAndID.Empty); - - } + TagMap.Add(i.ID, util.NormalizeTag(i.Name + "." + "dispatchzone")); } #endregion - + #endregion TAG ITEMS //-------------------------------------------- #endregion object dump methods