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

            if (reader.HasRows)
            {
                stockLogType.StockLogTypeId       = GetReaderValue_Int32(reader, "StockLogTypeId", 0);                  //From: [Table]
                stockLogType.Name                 = GetReaderValue_String(reader, "Name", "");                          //From: [Table]
                stockLogType.ParentStockLogTypeNo = GetReaderValue_NullableInt32(reader, "ParentStockLogTypeNo", null); //From: [Table]
            }
            return(stockLogType);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Get
 /// Calls [usp_select_StockLogType]
 /// </summary>
 public static StockLogType Get(System.Int32?stockLogTypeId)
 {
     Rebound.GlobalTrader.DAL.StockLogTypeDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.StockLogType.Get(stockLogTypeId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         StockLogType obj = new StockLogType();
         obj.StockLogTypeId       = objDetails.StockLogTypeId;
         obj.Name                 = objDetails.Name;
         obj.ParentStockLogTypeNo = objDetails.ParentStockLogTypeNo;
         objDetails               = null;
         return(obj);
     }
 }