コード例 #1
0
        /// <summary>
        /// Get
        /// Calls [usp_select_Offer]
        /// </summary>
        public static Offer Get(System.Int32?offerId, bool?isPoHub)
        {
            Rebound.GlobalTrader.DAL.OfferDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.Offer.Get(offerId, isPoHub);
            if (objDetails == null)
            {
                return(null);
            }
            else
            {
                Offer obj = new Offer();
                obj.OfferId                  = objDetails.OfferId;
                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.Notes                    = objDetails.Notes;
                obj.ManufacturerName         = objDetails.ManufacturerName;
                obj.ProductName              = objDetails.ProductName;
                obj.PackageName              = objDetails.PackageName;
                obj.SupplierName             = objDetails.SupplierName;
                obj.SupplierTotalQSA         = objDetails.SupplierTotalQSA;
                obj.SupplierLTB              = objDetails.SupplierLTB;
                obj.SupplierMOQ              = objDetails.SupplierMOQ;

                obj.MSL                = objDetails.MSL;
                obj.SPQ                = objDetails.SPQ;
                obj.LeadTime           = objDetails.LeadTime;
                obj.FactorySealed      = objDetails.FactorySealed;
                obj.RoHSStatus         = objDetails.RoHSStatus;
                obj.ProductDescription = objDetails.ProductDescription;
                obj.ProductInactive    = objDetails.ProductInactive;
                obj.MSLLevelNo         = objDetails.MSLLevelNo;
                objDetails             = null;
                return(obj);
            }
        }
コード例 #2
0
ファイル: OfferProvider.cs プロジェクト: vinay1988/Ang6API
        /// <summary>
        /// Returns a new OfferDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual OfferDetails GetOfferFromReader(DbDataReader reader)
        {
            OfferDetails offer = new OfferDetails();

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