Exemplo n.º 1
0
        /// <summary>
        /// Returns a new CountingMethodDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual CountingMethodDetails GetCountingMethodFromReader(DbDataReader reader)
        {
            CountingMethodDetails countingMethod = new CountingMethodDetails();

            if (reader.HasRows)
            {
                countingMethod.CountingMethodId          = GetReaderValue_Int32(reader, "CountingMethodId", 0);            //From: [Table]
                countingMethod.CountingMethodDescription = GetReaderValue_String(reader, "CountingMethodDescription", ""); //From: [Table]
                countingMethod.Inactive  = GetReaderValue_Boolean(reader, "Inactive", false);                              //From: [Table]
                countingMethod.UpdatedBy = GetReaderValue_NullableInt32(reader, "UpdatedBy", null);                        //From: [Table]
                countingMethod.DLUP      = GetReaderValue_DateTime(reader, "DLUP", DateTime.MinValue);                     //From: [Table]
            }
            return(countingMethod);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Get
 /// Calls [usp_select_CountingMethod]
 /// </summary>
 public static CountingMethod Get(System.Int32?countingMethodId)
 {
     Rebound.GlobalTrader.DAL.CountingMethodDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.CountingMethod.Get(countingMethodId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         CountingMethod obj = new CountingMethod();
         obj.CountingMethodId          = objDetails.CountingMethodId;
         obj.CountingMethodDescription = objDetails.CountingMethodDescription;
         obj.Inactive  = objDetails.Inactive;
         obj.UpdatedBy = objDetails.UpdatedBy;
         obj.DLUP      = objDetails.DLUP;
         objDetails    = null;
         return(obj);
     }
 }