Exemplo n.º 1
0
 /// <summary>
 /// Get
 /// Calls [usp_select_History]
 /// </summary>
 public static History Get(System.Int32?historyNo)
 {
     Rebound.GlobalTrader.DAL.HistoryDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.History.Get(historyNo);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         History obj = new History();
         obj.HistoryId                = objDetails.HistoryId;
         obj.FullPart                 = objDetails.FullPart;
         obj.Part                     = objDetails.Part;
         obj.ManufacturerNo           = objDetails.ManufacturerNo;
         obj.DateCode                 = objDetails.DateCode;
         obj.ProductNo                = objDetails.ProductNo;
         obj.PackageNo                = objDetails.PackageNo;
         obj.Quantity                 = objDetails.Quantity;
         obj.Price                    = objDetails.Price;
         obj.OriginalEntryDate        = objDetails.OriginalEntryDate;
         obj.Salesman                 = objDetails.Salesman;
         obj.SupplierNo               = objDetails.SupplierNo;
         obj.CurrencyNo               = objDetails.CurrencyNo;
         obj.ROHS                     = objDetails.ROHS;
         obj.UpdatedBy                = objDetails.UpdatedBy;
         obj.DLUP                     = objDetails.DLUP;
         obj.OfferStatusNo            = objDetails.OfferStatusNo;
         obj.OfferStatusChangeDate    = objDetails.OfferStatusChangeDate;
         obj.OfferStatusChangeLoginNo = objDetails.OfferStatusChangeLoginNo;
         obj.SupplierName             = objDetails.SupplierName;
         obj.Notes                    = objDetails.Notes;
         obj.ManufacturerName         = objDetails.ManufacturerName;
         obj.ProductName              = objDetails.ProductName;
         obj.PackageName              = objDetails.PackageName;
         obj.ClientNo                 = objDetails.ClientNo;
         obj.ManufacturerName         = objDetails.ManufacturerName;
         obj.SupplierName             = objDetails.SupplierName;
         obj.ProductDescription       = objDetails.ProductDescription;
         objDetails                   = null;
         return(obj);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Returns a new HistoryDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual HistoryDetails GetHistoryFromReader(DbDataReader reader)
        {
            HistoryDetails history = new HistoryDetails();

            if (reader.HasRows)
            {
                history.HistoryId                     = GetReaderValue_Int32(reader, "HistoryId", 0);                              //From: [Table]
                history.FullPart                      = GetReaderValue_String(reader, "FullPart", "");                             //From: [Table]
                history.Part                          = GetReaderValue_String(reader, "Part", "");                                 //From: [Table]
                history.ManufacturerNo                = GetReaderValue_NullableInt32(reader, "ManufacturerNo", null);              //From: [Table]
                history.DateCode                      = GetReaderValue_String(reader, "DateCode", "");                             //From: [Table]
                history.ProductNo                     = GetReaderValue_NullableInt32(reader, "ProductNo", null);                   //From: [Table]
                history.PackageNo                     = GetReaderValue_NullableInt32(reader, "PackageNo", null);                   //From: [Table]
                history.Quantity                      = GetReaderValue_Int32(reader, "Quantity", 0);                               //From: [Table]
                history.Price                         = GetReaderValue_Double(reader, "Price", 0);                                 //From: [Table]
                history.OriginalEntryDate             = GetReaderValue_NullableDateTime(reader, "OriginalEntryDate", null);        //From: [Table]
                history.Salesman                      = GetReaderValue_NullableInt32(reader, "Salesman", null);                    //From: [Table]
                history.SupplierNo                    = GetReaderValue_NullableInt32(reader, "SupplierNo", null);                  //From: [Table]
                history.CurrencyNo                    = GetReaderValue_NullableInt32(reader, "CurrencyNo", null);                  //From: [Table]
                history.ROHS                          = GetReaderValue_Byte(reader, "ROHS", (byte)0);                              //From: [Table]
                history.UpdatedBy                     = GetReaderValue_NullableInt32(reader, "UpdatedBy", null);                   //From: [Table]
                history.DLUP                          = GetReaderValue_DateTime(reader, "DLUP", DateTime.MinValue);                //From: [Table]
                history.OfferStatusNo                 = GetReaderValue_NullableInt32(reader, "OfferStatusNo", null);               //From: [Table]
                history.OfferStatusChangeDate         = GetReaderValue_NullableDateTime(reader, "OfferStatusChangeDate", null);    //From: [Table]
                history.OfferStatusChangeLoginNo      = GetReaderValue_NullableInt32(reader, "OfferStatusChangeLoginNo", null);    //From: [Table]
                history.SupplierName                  = GetReaderValue_String(reader, "SupplierName", "");                         //From: [Table]
                history.Notes                         = GetReaderValue_String(reader, "Notes", "");                                //From: [Table]
                history.ManufacturerName              = GetReaderValue_String(reader, "ManufacturerName", "");                     //From: [Table]
                history.ProductName                   = GetReaderValue_String(reader, "ProductName", "");                          //From: [Table]
                history.PackageName                   = GetReaderValue_String(reader, "PackageName", "");                          //From: [Table]
                history.ClientNo                      = GetReaderValue_NullableInt32(reader, "ClientNo", null);                    //From: [Table]
                history.CurrencyCode                  = GetReaderValue_String(reader, "CurrencyCode", "");                         //From: [usp_source_History]
                history.ManufacturerCode              = GetReaderValue_String(reader, "ManufacturerCode", "");                     //From: [usp_source_History]
                history.SupplierEmail                 = GetReaderValue_String(reader, "SupplierEmail", "");                        //From: [usp_source_History]
                history.SalesmanName                  = GetReaderValue_String(reader, "SalesmanName", "");                         //From: [usp_source_History]
                history.OfferStatusChangeEmployeeName = GetReaderValue_String(reader, "OfferStatusChangeEmployeeName", "");        //From: [usp_source_History]
                history.ClientName                    = GetReaderValue_String(reader, "ClientName", "");                           //From: [usp_source_History]
                history.ClientDataVisibleToOthers     = GetReaderValue_NullableBoolean(reader, "ClientDataVisibleToOthers", null); //From: [usp_source_History]
            }
            return(history);
        }