internal static UserOrganization ToUserOrganizationEntity(bool IsActive, UserBO User, OrganizationBO Organization) { UserOrganization UserOrganization = new UserOrganization(); UserOrganization.Active = IsActive; UserOrganization.RoleId = User.Role; User UserInfo = new EFwcf.User(); Organization OrganizationInfo = new EFwcf.Organization(); UserInfo.EmailAddress = User.EmailAddress; UserInfo.UserName = User.EmailAddress; UserInfo.LastName = User.LastName; UserInfo.FirstName = User.FirstName; UserInfo.PhoneNumber = User.PhoneNumber; UserInfo.ResetPassword = User.ResetPassword; //false; UserInfo.PasswordHash = User.PasswordHash; //"PassWord1"; UserInfo.UGuid = User.UGuid; UserOrganization.User = UserInfo; OrganizationInfo.Organization1 = Organization.Organization; OrganizationInfo.IsEnabled = Organization.IsEnabled; OrganizationInfo.OrganizationKey = Organization.OrganizationKey; UserOrganization.Organization = OrganizationInfo; return(UserOrganization); }
internal static UserOrganization ToUserOrganizationEntity(bool IsActive, int UserId, int RoleId, OrganizationBO Organization) { UserOrganization UserOrganization = new UserOrganization(); UserOrganization.Active = IsActive; UserOrganization.RoleId = RoleId; UserOrganization.UserID = UserId; Organization OrganizationInfo = new EFwcf.Organization(); OrganizationInfo.Organization1 = Organization.Organization; OrganizationInfo.IsEnabled = Organization.IsEnabled; OrganizationInfo.OrganizationKey = Organization.OrganizationKey; OrganizationInfo.OrganizationId = Organization.OrganizationId; UserOrganization.Organization = OrganizationInfo; return(UserOrganization); }