Example #1
0
        /// <summary>
        /// ItemSearch
        /// Calls [usp_itemsearch_QuoteLine]
        /// </summary>
        public static List <QuoteLine> ItemSearch(System.Int32?clientId, System.Int32?orderBy, System.Int32?sortDir, System.Int32?pageIndex, System.Int32?pageSize, System.String partSearch, System.String cmSearch, System.Boolean?includeClosed, System.Int32?quoteNoLo, System.Int32?quoteNoHi, System.DateTime?dateQuotedFrom, System.DateTime?dateQuotedTo)
        {
            List <QuoteLineDetails> lstDetails = Rebound.GlobalTrader.DAL.SiteProvider.QuoteLine.ItemSearch(clientId, orderBy, sortDir, pageIndex, pageSize, partSearch, cmSearch, includeClosed, quoteNoLo, quoteNoHi, dateQuotedFrom, dateQuotedTo);

            if (lstDetails == null)
            {
                return(new List <QuoteLine>());
            }
            else
            {
                List <QuoteLine> lst = new List <QuoteLine>();
                foreach (QuoteLineDetails objDetails in lstDetails)
                {
                    Rebound.GlobalTrader.BLL.QuoteLine obj = new Rebound.GlobalTrader.BLL.QuoteLine();
                    obj.QuoteLineId  = objDetails.QuoteLineId;
                    obj.QuoteNumber  = objDetails.QuoteNumber;
                    obj.Quantity     = objDetails.Quantity;
                    obj.CurrencyCode = objDetails.CurrencyCode;
                    obj.Price        = objDetails.Price;
                    obj.CompanyNo    = objDetails.CompanyNo;
                    obj.CompanyName  = objDetails.CompanyName;
                    obj.DateQuoted   = objDetails.DateQuoted;
                    obj.Part         = objDetails.Part;
                    obj.ROHS         = objDetails.ROHS;
                    obj.RowNum       = objDetails.RowNum;
                    obj.RowCnt       = objDetails.RowCnt;
                    lst.Add(obj);
                    obj = null;
                }
                lstDetails = null;
                return(lst);
            }
        }
Example #2
0
        /// <summary>
        /// Source
        /// Calls [usp_source_QuoteLine]
        /// </summary>
        public static List <QuoteLine> Source(System.Int32?clientId, System.String partSearch, System.Int32?index, DateTime?maxDate, out DateTime?outDate, System.Boolean?blnReferesh, bool IsServerLocal)
        {
            DateTime?StartDate = null;
            DateTime?EndDate   = null;

            if (index == 2 && maxDate.HasValue)
            {
                StartDate = (!blnReferesh.Value) ? maxDate.Value.AddMonths(-6) : maxDate.Value.AddMonths(-12);
                EndDate   = maxDate.Value;
            }
            else if (index == 3 && maxDate.HasValue)
            {
                StartDate = DateTime.Parse("1900-01-01 00:00:00.000");
                EndDate   = maxDate.Value;
            }
            List <QuoteLineDetails> lstDetails = Rebound.GlobalTrader.DAL.SiteProvider.QuoteLine.Source(clientId, partSearch, index, StartDate, EndDate, out outDate, IsServerLocal);

            if (lstDetails == null)
            {
                return(new List <QuoteLine>());
            }
            else
            {
                List <QuoteLine> lst = new List <QuoteLine>();
                foreach (QuoteLineDetails objDetails in lstDetails)
                {
                    Rebound.GlobalTrader.BLL.QuoteLine obj = new Rebound.GlobalTrader.BLL.QuoteLine();
                    obj.QuoteLineId               = objDetails.QuoteLineId;
                    obj.QuoteNo                   = objDetails.QuoteNo;
                    obj.QuoteNumber               = objDetails.QuoteNumber;
                    obj.Quantity                  = objDetails.Quantity;
                    obj.Part                      = objDetails.Part;
                    obj.ROHS                      = objDetails.ROHS;
                    obj.ManufacturerNo            = objDetails.ManufacturerNo;
                    obj.ManufacturerCode          = objDetails.ManufacturerCode;
                    obj.CompanyNo                 = objDetails.CompanyNo;
                    obj.CompanyName               = objDetails.CompanyName;
                    obj.DateCode                  = objDetails.DateCode;
                    obj.DateQuoted                = objDetails.DateQuoted;
                    obj.Price                     = objDetails.Price;
                    obj.CurrencyCode              = objDetails.CurrencyCode;
                    obj.PackageName               = objDetails.PackageName;
                    obj.ProductName               = objDetails.ProductName;
                    obj.CustomerPart              = objDetails.CustomerPart;
                    obj.ClientNo                  = objDetails.ClientNo;
                    obj.ClientName                = objDetails.ClientName;
                    obj.ClientDataVisibleToOthers = objDetails.ClientDataVisibleToOthers;
                    obj.Salesman                  = objDetails.Salesman;
                    obj.SalesmanName              = objDetails.SalesmanName;
                    obj.ClientCode                = objDetails.ClientCode;
                    obj.Reason                    = objDetails.Reason;
                    obj.ReasonNote                = objDetails.ReasonNote;
                    lst.Add(obj);
                    obj = null;
                }
                lstDetails = null;
                return(lst);
            }
        }
