示例#1
0
 private static UserInfo ToUser(object[] r)
 {
     var u = new UserInfo
     {
         ID = new Guid((string)r[0]),
         UserName = (string)r[1],
         FirstName = (string)r[2],
         LastName = (string)r[3],
         Sex = r[4] != null ? Convert.ToBoolean(r[4]) : (bool?)null,
         BirthDate = (DateTime?)r[5],
         Status = (EmployeeStatus)Convert.ToInt32(r[6]),
         Title = (string)r[7],
         Department = (string)r[8],
         WorkFromDate = (DateTime?)r[9],
         TerminatedDate = (DateTime?)r[10],
         Email = (string)r[12],
         Location = (string)r[13],
         Notes = (string)r[14],
         Removed = Convert.ToBoolean(r[15]),
         LastModified = Convert.ToDateTime(r[16]),
         Tenant = Convert.ToInt32(r[17]),
         ActivationStatus = (EmployeeActivationStatus)Convert.ToInt32(r[18]),
         CultureName = (string)r[19],
         MobilePhone = (string)r[20],
         MobilePhoneActivationStatus = (MobilePhoneActivationStatus)Convert.ToInt32(r[21])
     };
     u.ContactsFromString((string)r[11]);
     return u;
 }