Пример #1
0
 /// <summary>
 /// Get
 /// Calls [usp_select_Excess]
 /// </summary>
 public static Excess Get(System.Int32?excessId, bool?isPoHub)
 {
     Rebound.GlobalTrader.DAL.ExcessDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.Excess.Get(excessId, isPoHub);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         Excess obj = new Excess();
         obj.ExcessId                 = objDetails.ExcessId;
         obj.ExcessName               = objDetails.ExcessName;
         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.CurrencyNo               = objDetails.CurrencyNo;
         obj.OriginalEntryDate        = objDetails.OriginalEntryDate;
         obj.Salesman                 = objDetails.Salesman;
         obj.CompanyNo                = objDetails.CompanyNo;
         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.Notes                    = objDetails.Notes;
         obj.ManufacturerName         = objDetails.ManufacturerName;
         obj.ProductName              = objDetails.ProductName;
         obj.PackageName              = objDetails.PackageName;
         obj.CompanyName              = objDetails.CompanyName;
         obj.SPQ                = objDetails.SPQ;
         obj.LeadTime           = objDetails.LeadTime;
         obj.RoHSStatus         = objDetails.RoHSStatus;
         obj.FactorySealed      = objDetails.FactorySealed;
         obj.MSL                = objDetails.MSL;
         obj.SupplierMOQ        = objDetails.SupplierMOQ;
         obj.SupplierTotalQSA   = objDetails.SupplierTotalQSA;
         obj.SupplierLTB        = objDetails.SupplierLTB;
         obj.ProductDescription = objDetails.ProductDescription;
         obj.ProductInactive    = objDetails.ProductInactive;
         obj.MSLLevelNo         = objDetails.MSLLevelNo;
         objDetails             = null;
         return(obj);
     }
 }
Пример #2
0
        /// <summary>
        /// Returns a new ExcessDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual ExcessDetails GetExcessFromReader(DbDataReader reader)
        {
            ExcessDetails excess = new ExcessDetails();

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