Beispiel #1
0
        /// <summary>
        /// Retrieve the price break prices for the given product by calling MD141S
        /// </summary>
        /// <param name="talProduct">The TalentProduct object</param>
        /// <param name="err">error object</param>
        /// <returns>The datatable of price break prices</returns>
        private DataTable getPriceBreakPrices(ErrorObj err, long priceBreakId)
        {
            DataTable resultDataTable = new DataTable();

            _talProduct                   = new TalentProduct();
            _talProduct.Settings          = Environment.Settings.DESettings;
            _talProduct.Settings.Cacheing = true;
            _talProduct.De                = _deProdDetails;
            err = _talProduct.ProductPriceBreaks();
            _viewModel.Error = Data.PopulateErrorObject(err, _talProduct.ResultDataSet, _talProduct.Settings, 2);
            if (!_viewModel.Error.HasError)
            {
                if (priceBreakId == 0)
                {
                    resultDataTable = _talProduct.ResultDataSet.Tables["ProductPriceBreaks"];
                }
                else
                {
                    DataView priceBreakDefinitions = new DataView(_talProduct.ResultDataSet.Tables["ProductPriceBreaks"]);
                    priceBreakDefinitions.RowFilter = "PriceBreakId = " + priceBreakId;
                    resultDataTable = priceBreakDefinitions.ToTable();
                }
            }
            else
            {
                _talProduct.Settings.Logging.GeneralLog("SeatSelectionError", _viewModel.Error.ReturnCode, "Error getting price break prices from MD141S for Product Code: " + _talProduct.De.ProductCode + " | " + _viewModel.Error.ErrorMessage, "SeatSelectionLog");
            }
            return(resultDataTable);
        }
        /// <summary>
        /// Get the product details for the given product code - Call to WS016R and filter the products
        /// </summary>
        /// <param name="productCode">The given product code</param>
        /// <returns>DataSet of product details</returns>
        private DataTable retrieveProductDetails(string productCode)
        {
            DataSet       dsProductList = new DataSet();
            DataTable     dtProduct     = new DataTable();
            DataView      dvProduct     = new DataView();
            TalentProduct talProduct    = new TalentProduct();
            DESettings    settings      = Environment.Settings.DESettings;
            ErrorObj      err           = new ErrorObj();
            ErrorModel    errModel      = new ErrorModel();
            string        filter;

            talProduct.Settings = settings;
            talProduct.De.PriceAndAreaSelection = Environment.Settings.DefaultValues.PriceAndAreaSelection;
            talProduct.De.Src         = GlobalConstants.SOURCE;
            talProduct.De.StadiumCode = Environment.Settings.DefaultValues.CorporateStadium;

            err      = talProduct.ProductList();
            errModel = Data.PopulateErrorObject(err, talProduct.ResultDataSet.Tables[GlobalConstants.STATUS_RESULTS_TABLE_NAME], settings);
            if (!errModel.HasError)
            {
                dsProductList       = talProduct.ResultDataSet;
                filter              = "ProductCode = '" + productCode + "'";
                dvProduct           = new DataView(dsProductList.Tables["ProductListResults"]);
                dvProduct.RowFilter = filter;
                dtProduct           = dvProduct.ToTable();
            }
            return(dtProduct);
        }
