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

            if (reader.HasRows)
            {
                reason.ReasonId  = GetReaderValue_Int32(reader, "ReasonId", 0);          //From: [Table]
                reason.Name      = GetReaderValue_String(reader, "Name", "");            //From: [Table]
                reason.Locked    = GetReaderValue_Boolean(reader, "Locked", false);      //From: [Table]
                reason.Sold      = GetReaderValue_Boolean(reader, "Sold", false);        //From: [Table]
                reason.NotQuoted = GetReaderValue_Boolean(reader, "NotQuoted", false);   //From: [Table]
            }
            return(reason);
        }
Beispiel #2
0
 /// <summary>
 /// Get
 /// Calls [usp_select_Reason]
 /// </summary>
 public static Reason Get(System.Int32?reasonId)
 {
     Rebound.GlobalTrader.DAL.ReasonDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.Reason.Get(reasonId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         Reason obj = new Reason();
         obj.ReasonId  = objDetails.ReasonId;
         obj.Name      = objDetails.Name;
         obj.Locked    = objDetails.Locked;
         obj.Sold      = objDetails.Sold;
         obj.NotQuoted = objDetails.NotQuoted;
         objDetails    = null;
         return(obj);
     }
 }