Example #1
0
        /// <summary>
        /// Returns a new PurchaseOrderStatusDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual PurchaseOrderStatusDetails GetPurchaseOrderStatusFromReader(DbDataReader reader)
        {
            PurchaseOrderStatusDetails purchaseOrderStatus = new PurchaseOrderStatusDetails();

            if (reader.HasRows)
            {
                purchaseOrderStatus.PurchaseOrderStatusId = GetReaderValue_Int32(reader, "PurchaseOrderStatusId", 0); //From: [Table]
                purchaseOrderStatus.Name = GetReaderValue_String(reader, "Name", "");                                 //From: [Table]
            }
            return(purchaseOrderStatus);
        }
Example #2
0
 /// <summary>
 /// Get
 /// Calls [usp_select_PurchaseOrderStatus]
 /// </summary>
 public static PurchaseOrderStatus Get(System.Int32?purchaseOrderStatusId)
 {
     Rebound.GlobalTrader.DAL.PurchaseOrderStatusDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.PurchaseOrderStatus.Get(purchaseOrderStatusId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         PurchaseOrderStatus obj = new PurchaseOrderStatus();
         obj.PurchaseOrderStatusId = objDetails.PurchaseOrderStatusId;
         obj.Name   = objDetails.Name;
         objDetails = null;
         return(obj);
     }
 }