Beispiel #3
0
        /// <summary>
        /// Checks to see if the price code of a basketItem is a free of charge price code
        /// </summary>
        /// <param name="basketItem"></param>
        /// <returns>a boolean</returns>
        private bool isPriceCodeFoC(DEBasketItem basketItem)
        {
            bool          priceCodeFoc = false;
            ErrorObj      err          = new ErrorObj();
            TalentProduct talProduct   = new TalentProduct();

            talProduct.Settings               = Environment.Settings.DESettings;
            talProduct.De.ProductCode         = basketItem.Product;
            talProduct.De.PriceCode           = basketItem.PRICE_CODE;
            talProduct.De.AllowPriceException = false;
            err = talProduct.ProductDetails();
            if (!err.HasError)
            {
                if (talProduct.ResultDataSet != null && talProduct.ResultDataSet.Tables["PriceCodes"].Rows.Count > 0)
                {
                    foreach (DataRow row in talProduct.ResultDataSet.Tables["PriceCodes"].Rows)
                    {
                        if (row["PriceCode"].ToString() == basketItem.PRICE_CODE)
                        {
                            priceCodeFoc = Talent.Common.Utilities.CheckForDBNull_Boolean_DefaultFalse(row["FreeOfCharge"]);
                            break;
                        }
                    }
                }
            }
            return(priceCodeFoc);
        }
        /// <summary>
        /// Get the available products groups fixtures - Call to PG002S
        /// </summary>
        /// <param name="productGroupCode">The given product group code</param>
        /// <returns>DataSet of available corporate hospitality product groups fixtures</returns>
        private DataSet retrieveProductGroupFixtures(string productGroupCode)
        {
            DataSet       dsResults  = new DataSet();
            TalentProduct talProduct = new TalentProduct();
            DESettings    settings   = Environment.Settings.DESettings;
            ErrorObj      err        = new ErrorObj();

            talProduct.Settings            = settings;
            talProduct.De.Src              = GlobalConstants.SOURCE;
            talProduct.De.ProductGroupCode = productGroupCode;
            err       = talProduct.RetrieveProductGroupFixtures();
            dsResults = talProduct.ResultDataSet;
            return(dsResults);
        }
        /// <summary>
        /// Get the available hospitality product groups - Call to PG001S
        /// </summary>
        /// <returns>DataSet of available corporate hospitality product groups</returns>
        private DataSet retrieveProductGroups()
        {
            DataSet       dsResults  = new DataSet();
            TalentProduct talProduct = new TalentProduct();
            DESettings    settings   = Environment.Settings.DESettings;
            ErrorObj      err        = new ErrorObj();

            talProduct.Settings        = settings;
            talProduct.De.Src          = GlobalConstants.SOURCE;
            talProduct.De.BusinessUnit = settings.BusinessUnit;
            err       = talProduct.RetrieveProductGroups();
            dsResults = talProduct.ResultDataSet;
            return(dsResults);
        }
        /// <summary>
        /// Get the available packages for the given available product code - Call to WS002R
        /// </summary>
        /// <param name="productCode">The hospitality product code</param>
        /// <returns>DataSet of available corporate hospitality packages and components</returns>
        private DataSet retrieveHospitalityPackages(string productCode)
        {
            DataSet       dsResults  = new DataSet();
            TalentProduct talProduct = new TalentProduct();
            DESettings    settings   = Environment.Settings.DESettings;
            ErrorObj      err        = new ErrorObj();

            talProduct.Settings        = settings;
            talProduct.De.ProductCode  = productCode;
            talProduct.De.BusinessUnit = settings.BusinessUnit;
            err       = talProduct.ProductHospitality();
            dsResults = talProduct.ResultDataSet;
            return(dsResults);
        }
Beispiel #7
0
        private List <TicketExchangeProducts> GetTicketExchangeProducts(int YearsOfPastProductsToShow, string ProductCodeDateDescriptionMask)
        {
            List <TicketExchangeProducts> productList = new List <TicketExchangeProducts>();

            // Call Talent Common
            // Retrieve the table form Talent Common
            // Turn this data into a list for the viewmodel
            DEProductDetails deProduct = new DEProductDetails();

            deProduct.ProductType               = GlobalConstants.HOMEPRODUCTTYPE;
            deProduct.ProductSubtype            = string.Empty;
            deProduct.ProductSupertype          = string.Empty;
            deProduct.YearsOfPastProductsToShow = YearsOfPastProductsToShow;
            ErrorObj      err           = new ErrorObj();
            TalentProduct talentProduct = new TalentProduct();

            talentProduct.Settings          = Environment.Settings.DESettings;
            talentProduct.Settings.Cacheing = true;
            talentProduct.De = deProduct;
            err = talentProduct.RetrieveProductsFiltered();
            DataTable products = talentProduct.ResultDataSet.Tables["ProductEntries"];

            if (!err.HasError)
            {
                productList = Data.PopulateObjectListFromTable <TicketExchangeProducts>(products);
                productList = productList.OrderByDescending(x => x.ProductDate).ToList();
            }



            foreach (var product in productList)
            {
                StringBuilder sBProductCodeDateDescriptionMask = new StringBuilder(ProductCodeDateDescriptionMask);
                sBProductCodeDateDescriptionMask.Replace("<<ProductCode>>", Utilities.CheckForDBNull_String(product.ProductCode));
                sBProductCodeDateDescriptionMask.Replace("<<ProductDate>>", Utilities.CheckForDBNull_String(Utilities.ISeriesDate(product.ProductDate.ToString())));
                sBProductCodeDateDescriptionMask.Replace("<<ProductDescription>>", Utilities.CheckForDBNull_String(product.ProductDescription));
                product.ProductMask = sBProductCodeDateDescriptionMask.ToString();
            }


            return(productList);
        }
