Exemple #1
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);
        }
Exemple #2
0
        /// <summary>
        /// Retrieve the product details from WS007R for only the price band information
        /// </summary>
        /// <param name="talProduct">The TalentProduct object</param>
        /// <param name="err">error object</param>
        /// <returns>The datatable with only the descriptive price band data</returns>
        private DataTable getProductPriceBands(ErrorObj err)
        {
            DataTable resultDataTable = new DataTable();

            _talProduct                   = new TalentProduct();
            _talProduct.Settings          = Environment.Settings.DESettings;
            _talProduct.Settings.Cacheing = true;
            _talProduct.De                = _deProdDetails;
            err = _talProduct.ProductDetails();
            _viewModel.Error = Data.PopulateErrorObject(err, _talProduct.ResultDataSet, _talProduct.Settings, 5);
            if (!_viewModel.Error.HasError)
            {
                resultDataTable = _talProduct.ResultDataSet.Tables["ProductPriceBands"];
            }
            else
            {
                _talProduct.Settings.Logging.GeneralLog("SeatSelectionError", _viewModel.Error.ReturnCode, "Error getting price bands from WS007R for Product Code: " + _talProduct.De.ProductCode + " | " + _viewModel.Error.ErrorMessage, "SeatSelectionLog");
            }
            return(resultDataTable);
        }
Exemple #3
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");
            }
        }