/// <summary> /// GetThumbnailImage /// Calls [usp_select_StockImage_ThumbnailImage] /// </summary> public static StockImage GetThumbnailImage(System.Int32?stockImageId) { Rebound.GlobalTrader.DAL.StockImageDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.StockImage.GetThumbnailImage(stockImageId); if (objDetails == null) { return(null); } else { StockImage obj = new StockImage(); obj.StockImageId = objDetails.StockImageId; obj.StockNo = objDetails.StockNo; obj.ThumbnailImage = objDetails.ThumbnailImage; obj.ThumbnailImageContentType = objDetails.ThumbnailImageContentType; objDetails = null; return(obj); } }
/// <summary> /// Get /// Calls [usp_select_StockImage] /// </summary> public static StockImage Get(System.Int32?stockImageId) { Rebound.GlobalTrader.DAL.StockImageDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.StockImage.Get(stockImageId); if (objDetails == null) { return(null); } else { StockImage obj = new StockImage(); obj.StockImageId = objDetails.StockImageId; obj.StockNo = objDetails.StockNo; obj.Caption = objDetails.Caption; obj.UpdatedBy = objDetails.UpdatedBy; obj.DLUP = objDetails.DLUP; objDetails = null; return(obj); } }
/// <summary> /// Returns a new StockImageDetails instance filled with the DataReader's current record data /// </summary> protected virtual StockImageDetails GetStockImageFromReader(DbDataReader reader) { StockImageDetails stockImage = new StockImageDetails(); if (reader.HasRows) { stockImage.StockImageId = GetReaderValue_Int32(reader, "StockImageId", 0); //From: [Table] stockImage.StockNo = GetReaderValue_Int32(reader, "StockNo", 0); //From: [Table] stockImage.Caption = GetReaderValue_String(reader, "Caption", ""); //From: [Table] stockImage.ThumbnailImage = GetReaderValue_ByteArray(reader, "ThumbnailImage", null); //From: [Table] stockImage.ThumbnailImageContentType = GetReaderValue_String(reader, "ThumbnailImageContentType", ""); //From: [Table] stockImage.MediumImage = GetReaderValue_ByteArray(reader, "MediumImage", null); //From: [Table] stockImage.MediumImageContentType = GetReaderValue_String(reader, "MediumImageContentType", ""); //From: [Table] stockImage.FullsizeImage = GetReaderValue_ByteArray(reader, "FullsizeImage", null); //From: [Table] stockImage.FullsizeImageContentType = GetReaderValue_String(reader, "FullsizeImageContentType", ""); //From: [Table] stockImage.UpdatedBy = GetReaderValue_NullableInt32(reader, "UpdatedBy", null); //From: [Table] stockImage.DLUP = GetReaderValue_NullableDateTime(reader, "DLUP", null); //From: [Table] } return(stockImage); }