This commit is contained in:
2020-11-25 19:12:01 +00:00
parent b87a7bcbcd
commit c85d84a458

View File

@@ -446,23 +446,28 @@ namespace AyaNova.PlugIn.V8
progress.Op("User " + d.name);
//throw new System.Exception("TODO: UserTypes sb done differently now to align");
//TODO: User type
//d.userType = (int)c.UserType;
d.userType = (int)c.UserType;
////if special 3rd party user type then set their parent object id to -1 to signify will fill in later and satisfy biz rules at server
//switch (c.UserType)
//{
// case UserTypes.Client:
// d.customerId = -1;
// break;
// case UserTypes.HeadOffice:
// d.headOfficeId = -1;
// break;
//}
//if (c.VendorID != Guid.Empty)
//{
// d.userType = 7;//7 is the RAVEN user type for subcontractor
// d.subVendorId = -1;
//}
//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
//they can be fixed up after their target objects are imported
switch (c.UserType)
{
case UserTypes.Client:
// d.customerId = -1;
d.userType = (int)UserTypes.NonSchedulable;
break;
case UserTypes.HeadOffice:
d.userType = (int)UserTypes.NonSchedulable;
// d.headOfficeId = -1;
break;
}
if (c.VendorID != Guid.Empty)
{
d.userType = (int)UserTypes.NonSchedulable;
// d.userType = 7;//7 is the RAVEN user type for subcontractor
// d.subVendorId = -1;
}
d.active = false;//all imported users are inactive to start