Beispiel #8
0
        /// <summary>
        /// Retrieve the available stadium Stand/Area codes from WS011R for the given product
        /// </summary>
        /// <param name="talProduct">The TalentProduct object</param>
        /// <param name="err">error object</param>
        /// <returns>The datatable with only the stand and area data</returns>
        private DataTable getStadiumAvailability(ErrorObj err)
        {
            DataTable resultDataTable = new DataTable();

            _talProduct                   = new TalentProduct();
            _talProduct.Settings          = Environment.Settings.DESettings;
            _talProduct.Settings.Cacheing = true;
            _talProduct.De                = _deProdDetails;
            err = _talProduct.AvailableStands();
            _viewModel.Error = Data.PopulateErrorObject(err, _talProduct.ResultDataSet, _talProduct.Settings, 3);
            if (!_viewModel.Error.HasError)
            {
                resultDataTable = _talProduct.ResultDataSet.Tables["StadiumAvailability"];
            }
            else
            {
                _talProduct.Settings.Logging.GeneralLog("SeatSelectionError", _viewModel.Error.ReturnCode, "Error getting availablity from WS011R for Product Code: " + _talProduct.De.ProductCode + " | " + _viewModel.Error.ErrorMessage, "SeatSelectionLog");
            }
            return(resultDataTable);
        }
        /// <summary>
        /// Get the available products for the corporate hospitality stadium - Call to WS016R
        /// </summary>
        /// <param name="corporateStadiumCode">The given corporate stadium code</param>
        /// <returns>DataTable of available corporate hospitality products</returns>
        private DataTable retrieveCorporateStadiumProducts(string corporateStadiumCode)
        {
            DataTable     dtHospitalityProducts = new DataTable();
            DataSet       dsResults             = new DataSet();
            TalentProduct talProduct            = new TalentProduct();
            DESettings    settings = Environment.Settings.DESettings;
            ErrorObj      err      = new ErrorObj();

            talProduct.Settings = settings;
            talProduct.De.PriceAndAreaSelection = Environment.Settings.DefaultValues.PriceAndAreaSelection;
            talProduct.De.Src         = GlobalConstants.SOURCE;
            talProduct.De.StadiumCode = Environment.Settings.DefaultValues.CorporateStadium;
            err       = talProduct.ProductList();
            dsResults = talProduct.ResultDataSet;
            if (dsResults != null && dsResults.Tables.Count > 0)
            {
                dtHospitalityProducts = dsResults.Tables["ProductListResults"];
            }
            return(dtHospitalityProducts);
        }
        /// <summary>
        /// Get the available packages for the given available product code - Call to WS002R
        /// </summary>
        /// <param name="productCode">The hospitality product code</param>
        /// <returns>DataTable of available corporate hospitality packages</returns>
        private DataSet retrievePackageDetails(string productCode)
        {
            DataSet       dsTalProductDataSet   = new DataSet();
            DataTable     dtHospitalityPackages = new DataTable();
            TalentProduct talProduct            = new TalentProduct();
            DESettings    settings = Environment.Settings.DESettings;
            ErrorObj      err      = new ErrorObj();
            ErrorModel    errModel = new ErrorModel();

            talProduct.Settings       = settings;
            talProduct.De.ProductCode = productCode;

            err      = talProduct.ProductHospitality();
            errModel = Data.PopulateErrorObject(err, talProduct.ResultDataSet, settings, 4);
            if (!errModel.HasError)
            {
                dsTalProductDataSet = talProduct.ResultDataSet;
            }
            return(dsTalProductDataSet);
        }
Beispiel #11
0
        /// <summary>
        /// Calls backend for Template ID.
        /// </summary>
        /// <returns></returns>
        public string GetTicketingProductDetailsTemplateID(string productCode, string priceCode, int cacheMinutes, string cacheDependencyPath)
        {
            ErrorObj      errObj                  = new ErrorObj();
            DESettings    settingsEntity          = new DESettings();
            TalentProduct talProduct              = new TalentProduct();
            DataTable     dtProductProductDetails = new DataTable();

            talProduct.Settings       = Environment.Settings.DESettings;
            talProduct.De.ProductCode = Utilities.CheckForDBNull_String(productCode);
            talProduct.De.Src         = "W";
            talProduct.De.PriceCode   = priceCode;
            errObj = talProduct.ProductDetails();
            if (talProduct.ResultDataSet.Tables[2].Rows.Count > 0 && !(string.IsNullOrWhiteSpace((string)talProduct.ResultDataSet.Tables[2].Rows[0]["TemplateID"])))
            {
                return((string)talProduct.ResultDataSet.Tables[2].Rows[0]["TemplateID"]);
            }
            else
            {
                return("0");
            }
        }