This commit is contained in:
@@ -118,7 +118,7 @@ namespace AyaNova.Plugin.Dump
|
||||
|
||||
public void CommandSelectedForSingleObject(string commandKey, RootObjectTypes objectType, object ayaNovaObject)
|
||||
{
|
||||
|
||||
|
||||
if (!User.CurrentUserIsAnAdministrator)
|
||||
{
|
||||
MessageBox.Show("This action can only be done by the AyaNova Administrator account");
|
||||
@@ -173,20 +173,12 @@ namespace AyaNova.Plugin.Dump
|
||||
progress.Show();
|
||||
progress.StartedImport();
|
||||
progress.Append("Dumping data to " + tempArchiveFolder);
|
||||
|
||||
|
||||
|
||||
//DUMP IT!
|
||||
|
||||
//TODO: These next for tags so can be attributed when other objects are imported
|
||||
- Unit model category
|
||||
- Unit service type
|
||||
- Workorder Item Type
|
||||
- Client group
|
||||
- Workorder category
|
||||
- REGIONS
|
||||
- PartCategory
|
||||
- Dispatch zones
|
||||
- ScheduleableUserGroups
|
||||
//TODO: These next for tags so can be attributed when other objects are imported
|
||||
//- Dispatch zones
|
||||
|
||||
dumpUsers(tempArchiveFolder, progress);
|
||||
dumpGlobalSettings(tempArchiveFolder, progress);
|
||||
@@ -195,7 +187,17 @@ namespace AyaNova.Plugin.Dump
|
||||
dumpSeedNumbers(tempArchiveFolder, progress);
|
||||
dumpClients(tempArchiveFolder, progress);
|
||||
dumpHeadOffices(tempArchiveFolder, progress);
|
||||
|
||||
dumpUnitModelCategories(tempArchiveFolder, progress);
|
||||
dumpUnitServiceTypes(tempArchiveFolder, progress);
|
||||
dumpWorkorderItemTypes(tempArchiveFolder, progress);
|
||||
dumpClientGroups(tempArchiveFolder, progress);
|
||||
dumpWorkorderCategories(tempArchiveFolder, progress);
|
||||
dumpPartCategories(tempArchiveFolder, progress);
|
||||
dumpScheduleableUserGroups(tempArchiveFolder, progress);
|
||||
dumpDispatchZones(tempArchiveFolder, progress);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
progress.Append("Zipping up archive");
|
||||
@@ -207,7 +209,7 @@ namespace AyaNova.Plugin.Dump
|
||||
|
||||
progress.Append("Dump completed");
|
||||
progress.FinishedImport();
|
||||
|
||||
|
||||
//-----------------------------------
|
||||
//endof method
|
||||
}
|
||||
@@ -237,8 +239,8 @@ namespace AyaNova.Plugin.Dump
|
||||
SkipLocales.Add("English");
|
||||
SkipLocales.Add("Español");
|
||||
SkipLocales.Add("Français");
|
||||
|
||||
LocaleList l = LocaleList.GetList();
|
||||
|
||||
LocaleList l = LocaleList.GetList();
|
||||
progress.Append("Dumping " + l.Count.ToString() + " Locales");
|
||||
foreach (LocaleList.LocaleListInfo i in l)
|
||||
{
|
||||
@@ -250,7 +252,7 @@ namespace AyaNova.Plugin.Dump
|
||||
}
|
||||
}
|
||||
#endregion locales
|
||||
|
||||
|
||||
#region REGIONS
|
||||
private void dumpRegions(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
@@ -261,13 +263,13 @@ namespace AyaNova.Plugin.Dump
|
||||
progress.Append("Dumping " + l.Count.ToString() + " Regions");
|
||||
foreach (RegionList.RegionListInfo i in l)
|
||||
{
|
||||
|
||||
|
||||
Region o = Region.GetItem(i.LT_Region_Label_Name.Value);
|
||||
DumpObjectToFolder(tempArchiveFolder, o, "region." + o.ID.ToString(), objectExcludeProperties);
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Seeds
|
||||
private class GZSeeds
|
||||
@@ -295,11 +297,11 @@ namespace AyaNova.Plugin.Dump
|
||||
}
|
||||
|
||||
var seeds = new GZSeeds();
|
||||
seeds.InventoryAdjustmentStartSeed = AyaBizUtils.GlobalSettings.InventoryAdjustmentStartSeed+1;
|
||||
seeds.PurchaseOrderStartSeed = AyaBizUtils.GlobalSettings.PurchaseOrderStartSeed+1;
|
||||
seeds.QuoteNumberStartSeed = AyaBizUtils.GlobalSettings.QuoteNumberStartSeed+1;
|
||||
seeds.WorkorderNumberStartSeed = AyaBizUtils.GlobalSettings.WorkorderNumberStartSeed+1;
|
||||
seeds.PreventiveMaintenanceNumberStartSeed = PMStartSeed+1;
|
||||
seeds.InventoryAdjustmentStartSeed = AyaBizUtils.GlobalSettings.InventoryAdjustmentStartSeed + 1;
|
||||
seeds.PurchaseOrderStartSeed = AyaBizUtils.GlobalSettings.PurchaseOrderStartSeed + 1;
|
||||
seeds.QuoteNumberStartSeed = AyaBizUtils.GlobalSettings.QuoteNumberStartSeed + 1;
|
||||
seeds.WorkorderNumberStartSeed = AyaBizUtils.GlobalSettings.WorkorderNumberStartSeed + 1;
|
||||
seeds.PreventiveMaintenanceNumberStartSeed = PMStartSeed + 1;
|
||||
|
||||
DumpObjectToFolder(tempArchiveFolder, seeds, "seeds", objectExcludeProperties, "GZTW.AyaNova.BLL.Seed");
|
||||
}
|
||||
@@ -342,7 +344,7 @@ namespace AyaNova.Plugin.Dump
|
||||
#region users
|
||||
private void dumpUsers(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
|
||||
|
||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||
objectExcludeProperties.Add("LastView");
|
||||
objectExcludeProperties.Add("LastSchedGroupID");
|
||||
@@ -359,7 +361,7 @@ namespace AyaNova.Plugin.Dump
|
||||
objectExcludeProperties.Add("IsClientAccount");
|
||||
objectExcludeProperties.Add("IsHeadOfficeAccount");
|
||||
objectExcludeProperties.Add("OrganizationTypeAndID");
|
||||
|
||||
|
||||
UserPickList pl = UserPickList.GetList(false);
|
||||
progress.Append("Dumping " + pl.Count.ToString() + " Users");
|
||||
foreach (UserPickList.UserPickListInfo i in pl)
|
||||
@@ -370,7 +372,151 @@ namespace AyaNova.Plugin.Dump
|
||||
}
|
||||
}
|
||||
#endregion clients
|
||||
|
||||
|
||||
#region Unitmodelcategories
|
||||
private void dumpUnitModelCategories(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||
//objectExcludeProperties.Add("ContractName");
|
||||
//objectExcludeProperties.Add("uiHasTechNotes");
|
||||
UnitModelCategories l = UnitModelCategories.GetItems();
|
||||
progress.Append("Dumping " + l.Count.ToString() + " Unit model categories");
|
||||
|
||||
foreach (UnitModelCategory i in l)
|
||||
{
|
||||
|
||||
DumpObjectToFolder(tempArchiveFolder, i, "unitmodelcategory." + i.ID.ToString(), objectExcludeProperties);
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Unitservicetypes
|
||||
private void dumpUnitServiceTypes(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||
//objectExcludeProperties.Add("ContractName");
|
||||
//objectExcludeProperties.Add("uiHasTechNotes");
|
||||
UnitServiceTypes l = UnitServiceTypes.GetItems();
|
||||
progress.Append("Dumping " + l.Count.ToString() + " Unit service types");
|
||||
|
||||
foreach (UnitServiceType i in l)
|
||||
{
|
||||
|
||||
DumpObjectToFolder(tempArchiveFolder, i, "unitservicetype." + i.ID.ToString(), objectExcludeProperties);
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region WorkorderItemTypes
|
||||
private void dumpWorkorderItemTypes(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||
//objectExcludeProperties.Add("ContractName");
|
||||
//objectExcludeProperties.Add("uiHasTechNotes");
|
||||
WorkorderItemTypes l = WorkorderItemTypes.GetItems();
|
||||
progress.Append("Dumping " + l.Count.ToString() + " Workorder item types");
|
||||
|
||||
foreach (WorkorderItemType i in l)
|
||||
{
|
||||
|
||||
DumpObjectToFolder(tempArchiveFolder, i, "workorderitemtype." + i.ID.ToString(), objectExcludeProperties);
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Client groups
|
||||
private void dumpClientGroups(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||
//objectExcludeProperties.Add("ContractName");
|
||||
//objectExcludeProperties.Add("uiHasTechNotes");
|
||||
ClientGroups l = ClientGroups.GetItems();
|
||||
progress.Append("Dumping " + l.Count.ToString() + " Client groups");
|
||||
|
||||
foreach (ClientGroup i in l)
|
||||
{
|
||||
|
||||
DumpObjectToFolder(tempArchiveFolder, i, "clientgroup." + i.ID.ToString(), objectExcludeProperties);
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Workorder categories
|
||||
private void dumpWorkorderCategories(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||
//objectExcludeProperties.Add("ContractName");
|
||||
//objectExcludeProperties.Add("uiHasTechNotes");
|
||||
WorkorderCategories l = WorkorderCategories.GetItems();
|
||||
progress.Append("Dumping " + l.Count.ToString() + " Workorder categories");
|
||||
|
||||
foreach (WorkorderCategory i in l)
|
||||
{
|
||||
|
||||
DumpObjectToFolder(tempArchiveFolder, i, "workordercategory." + i.ID.ToString(), objectExcludeProperties);
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Part categories
|
||||
private void dumpPartCategories(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
List<string> objectExcludeProperties = new List<string>(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);
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ScheduleableUserGroups
|
||||
private void dumpScheduleableUserGroups(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||
objectExcludeProperties.Add("ContractName");
|
||||
objectExcludeProperties.Add("uiHasTechNotes");
|
||||
ScheduleableUserGroupPickList pl = ScheduleableUserGroupPickList.GetList();
|
||||
progress.Append("Dumping " + 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);
|
||||
|
||||
}
|
||||
}
|
||||
#endregion clients
|
||||
|
||||
#region Dispatch zones
|
||||
private void dumpDispatchZones(string tempArchiveFolder, ProgressForm progress)
|
||||
{
|
||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||
//objectExcludeProperties.Add("ContractName");
|
||||
//objectExcludeProperties.Add("uiHasTechNotes");
|
||||
DispatchZones l = DispatchZones.GetItems(false);
|
||||
progress.Append("Dumping " + l.Count.ToString() + " Dispatch zones");
|
||||
|
||||
foreach (DispatchZone i in l)
|
||||
{
|
||||
|
||||
DumpObjectToFolder(tempArchiveFolder, i, "dispatchzone." + i.ID.ToString(), objectExcludeProperties);
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
//--------------------------------------------
|
||||
#endregion object dump methods
|
||||
|
||||
|
||||
@@ -512,7 +658,7 @@ namespace AyaNova.Plugin.Dump
|
||||
//eoc
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//eons
|
||||
|
||||
Reference in New Issue
Block a user