Example #3
0
        private static QuoteLine PopulateFromDBDetailsObject(QuoteLineDetails obj)
        {
            QuoteLine objNew = new QuoteLine();

            objNew.QuoteLineId               = obj.QuoteLineId;
            objNew.QuoteNo                   = obj.QuoteNo;
            objNew.FullPart                  = obj.FullPart;
            objNew.Part                      = obj.Part;
            objNew.ManufacturerNo            = obj.ManufacturerNo;
            objNew.DateCode                  = obj.DateCode;
            objNew.PackageNo                 = obj.PackageNo;
            objNew.Quantity                  = obj.Quantity;
            objNew.Price                     = obj.Price;
            objNew.ETA                       = obj.ETA;
            objNew.Instructions              = obj.Instructions;
            objNew.ProductNo                 = obj.ProductNo;
            objNew.ReasonNo                  = obj.ReasonNo;
            objNew.CustomerPart              = obj.CustomerPart;
            objNew.StockNo                   = obj.StockNo;
            objNew.ServiceNo                 = obj.ServiceNo;
            objNew.ROHS                      = obj.ROHS;
            objNew.Closed                    = obj.Closed;
            objNew.OriginalOfferPrice        = obj.OriginalOfferPrice;
            objNew.OriginalOfferCurrencyNo   = obj.OriginalOfferCurrencyNo;
            objNew.OriginalOfferDate         = obj.OriginalOfferDate;
            objNew.OriginalOfferSupplierNo   = obj.OriginalOfferSupplierNo;
            objNew.Notes                     = obj.Notes;
            objNew.FullCustomerPart          = obj.FullCustomerPart;
            objNew.NotQuoted                 = obj.NotQuoted;
            objNew.SourcingResultNo          = obj.SourcingResultNo;
            objNew.UpdatedBy                 = obj.UpdatedBy;
            objNew.DLUP                      = obj.DLUP;
            objNew.QuoteId                   = obj.QuoteId;
            objNew.QuoteNumber               = obj.QuoteNumber;
            objNew.CurrencyCode              = obj.CurrencyCode;
            objNew.DateQuoted                = obj.DateQuoted;
            objNew.CompanyName               = obj.CompanyName;
            objNew.CompanyNo                 = obj.CompanyNo;
            objNew.ContactName               = obj.ContactName;
            objNew.ContactNo                 = obj.ContactNo;
            objNew.RowNum                    = obj.RowNum;
            objNew.RowCnt                    = obj.RowCnt;
            objNew.LineNotes                 = obj.LineNotes;
            objNew.ManufacturerName          = obj.ManufacturerName;
            objNew.ManufacturerCode          = obj.ManufacturerCode;
            objNew.PackageName               = obj.PackageName;
            objNew.PackageDescription        = obj.PackageDescription;
            objNew.ProductName               = obj.ProductName;
            objNew.ProductDescription        = obj.ProductDescription;
            objNew.CurrencyNo                = obj.CurrencyNo;
            objNew.ReasonName                = obj.ReasonName;
            objNew.OriginalOfferCurrencyCode = obj.OriginalOfferCurrencyCode;
            objNew.OriginalOfferSupplierName = obj.OriginalOfferSupplierName;
            objNew.ClientNo                  = obj.ClientNo;
            objNew.ClientName                = obj.ClientName;
            objNew.ClientDataVisibleToOthers = obj.ClientDataVisibleToOthers;
            return(objNew);
        }
