This commit is contained in:
@@ -360,6 +360,9 @@ namespace AyaNova.PlugIn.V8
|
|||||||
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)
|
||||||
{
|
{
|
||||||
|
List<string> tags = new List<string>();
|
||||||
|
tags.Add(ImportTag);
|
||||||
|
|
||||||
//skip administrator
|
//skip administrator
|
||||||
if (i.ID == User.AdministratorID) continue;
|
if (i.ID == User.AdministratorID) continue;
|
||||||
|
|
||||||
@@ -370,6 +373,16 @@ namespace AyaNova.PlugIn.V8
|
|||||||
if (c.VendorID != Guid.Empty)
|
if (c.VendorID != Guid.Empty)
|
||||||
d.userType = 7;//7 is the RAVEN user type for subcontractor
|
d.userType = 7;//7 is the RAVEN user type for subcontractor
|
||||||
|
|
||||||
|
d.active = false;//all imported users are inactive to start
|
||||||
|
d.employeeNumber = c.EmployeeNumber;
|
||||||
|
d.notes = c.Notes;
|
||||||
|
if (c.RegionID != Guid.Empty)
|
||||||
|
{
|
||||||
|
var t = TagMap[c.RegionID];
|
||||||
|
if (TagMap.ContainsKey() {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//JObject xtra = new JObject();
|
//JObject xtra = new JObject();
|
||||||
//xtra.Add("hexaScheduleBackColor", System.Drawing.ColorTranslator.ToHtml(System.Drawing.Color.FromArgb(c.ScheduleBackColor)));
|
//xtra.Add("hexaScheduleBackColor", System.Drawing.ColorTranslator.ToHtml(System.Drawing.Color.FromArgb(c.ScheduleBackColor)));
|
||||||
@@ -625,68 +638,77 @@ namespace AyaNova.PlugIn.V8
|
|||||||
#endregion dump
|
#endregion dump
|
||||||
|
|
||||||
#region Utility methods
|
#region Utility methods
|
||||||
|
private void AddTagIfExists(Guid g, List<string> tags)
|
||||||
private static string EnsureValidFileName(string fileName)
|
|
||||||
{
|
{
|
||||||
//make lower and replace spaces with dashes
|
var t = TagMap[g];
|
||||||
fileName = fileName.ToLowerInvariant().Replace(" ", "-");
|
if (!string.IsNullOrWhiteSpace(t))
|
||||||
|
|
||||||
//ensure each character is a valid path character
|
|
||||||
foreach (char c in System.IO.Path.GetInvalidFileNameChars())
|
|
||||||
{
|
{
|
||||||
fileName = fileName.Replace(c, '_');
|
tags.Add(t);
|
||||||
}
|
}
|
||||||
return fileName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//private static string EnsureValidFileName(string fileName)
|
||||||
|
//{
|
||||||
|
// //make lower and replace spaces with dashes
|
||||||
|
// fileName = fileName.ToLowerInvariant().Replace(" ", "-");
|
||||||
|
|
||||||
|
// //ensure each character is a valid path character
|
||||||
|
// foreach (char c in System.IO.Path.GetInvalidFileNameChars())
|
||||||
|
// {
|
||||||
|
// fileName = fileName.Replace(c, '_');
|
||||||
|
// }
|
||||||
|
// return fileName;
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
private static void makeFolderIfNotExist(string fldr, bool shouldNotExist = false)
|
|
||||||
{
|
|
||||||
if (Directory.Exists(fldr))
|
|
||||||
{
|
|
||||||
if (shouldNotExist)
|
|
||||||
throw new System.Exception("Error: path already exists and shouldn't:\r\n" + fldr);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Directory.CreateDirectory(fldr);
|
|
||||||
}
|
|
||||||
|
|
||||||
private List<string> standardExcludePropertiesList
|
//private static void makeFolderIfNotExist(string fldr, bool shouldNotExist = false)
|
||||||
{
|
//{
|
||||||
get
|
// if (Directory.Exists(fldr))
|
||||||
{
|
// {
|
||||||
return new List<string>()
|
// if (shouldNotExist)
|
||||||
{
|
// throw new System.Exception("Error: path already exists and shouldn't:\r\n" + fldr);
|
||||||
"CanWiki",
|
// return;
|
||||||
"CanDuplicate",
|
// }
|
||||||
"IsValid",
|
// Directory.CreateDirectory(fldr);
|
||||||
"IsDirty",
|
//}
|
||||||
"CurrentUserID",
|
|
||||||
"IsEditing",
|
|
||||||
"IsNew",
|
|
||||||
"IsDeleted",
|
|
||||||
"IsSavable",
|
|
||||||
"Notify",
|
|
||||||
"BrokenRulesText",
|
|
||||||
"Docs",
|
|
||||||
"MapQuestURL",
|
|
||||||
"FullAddress"
|
|
||||||
//"XXX",
|
|
||||||
//"XXX",
|
|
||||||
//"XXX",
|
|
||||||
//"XXX",
|
|
||||||
//"XXX",
|
|
||||||
//"XXX",
|
|
||||||
//"XXX",
|
|
||||||
//"XXX",
|
|
||||||
//"XXX",
|
|
||||||
//"XXX",
|
|
||||||
//"XXX"
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
//private List<string> standardExcludePropertiesList
|
||||||
}
|
//{
|
||||||
|
// get
|
||||||
|
// {
|
||||||
|
// return new List<string>()
|
||||||
|
// {
|
||||||
|
// "CanWiki",
|
||||||
|
// "CanDuplicate",
|
||||||
|
// "IsValid",
|
||||||
|
// "IsDirty",
|
||||||
|
// "CurrentUserID",
|
||||||
|
// "IsEditing",
|
||||||
|
// "IsNew",
|
||||||
|
// "IsDeleted",
|
||||||
|
// "IsSavable",
|
||||||
|
// "Notify",
|
||||||
|
// "BrokenRulesText",
|
||||||
|
// "Docs",
|
||||||
|
// "MapQuestURL",
|
||||||
|
// "FullAddress"
|
||||||
|
// //"XXX",
|
||||||
|
// //"XXX",
|
||||||
|
// //"XXX",
|
||||||
|
// //"XXX",
|
||||||
|
// //"XXX",
|
||||||
|
// //"XXX",
|
||||||
|
// //"XXX",
|
||||||
|
// //"XXX",
|
||||||
|
// //"XXX",
|
||||||
|
// //"XXX",
|
||||||
|
// //"XXX"
|
||||||
|
// };
|
||||||
|
|
||||||
|
// }
|
||||||
|
//}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region contract resolver
|
#region contract resolver
|
||||||
|
|||||||
Reference in New Issue
Block a user