コード例 #1
0
        /// <summary>
        /// Returns a new CustomerRmaLineAllocationDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual CustomerRmaLineAllocationDetails GetCustomerRmaLineAllocationFromReader(DbDataReader reader)
        {
            CustomerRmaLineAllocationDetails customerRmaLineAllocation = new CustomerRmaLineAllocationDetails();

            if (reader.HasRows)
            {
                customerRmaLineAllocation.CustomerRMALineAllocationId = GetReaderValue_Int32(reader, "CustomerRMALineAllocationId", 0); //From: [Table]
                customerRmaLineAllocation.CustomerRMALineNo           = GetReaderValue_Int32(reader, "CustomerRMALineNo", 0);           //From: [Table]
                customerRmaLineAllocation.InvoiceLineAllocationNo     = GetReaderValue_Int32(reader, "InvoiceLineAllocationNo", 0);     //From: [Table]
                customerRmaLineAllocation.Quantity            = GetReaderValue_Int32(reader, "Quantity", 0);                            //From: [usp_select_CustomerRMA]
                customerRmaLineAllocation.GoodsInLineNo       = GetReaderValue_NullableInt32(reader, "GoodsInLineNo", null);            //From: [Table]
                customerRmaLineAllocation.UpdatedBy           = GetReaderValue_NullableInt32(reader, "UpdatedBy", null);                //From: [Table]
                customerRmaLineAllocation.DLUP                = GetReaderValue_DateTime(reader, "DLUP", DateTime.MinValue);             //From: [Table]
                customerRmaLineAllocation.CustomerRMAId       = GetReaderValue_Int32(reader, "CustomerRMAId", 0);                       //From: [Table]
                customerRmaLineAllocation.CustomerRMANumber   = GetReaderValue_Int32(reader, "CustomerRMANumber", 0);                   //From: [Table]
                customerRmaLineAllocation.CustomerRMADate     = GetReaderValue_DateTime(reader, "CustomerRMADate", DateTime.MinValue);  //From: [Table]
                customerRmaLineAllocation.ReturnDate          = GetReaderValue_NullableDateTime(reader, "ReturnDate", null);            //From: [Table]
                customerRmaLineAllocation.ClientNo            = GetReaderValue_Int32(reader, "ClientNo", 0);                            //From: [Table]
                customerRmaLineAllocation.Reason              = GetReaderValue_String(reader, "Reason", "");                            //From: [Table]
                customerRmaLineAllocation.InvoiceNumber       = GetReaderValue_Int32(reader, "InvoiceNumber", 0);                       //From: [usp_itemsearch_CustomerRMA]
                customerRmaLineAllocation.InvoiceNo           = GetReaderValue_NullableInt32(reader, "InvoiceNo", null);                //From: [Table]
                customerRmaLineAllocation.InvoiceLineNo       = GetReaderValue_Int32(reader, "InvoiceLineNo", 0);                       //From: [Table]
                customerRmaLineAllocation.CompanyNo           = GetReaderValue_Int32(reader, "CompanyNo", 0);                           //From: [Table]
                customerRmaLineAllocation.CompanyName         = GetReaderValue_String(reader, "CompanyName", "");                       //From: [usp_itemsearch_CustomerRMA]
                customerRmaLineAllocation.PurchaseOrderLineNo = GetReaderValue_NullableInt32(reader, "PurchaseOrderLineNo", null);      //From: [usp_selectAll_CustomerRMALineAllocation_for_PurchaseOrderLine]
                customerRmaLineAllocation.AuthorisedBy        = GetReaderValue_Int32(reader, "AuthorisedBy", 0);                        //From: [Table]
                customerRmaLineAllocation.AuthoriserName      = GetReaderValue_String(reader, "AuthoriserName", "");                    //From: [usp_itemsearch_CustomerRMA]
                customerRmaLineAllocation.StockNo             = GetReaderValue_NullableInt32(reader, "StockNo", null);                  //From: [usp_selectAll_CustomerRMALineAllocation_for_PurchaseOrderLine]
            }
            return(customerRmaLineAllocation);
        }
コード例 #2
0
 /// <summary>
 /// Get
 /// Calls [usp_select_CustomerRMALineAllocation]
 /// </summary>
 public static CustomerRmaLineAllocation Get(System.Int32?customerRmaLineAllocationId)
 {
     Rebound.GlobalTrader.DAL.CustomerRmaLineAllocationDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.CustomerRmaLineAllocation.Get(customerRmaLineAllocationId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         CustomerRmaLineAllocation obj = new CustomerRmaLineAllocation();
         obj.CustomerRMALineAllocationId = objDetails.CustomerRMALineAllocationId;
         obj.CustomerRMALineNo           = objDetails.CustomerRMALineNo;
         obj.InvoiceLineAllocationNo     = objDetails.InvoiceLineAllocationNo;
         obj.Quantity      = objDetails.Quantity;
         obj.GoodsInLineNo = objDetails.GoodsInLineNo;
         obj.UpdatedBy     = objDetails.UpdatedBy;
         obj.DLUP          = objDetails.DLUP;
         objDetails        = null;
         return(obj);
     }
 }