Example #4
0
        /// <summary>
        /// DataListNugget
        /// Calls [usp_datalistnugget_QuoteLine]
        /// </summary>
        //[003] Added important parameter
        public static List <QuoteLine> DataListNugget(System.Int32?clientId, System.Int32?teamId, System.Int32?divisionId, System.Int32?loginId, System.Int32?orderBy, System.Int32?sortDir, System.Int32?pageIndex, System.Int32?pageSize, System.String partSearch, System.String contactSearch, System.String cmSearch, System.Int32?salesmanSearch, System.Boolean?includeClosed, System.Int32?quoteNoLo, System.Int32?quoteNoHi, System.DateTime?dateQuotedFrom, System.DateTime?dateQuotedTo, System.Boolean?recentOnly, System.Boolean?important, System.Int32?totalLo, System.Int32?totalHi, System.Int32?qStatus)
        {
            List <QuoteLineDetails> lstDetails = Rebound.GlobalTrader.DAL.SiteProvider.QuoteLine.DataListNugget(clientId, teamId, divisionId, loginId, orderBy, sortDir, pageIndex, pageSize, partSearch, contactSearch, cmSearch, salesmanSearch, includeClosed, quoteNoLo, quoteNoHi, dateQuotedFrom, dateQuotedTo, recentOnly, important, totalLo, totalHi, qStatus);

            if (lstDetails == null)
            {
                return(new List <QuoteLine>());
            }
            else
            {
                List <QuoteLine> lst = new List <QuoteLine>();
                foreach (QuoteLineDetails objDetails in lstDetails)
                {
                    Rebound.GlobalTrader.BLL.QuoteLine obj = new Rebound.GlobalTrader.BLL.QuoteLine();
                    obj.QuoteId         = objDetails.QuoteId;
                    obj.QuoteNumber     = objDetails.QuoteNumber;
                    obj.Part            = objDetails.Part;
                    obj.Price           = objDetails.Price;
                    obj.CurrencyCode    = objDetails.CurrencyCode;
                    obj.Quantity        = objDetails.Quantity;
                    obj.DateQuoted      = objDetails.DateQuoted;
                    obj.CompanyName     = objDetails.CompanyName;
                    obj.CompanyNo       = objDetails.CompanyNo;
                    obj.ContactName     = objDetails.ContactName;
                    obj.ContactNo       = objDetails.ContactNo;
                    obj.ROHS            = objDetails.ROHS;
                    obj.RowNum          = objDetails.RowNum;
                    obj.RowCnt          = objDetails.RowCnt;
                    obj.TotalValue      = objDetails.TotalValue;
                    obj.TotalInBase     = objDetails.TotalInBase;
                    obj.CurrencyNo      = objDetails.CurrencyNo;
                    obj.SalesmanName    = objDetails.SalesmanName;
                    obj.QuoteStatusName = objDetails.QuoteStatusName;
                    lst.Add(obj);
                    obj = null;
                }
                lstDetails = null;
                return(lst);
            }
        }
