private static ProdSeasonCollection DoGetProductions(string sessionKey, DateTime? startDateTime, DateTime? endDateTime, string artistFirstName, string artistMiddleName, string artistLastName, short? venueId, string[] keywords, short? modeOfSaleId, int? businessUnit, string fullTextSearchCriteria, FullTextSearchSyntaxType? fullTextSearchSyntaxType, ContentTypeIdsParam contentTypeIds, bool? matchAllKeywords, int[] perfIds, short[] seasonIds, int[] ids) { int iKeywordAndOrStatementValue; if (matchAllKeywords.HasValue) { iKeywordAndOrStatementValue = matchAllKeywords.Value ? 2 : 1; } else { iKeywordAndOrStatementValue = 0; } string sArtistValue; bool hasLastName = !String.IsNullOrWhiteSpace(artistLastName); bool hasFirstName = !String.IsNullOrWhiteSpace(artistFirstName); bool hasMiddleName = !String.IsNullOrWhiteSpace(artistMiddleName); if (hasLastName || hasFirstName || hasMiddleName) { StringBuilder syntax = new StringBuilder(); if (hasLastName) { syntax.Append(artistLastName.Replace("/",String.Empty)); } if (hasFirstName || hasMiddleName) { syntax.Append("/"); } if (hasFirstName) { syntax.Append(artistFirstName.Replace("/", String.Empty)); } if (hasMiddleName) { syntax.Append("/" + artistMiddleName.Replace("/", String.Empty)); } sArtistValue = syntax.ToString(); } else { sArtistValue = ""; } DataSet results = UnsecureTess.GetProductionsEx3( sSessionKey: Mask(sessionKey), sStartDate: startDateTime.HasValue ? startDateTime.ToString() : String.Empty, sEndDate: endDateTime.HasValue ? endDateTime.ToString() : String.Empty, sPerfType: String.Empty, sArtist: sArtistValue, iVenueID: venueId ?? -1, sKeywords: keywords == null ? String.Empty : String.Join(",", keywords), iModeOfSale: modeOfSaleId ?? Defaults.ModeOfSaleId, iBusinessUnit: businessUnit ?? -1, sFullText: fullTextSearchCriteria ?? String.Empty, sFullTextType: Mask(fullTextSearchSyntaxType), sContentType: contentTypeIds == null ? String.Empty : contentTypeIds.ToString(), iKeywordAndOrStatement: iKeywordAndOrStatementValue, sPerformanceIds: perfIds == null ? String.Empty : String.Join(",", perfIds), sSeasonIds: seasonIds == null ? String.Empty : String.Join(",", seasonIds), sProductionSeasonIds: ids == null ? String.Empty : String.Join(",", ids)); if (results.Tables["Production"].Rows.Count == 0) { return null; } return new ProdSeasonCollection(results.Tables["Production"], results.Tables["Credit"], results.Tables["Keyword"]); }
private static ProdSeasonDetails DoGetProductionDetails(string sessionKey, int? perfId, int? prodSeasonId, short? modeOfSaleId, int? businessUnit, ContentTypeIdsParam contentTypeIds, bool? computeSeatCounts) { string sContentTypesValue = String.Empty; string sPerformanceContentTypesValue = String.Empty; if (contentTypeIds != null) { if (prodSeasonId.HasValue) { sContentTypesValue = contentTypeIds.ToString(); } else if (perfId.HasValue) { sPerformanceContentTypesValue = contentTypeIds.ToString(); } } DataSet results = UnsecureTess.GetProductionDetailEx3( SessionKey: Mask(sessionKey), iPerf_no: perfId ?? 0, iProd_Season_no: prodSeasonId ?? 0, iModeOfSale: modeOfSaleId ?? Defaults.ModeOfSaleId, iBusinessUnit: businessUnit ?? Defaults.BusinessUnit, sContentTypes: sContentTypesValue, sPerformanceContentTypes: sPerformanceContentTypesValue, bIncludeSeatCounts: computeSeatCounts ?? false); if (results.Tables[0].Rows.Count == 0) { return null; } return new ProdSeasonDetails(results, prodSeasonId.HasValue); }
private static SyosSeatPricing DoGetPerformanceDetailSyos(string sessionKey, int perfId, short? modeOfSaleId, ContentTypeIdsParam contentTypeIds) { DataSet results = UnsecureTess.GetPerformanceDetailWithDiscountingSYOSDataSet( SessionKey: Mask(sessionKey), iPerf_no: perfId, iModeOfSale: modeOfSaleId ?? Defaults.ModeOfSaleId, sContentType: contentTypeIds == null ? String.Empty : contentTypeIds.ToString()); DataTableCollection tables = results.Tables; if (tables["Performance"].Rows.Count == 0) { return null; } return new SyosSeatPricing(tables["Performance"], tables["PriceTypes"], tables["Section"], tables["SectionPriceTypes"]); }
private static PerfCollection DoGetPerformances(string sessionKey, DateTime? startDateTime, DateTime? endDateTime, short? venueId, short? modeOfSaleId, int? businessUnit, PerfSortField? sortField, string[] keywords, bool? matchAllKeywords, string artistLastName, string artistFirstName, string artistMiddleName, string fullTextSearchCriteria, FullTextSearchSyntaxType? fullTextSearchSyntaxType, ContentTypeIdsParam contentTypeIds, int[] perfIds, int[] seasonIds, bool? computeSeatCounts) { string cKeywordAndOrStatementValue; if (matchAllKeywords.HasValue) { cKeywordAndOrStatementValue = matchAllKeywords.Value ? "2" : "1"; } else { cKeywordAndOrStatementValue = String.Empty; } string sArtistLastNameValue; if (artistLastName == null && artistFirstName == null && artistMiddleName == null) { sArtistLastNameValue = String.Empty; } else { sArtistLastNameValue = Mask(artistLastName) + "/" + Mask(artistFirstName) + "/" + Mask(artistMiddleName); } DataSet results = UnsecureTess.GetPerformancesEx4( sWebSessionId: Mask(sessionKey), sStartDate: startDateTime.HasValue ? startDateTime.ToString() : String.Empty, sEndDate: endDateTime.HasValue ? endDateTime.ToString() : String.Empty, iVenueID: venueId ?? -1, iModeOfSale: modeOfSaleId ?? Defaults.ModeOfSaleId, iBusinessUnit: businessUnit ?? -1, sSortString: Mask(sortField), sKeywords: keywords == null ? String.Empty : String.Join(",", keywords), cKeywordAndOrStatement: cKeywordAndOrStatementValue, sArtistLastName: sArtistLastNameValue, sFullText: fullTextSearchCriteria ?? String.Empty, sFullTextType: Mask(fullTextSearchSyntaxType), sContentType: contentTypeIds == null ? String.Empty : contentTypeIds.ToString(), sPerformanceIds: perfIds == null ? String.Empty : String.Join(",", perfIds), sSeasonIds: seasonIds == null ? String.Empty : String.Join(",", seasonIds), bIncludeSeatCounts: computeSeatCounts ?? false); if (results.Tables["Performance"].Rows.Count == 0) { return null; } return new PerfCollection(results.Tables["Performance"]); }
private static SeatPricing DoGetPerformanceDetails(string sessionKey, int perfId, short? modeOfSaleId, ContentTypeIdsParam contentTypeIds) { return new SeatPricing(UnsecureTess.GetPerformanceDetailWithDiscountingEx( SessionKey: sessionKey, iPerf_no: perfId, iModeOfSale: modeOfSaleId ?? Defaults.ModeOfSaleId, sContentType: contentTypeIds == null ? String.Empty : contentTypeIds.ToString())); }