示例#1
0
 Visitor getAdministrativeVisitor()
 {
     Visitor v = new Visitor();
     v.SSN = "";
     v.Name = "";
     v.UID = "";
     v.SiteID = "";
     v.SiteName = "";
     v.Phone = "No Phone";
     return v;
 }
示例#2
0
 internal Visitor toVisitor(SqlDataReader rdr, string encryptionKey)
 {
     Visitor result = new Visitor();
     if (_encrypt)
     {
         result.SSN = SSTCryptographer.Decrypt(rdr.GetString(rdr.GetOrdinal("SSN")), encryptionKey);
         result.Name = SSTCryptographer.Decrypt(rdr.GetString(rdr.GetOrdinal("Name")), encryptionKey);
         result.UID = SSTCryptographer.Decrypt(rdr.GetString(rdr.GetOrdinal("DUZ")), encryptionKey);
         result.SiteID = SSTCryptographer.Decrypt(rdr.GetString(rdr.GetOrdinal("SiteId")), encryptionKey);
         result.SiteName = SSTCryptographer.Decrypt(rdr.GetString(rdr.GetOrdinal("SiteName")), encryptionKey);
         result.Phone = SSTCryptographer.Decrypt(rdr.GetString(rdr.GetOrdinal("Phone")), encryptionKey);
     }
     else
     {
         result.SSN = rdr.GetString(rdr.GetOrdinal("SSN"));
         result.Name = rdr.GetString(rdr.GetOrdinal("Name"));
         result.UID = rdr.GetString(rdr.GetOrdinal("DUZ"));
         result.SiteID = rdr.GetString(rdr.GetOrdinal("SiteId"));
         result.SiteName = rdr.GetString(rdr.GetOrdinal("SiteName"));
         result.Phone = rdr.GetString(rdr.GetOrdinal("Phone"));
     }
     return result;
 }