This commit is contained in:
@@ -446,27 +446,34 @@ namespace AyaNova.PlugIn.V8
|
|||||||
progress.Op("User " + d.name);
|
progress.Op("User " + d.name);
|
||||||
//throw new System.Exception("TODO: UserTypes sb done differently now to align");
|
//throw new System.Exception("TODO: UserTypes sb done differently now to align");
|
||||||
//TODO: User type
|
//TODO: User type
|
||||||
d.userType = (int)c.UserType;
|
//d.userType = (int)c.UserType;
|
||||||
|
|
||||||
//todo: this needs to be adjusted later
|
//todo: this needs to be adjusted later
|
||||||
//in order to allow import set the client and ho and sub users to regular non sched and
|
//after vendor, customer and headoffice objects are all exported
|
||||||
//they can be fixed up after their target objects are imported
|
//then loop through all users again here and set them accordingly if required
|
||||||
|
|
||||||
|
//RAVEN user types are different numbers so even the regular ones need to be set alternatively
|
||||||
switch (c.UserType)
|
switch (c.UserType)
|
||||||
{
|
{
|
||||||
|
case UserTypes.Administrator:
|
||||||
|
d.userType = 2;
|
||||||
|
break;
|
||||||
|
case UserTypes.NonSchedulable:
|
||||||
|
d.userType = 2;
|
||||||
|
break;
|
||||||
|
case UserTypes.Schedulable:
|
||||||
|
d.userType = 1;
|
||||||
|
break;
|
||||||
case UserTypes.Client:
|
case UserTypes.Client:
|
||||||
// d.customerId = -1;
|
d.userType = 2;//raven not service type
|
||||||
d.userType = (int)UserTypes.NonSchedulable;
|
|
||||||
break;
|
break;
|
||||||
case UserTypes.HeadOffice:
|
case UserTypes.HeadOffice:
|
||||||
d.userType = (int)UserTypes.NonSchedulable;
|
d.userType = 2;
|
||||||
// d.headOfficeId = -1;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (c.VendorID != Guid.Empty)
|
if (c.VendorID != Guid.Empty)
|
||||||
{
|
{
|
||||||
d.userType = (int)UserTypes.NonSchedulable;
|
d.userType = 2;
|
||||||
// d.userType = 7;//7 is the RAVEN user type for subcontractor
|
|
||||||
// d.subVendorId = -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user