This commit is contained in:
@@ -150,6 +150,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
|
|
||||||
private Dictionary<Guid, long> Map = new Dictionary<Guid, long>();
|
private Dictionary<Guid, long> Map = new Dictionary<Guid, long>();
|
||||||
private Dictionary<Guid, string> TagMap = new Dictionary<Guid, string>();
|
private Dictionary<Guid, string> TagMap = new Dictionary<Guid, string>();
|
||||||
|
private string ImportTag = "v7-import";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Dump the objects into a temporary directory as a series of JSON files
|
/// Dump the objects into a temporary directory as a series of JSON files
|
||||||
/// then zip it all up into a single archive file and then erase the temporary folder
|
/// then zip it all up into a single archive file and then erase the temporary folder
|
||||||
@@ -158,6 +159,11 @@ namespace AyaNova.PlugIn.V8
|
|||||||
{
|
{
|
||||||
Map.Clear();
|
Map.Clear();
|
||||||
|
|
||||||
|
/*
|
||||||
|
TODO:
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
//Show progress form
|
//Show progress form
|
||||||
|
|
||||||
@@ -180,8 +186,9 @@ namespace AyaNova.PlugIn.V8
|
|||||||
ExportScheduleableUserGroups(progress);
|
ExportScheduleableUserGroups(progress);
|
||||||
ExportDispatchZones(progress);
|
ExportDispatchZones(progress);
|
||||||
|
|
||||||
|
//BIZ objects
|
||||||
|
ExportUsers(progress);
|
||||||
|
|
||||||
//dumpUsers(tempArchiveFolder, progress);
|
|
||||||
//dumpGlobalSettings(tempArchiveFolder, progress);
|
//dumpGlobalSettings(tempArchiveFolder, progress);
|
||||||
//dumpLocales(tempArchiveFolder, progress);
|
//dumpLocales(tempArchiveFolder, progress);
|
||||||
|
|
||||||
@@ -332,30 +339,40 @@ namespace AyaNova.PlugIn.V8
|
|||||||
private void ExportUsers(ProgressForm progress)
|
private void ExportUsers(ProgressForm progress)
|
||||||
{
|
{
|
||||||
|
|
||||||
List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
//List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
||||||
objectExcludeProperties.Add("LastView");
|
//objectExcludeProperties.Add("LastView");
|
||||||
objectExcludeProperties.Add("LastSchedGroupID");
|
//objectExcludeProperties.Add("LastSchedGroupID");
|
||||||
objectExcludeProperties.Add("LastSchedStartDate");
|
//objectExcludeProperties.Add("LastSchedStartDate");
|
||||||
objectExcludeProperties.Add("LastSchedStopDate");
|
//objectExcludeProperties.Add("LastSchedStopDate");
|
||||||
objectExcludeProperties.Add("LastSchedView");
|
//objectExcludeProperties.Add("LastSchedView");
|
||||||
objectExcludeProperties.Add("ScheduleLastGraphicalPrintSettings");
|
//objectExcludeProperties.Add("ScheduleLastGraphicalPrintSettings");
|
||||||
objectExcludeProperties.Add("MainGridLastRowCount");
|
//objectExcludeProperties.Add("MainGridLastRowCount");
|
||||||
objectExcludeProperties.Add("ScheduleLastViewOpenOnly");
|
//objectExcludeProperties.Add("ScheduleLastViewOpenOnly");
|
||||||
objectExcludeProperties.Add("IsAdministrator");
|
//objectExcludeProperties.Add("IsAdministrator");
|
||||||
objectExcludeProperties.Add("IsGenerator");
|
//objectExcludeProperties.Add("IsGenerator");
|
||||||
objectExcludeProperties.Add("IsScheduleable");
|
//objectExcludeProperties.Add("IsScheduleable");
|
||||||
objectExcludeProperties.Add("IsClientOrHeadOfficeAccount");
|
//objectExcludeProperties.Add("IsClientOrHeadOfficeAccount");
|
||||||
objectExcludeProperties.Add("IsClientAccount");
|
//objectExcludeProperties.Add("IsClientAccount");
|
||||||
objectExcludeProperties.Add("IsHeadOfficeAccount");
|
//objectExcludeProperties.Add("IsHeadOfficeAccount");
|
||||||
objectExcludeProperties.Add("OrganizationTypeAndID");
|
//objectExcludeProperties.Add("OrganizationTypeAndID");
|
||||||
|
|
||||||
UserPickList pl = UserPickList.GetList(false);
|
UserPickList pl = UserPickList.GetList(false);
|
||||||
progress.Append("Dumping " + pl.Count.ToString() + " Users");
|
progress.Append("Dumping " + pl.Count.ToString() + " Users");
|
||||||
foreach (UserPickList.UserPickListInfo i in pl)
|
foreach (UserPickList.UserPickListInfo i in pl)
|
||||||
{
|
{
|
||||||
|
//skip administrator
|
||||||
|
if (i.ID == User.AdministratorID) continue;
|
||||||
|
|
||||||
User c = User.GetItem(i.ID);
|
User c = User.GetItem(i.ID);
|
||||||
JObject xtra = new JObject();
|
dynamic d = new JObject();
|
||||||
xtra.Add("hexaScheduleBackColor", System.Drawing.ColorTranslator.ToHtml(System.Drawing.Color.FromArgb(c.ScheduleBackColor)));
|
d.name = c.FirstName + " " + c.LastName;
|
||||||
|
d.userType = (int)c.UserType;
|
||||||
|
if (c.VendorID != Guid.Empty)
|
||||||
|
d.userType = 7;//7 is the RAVEN user type for subcontractor
|
||||||
|
|
||||||
|
|
||||||
|
//JObject xtra = new JObject();
|
||||||
|
//xtra.Add("hexaScheduleBackColor", System.Drawing.ColorTranslator.ToHtml(System.Drawing.Color.FromArgb(c.ScheduleBackColor)));
|
||||||
|
|
||||||
//DumpObjectToFolder(tempArchiveFolder, c, "user." + c.ID.ToString(), objectExcludeProperties, new TypeAndID(RootObjectTypes.User, c.ID), null, xtra);
|
//DumpObjectToFolder(tempArchiveFolder, c, "user." + c.ID.ToString(), objectExcludeProperties, new TypeAndID(RootObjectTypes.User, c.ID), null, xtra);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user