Beispiel #1
0
        /// <summary>
        /// Returns a new MaritalStatusDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual MaritalStatusDetails GetMaritalStatusFromReader(DbDataReader reader)
        {
            MaritalStatusDetails maritalStatus = new MaritalStatusDetails();

            if (reader.HasRows)
            {
                maritalStatus.MaritalStatusId = GetReaderValue_Int32(reader, "MaritalStatusId", 0); //From: [Table]
                maritalStatus.Name            = GetReaderValue_String(reader, "Name", "");          //From: [Table]
            }
            return(maritalStatus);
        }
Beispiel #2
0
 /// <summary>
 /// Get
 /// Calls [usp_select_MaritalStatus]
 /// </summary>
 public static MaritalStatus Get(System.Int32?maritalStatusId)
 {
     Rebound.GlobalTrader.DAL.MaritalStatusDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.MaritalStatus.Get(maritalStatusId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         MaritalStatus obj = new MaritalStatus();
         obj.MaritalStatusId = objDetails.MaritalStatusId;
         obj.Name            = objDetails.Name;
         objDetails          = null;
         return(obj);
     }
 }