Пример #1
0
        /// <summary>
        /// Returns a new SalesOrderStatusDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual SalesOrderStatusDetails GetSalesOrderStatusFromReader(DbDataReader reader)
        {
            SalesOrderStatusDetails salesOrderStatus = new SalesOrderStatusDetails();

            if (reader.HasRows)
            {
                salesOrderStatus.SalesOrderStatusId = GetReaderValue_Int32(reader, "SalesOrderStatusId", 0); //From: [Table]
                salesOrderStatus.Name = GetReaderValue_String(reader, "Name", "");                           //From: [Table]
            }
            return(salesOrderStatus);
        }
Пример #2
0
 /// <summary>
 /// Get
 /// Calls [usp_select_SalesOrderStatus]
 /// </summary>
 public static SalesOrderStatus Get(System.Int32?salesOrderStatusId)
 {
     Rebound.GlobalTrader.DAL.SalesOrderStatusDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.SalesOrderStatus.Get(salesOrderStatusId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         SalesOrderStatus obj = new SalesOrderStatus();
         obj.SalesOrderStatusId = objDetails.SalesOrderStatusId;
         obj.Name   = objDetails.Name;
         objDetails = null;
         return(obj);
     }
 }