public static SeatOptions GetSeatsForPackage(string sessionKey, int packageId, SeatOptionRestrictions restrictions) { return DoGetSeats(sessionKey, packageId, null, restrictions); }
public static SeatOptions GetSeatsForPerf(string sessionKey, int perfId, SeatOptionRestrictions restrictions) { return DoGetSeats(sessionKey, null, perfId, restrictions); }
private static SeatOptions DoGetSeats(string sessionKey, int? packageId, int? perfId, SeatOptionRestrictions restrictions) { string sCheckPriceTypesValue; if (restrictions == null || restrictions.RequiredPriceTypes == null) { sCheckPriceTypesValue = String.Empty; } else { if (restrictions.RequiredPriceTypes.IncludeAllPriceTypes) { sCheckPriceTypesValue = "All"; } else { sCheckPriceTypesValue = String.Join(",", restrictions.RequiredPriceTypes); } } DataSet results = UnsecureTess.GetSeatsBrief( sSessionKey: Mask(sessionKey), iPackageNumber: packageId ?? 0, iPerformanceNumber: perfId ?? 0, sZoneList: restrictions == null || restrictions.ZoneIds == null ? String.Empty : String.Join(",", restrictions.ZoneIds), sSectionList: restrictions == null || restrictions.SectionIds == null ? String.Empty : String.Join(",", restrictions.SectionIds), sScreenList: restrictions == null || restrictions.ScreenIds == null ? String.Empty : String.Join(",", restrictions.ScreenIds), cSummaryOnly: restrictions != null && restrictions.Summarize == true ? 'Y' : 'N', cCalcPackageAlloc: restrictions != null && restrictions.CalculatePackageAllocDetails == true ? 'Y' : 'N', sCheckPriceTypes: sCheckPriceTypesValue, cReturnNonSeats: restrictions != null && restrictions.GetNonSeats == true ? 'Y' : 'N'); if (results.Tables["S"].Rows.Count == 0) { return null; } return new SeatOptions(results.Tables["S"], results.Tables["Section"], results.Tables["SeatType"], results.Tables["Allocation"]); }