Example #5
0
        /// <summary>
        /// GetListOpenForQuote
        /// Calls [usp_selectAll_QuoteLine_Open_for_Quote]
        /// </summary>
        public static List <QuoteLine> GetListOpenForQuote(System.Int32?quoteId)
        {
            List <QuoteLineDetails> lstDetails = Rebound.GlobalTrader.DAL.SiteProvider.QuoteLine.GetListOpenForQuote(quoteId);

            if (lstDetails == null)
            {
                return(new List <QuoteLine>());
            }
            else
            {
                List <QuoteLine> lst = new List <QuoteLine>();
                foreach (QuoteLineDetails objDetails in lstDetails)
                {
                    Rebound.GlobalTrader.BLL.QuoteLine obj = new Rebound.GlobalTrader.BLL.QuoteLine();
                    obj.QuoteLineId               = objDetails.QuoteLineId;
                    obj.QuoteNo                   = objDetails.QuoteNo;
                    obj.FullPart                  = objDetails.FullPart;
                    obj.Part                      = objDetails.Part;
                    obj.ManufacturerNo            = objDetails.ManufacturerNo;
                    obj.DateCode                  = objDetails.DateCode;
                    obj.PackageNo                 = objDetails.PackageNo;
                    obj.Quantity                  = objDetails.Quantity;
                    obj.Price                     = objDetails.Price;
                    obj.ETA                       = objDetails.ETA;
                    obj.Instructions              = objDetails.Instructions;
                    obj.ProductNo                 = objDetails.ProductNo;
                    obj.ReasonNo                  = objDetails.ReasonNo;
                    obj.CustomerPart              = objDetails.CustomerPart;
                    obj.StockNo                   = objDetails.StockNo;
                    obj.ROHS                      = objDetails.ROHS;
                    obj.Closed                    = objDetails.Closed;
                    obj.ServiceNo                 = objDetails.ServiceNo;
                    obj.OriginalOfferPrice        = objDetails.OriginalOfferPrice;
                    obj.OriginalOfferCurrencyNo   = objDetails.OriginalOfferCurrencyNo;
                    obj.OriginalOfferDate         = objDetails.OriginalOfferDate;
                    obj.LineNotes                 = objDetails.LineNotes;
                    obj.UpdatedBy                 = objDetails.UpdatedBy;
                    obj.DLUP                      = objDetails.DLUP;
                    obj.ManufacturerName          = objDetails.ManufacturerName;
                    obj.ManufacturerCode          = objDetails.ManufacturerCode;
                    obj.PackageName               = objDetails.PackageName;
                    obj.PackageDescription        = objDetails.PackageDescription;
                    obj.ProductName               = objDetails.ProductName;
                    obj.ProductDescription        = objDetails.ProductDescription;
                    obj.CurrencyCode              = objDetails.CurrencyCode;
                    obj.CurrencyNo                = objDetails.CurrencyNo;
                    obj.QuoteNumber               = objDetails.QuoteNumber;
                    obj.CompanyNo                 = objDetails.CompanyNo;
                    obj.CompanyName               = objDetails.CompanyName;
                    obj.DateQuoted                = objDetails.DateQuoted;
                    obj.ReasonName                = objDetails.ReasonName;
                    obj.OriginalOfferCurrencyCode = objDetails.OriginalOfferCurrencyCode;
                    obj.NotQuoted                 = objDetails.NotQuoted;
                    obj.OriginalOfferSupplierNo   = objDetails.OriginalOfferSupplierNo;
                    obj.OriginalOfferSupplierName = objDetails.OriginalOfferSupplierName;
                    obj.SourcingResultNo          = objDetails.SourcingResultNo;
                    obj.ClientNo                  = objDetails.ClientNo;
                    //[001] code start
                    obj.ProductSource = objDetails.ProductSource;
                    //[001] code end
                    //[002] code start
                    obj.MSL = objDetails.MSL;
                    //[002] code end
                    lst.Add(obj);
                    obj = null;
                }
                lstDetails = null;
                return(lst);
            }
        }
