Ejemplo n.º 1
0
        /// <summary>
        /// Returns a new StockLogReasonDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual StockLogReasonDetails GetStockLogReasonFromReader(DbDataReader reader)
        {
            StockLogReasonDetails stockLogReason = new StockLogReasonDetails();

            if (reader.HasRows)
            {
                stockLogReason.StockLogReasonId = GetReaderValue_Int32(reader, "StockLogReasonId", 0); //From: [Table]
                stockLogReason.Name             = GetReaderValue_String(reader, "Name", "");           //From: [Table]
                stockLogReason.ClientNo         = GetReaderValue_Int32(reader, "ClientNo", 0);         //From: [Table]
            }
            return(stockLogReason);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Get
 /// Calls [usp_select_StockLogReason]
 /// </summary>
 public static StockLogReason Get(System.Int32?stockLogReasonId)
 {
     Rebound.GlobalTrader.DAL.StockLogReasonDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.StockLogReason.Get(stockLogReasonId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         StockLogReason obj = new StockLogReason();
         obj.StockLogReasonId = objDetails.StockLogReasonId;
         obj.Name             = objDetails.Name;
         obj.ClientNo         = objDetails.ClientNo;
         objDetails           = null;
         return(obj);
     }
 }