/// <summary> /// Returns a new SaleTypeDetails instance filled with the DataReader's current record data /// </summary> protected virtual SaleTypeDetails GetSaleTypeFromReader(DbDataReader reader) { SaleTypeDetails saleType = new SaleTypeDetails(); if (reader.HasRows) { saleType.SaleTypeId = GetReaderValue_Int32(reader, "SaleTypeId", 0); //From: [Table] saleType.Name = GetReaderValue_String(reader, "Name", ""); //From: [Table] } return(saleType); }
/// <summary> /// Get /// Calls [usp_select_SaleType] /// </summary> public static SaleType Get(System.Int32?saleTypeId) { Rebound.GlobalTrader.DAL.SaleTypeDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.SaleType.Get(saleTypeId); if (objDetails == null) { return(null); } else { SaleType obj = new SaleType(); obj.SaleTypeId = objDetails.SaleTypeId; obj.Name = objDetails.Name; objDetails = null; return(obj); } }