Example #6
0
        /// <summary>
        /// Get
        /// Calls [usp_select_QuoteLine]
        /// </summary>
        public static QuoteLine Get(System.Int32?quoteLineId)
        {
            Rebound.GlobalTrader.DAL.QuoteLineDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.QuoteLine.Get(quoteLineId);
            if (objDetails == null)
            {
                return(null);
            }
            else
            {
                QuoteLine obj = new QuoteLine();
                obj.QuoteLineId               = objDetails.QuoteLineId;
                obj.QuoteNo                   = objDetails.QuoteNo;
                obj.FullPart                  = objDetails.FullPart;
                obj.Part                      = objDetails.Part;
                obj.ManufacturerNo            = objDetails.ManufacturerNo;
                obj.DateCode                  = objDetails.DateCode;
                obj.PackageNo                 = objDetails.PackageNo;
                obj.Quantity                  = objDetails.Quantity;
                obj.Price                     = objDetails.Price;
                obj.ETA                       = objDetails.ETA;
                obj.Instructions              = objDetails.Instructions;
                obj.ProductNo                 = objDetails.ProductNo;
                obj.ReasonNo                  = objDetails.ReasonNo;
                obj.CustomerPart              = objDetails.CustomerPart;
                obj.StockNo                   = objDetails.StockNo;
                obj.ROHS                      = objDetails.ROHS;
                obj.Closed                    = objDetails.Closed;
                obj.ServiceNo                 = objDetails.ServiceNo;
                obj.OriginalOfferPrice        = objDetails.OriginalOfferPrice;
                obj.OriginalOfferCurrencyNo   = objDetails.OriginalOfferCurrencyNo;
                obj.OriginalOfferDate         = objDetails.OriginalOfferDate;
                obj.LineNotes                 = objDetails.LineNotes;
                obj.UpdatedBy                 = objDetails.UpdatedBy;
                obj.DLUP                      = objDetails.DLUP;
                obj.ManufacturerName          = objDetails.ManufacturerName;
                obj.ManufacturerCode          = objDetails.ManufacturerCode;
                obj.PackageName               = objDetails.PackageName;
                obj.PackageDescription        = objDetails.PackageDescription;
                obj.ProductName               = objDetails.ProductName;
                obj.ProductDescription        = objDetails.ProductDescription;
                obj.CurrencyCode              = objDetails.CurrencyCode;
                obj.CurrencyNo                = objDetails.CurrencyNo;
                obj.QuoteNumber               = objDetails.QuoteNumber;
                obj.CompanyNo                 = objDetails.CompanyNo;
                obj.CompanyName               = objDetails.CompanyName;
                obj.DateQuoted                = objDetails.DateQuoted;
                obj.ReasonName                = objDetails.ReasonName;
                obj.OriginalOfferCurrencyCode = objDetails.OriginalOfferCurrencyCode;
                obj.NotQuoted                 = objDetails.NotQuoted;
                obj.OriginalOfferSupplierNo   = objDetails.OriginalOfferSupplierNo;
                obj.OriginalOfferSupplierName = objDetails.OriginalOfferSupplierName;
                obj.SourcingResultNo          = objDetails.SourcingResultNo;
                obj.ClientNo                  = objDetails.ClientNo;
                //[001] code start
                obj.ProductSource = objDetails.ProductSource;
                obj.SourcingTable = objDetails.SourcingTable;
                obj.DeliveryDate  = objDetails.DeliveryDate;
                obj.IsIPOCreated  = objDetails.IsIPOCreated;
                //[001] code end
                // obj.DeliveryDate = objDetails.DeliveryDate;
                obj.POHubCompanyNo  = objDetails.POHubCompanyNo;
                obj.QuoteNotes      = objDetails.QuoteNotes;
                obj.ProductInactive = objDetails.ProductInactive;
                obj.DutyCode        = objDetails.DutyCode;
                obj.DutyRate        = objDetails.DutyRate;
                // obj.IsImportant = objDetails.IsImportant;
                obj.MSLLevel = objDetails.MSL;

                obj.IsProdHazardous = objDetails.IsProdHazardous;
                obj.PrintHazardous  = objDetails.PrintHazardous;
                objDetails          = null;
                return(obj);
            }
        }