/// <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); }
/// <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); }