public ProdSeason(int? _prod_season_no, string _prod_desc, short? _season_no, string _season_desc, string _language, string _composer, string _author, DateTime? _first_dt, DateTime? _last_dt, string _synop, short? _premiere_id, string _premiere_desc, string _perf_no, bool? _on_sale_ind, EnumerableRowCollection<DataRow> enumCredits, EnumerableRowCollection<DataRow> enumKeywords) { Id = _prod_season_no; Name = _prod_desc; SeasonId = _season_no; SeasonName = _season_desc; Language = _language; Composer = _composer; Author = _author; FirstDate = _first_dt; LastDate = _last_dt; Synopsis = _synop; PremiereId = _premiere_id; PremiereName = _premiere_desc; PerfId = _perf_no; IsOnSale = _on_sale_ind; Credits = new CreditCollection(enumCredits, "prod_season_no", Id); KeywordCategories = new ProdSeasonKeywordCatCollection(enumKeywords, Id); }
protected override async Task <bool> GetDataAsync() { var resource = new CreditResource(Context); _results = await resource.GetCreditsAsync(startIndex : StartIndex, pageSize : PageSize, sortBy : SortBy, filter : Filter, responseFields : ResponseFields); TotalCount = _results.TotalCount; PageCount = _results.PageCount; PageSize = _results.PageSize; return(_results.Items != null && _results.Items.Count > 0); }
public ProdSeasonDetails(DataSet tessResults, bool searchedByProdSeasonId) { var results = (from tRow in tessResults.Tables["Title"].AsEnumerable() join pRow in tessResults.Tables["Production"].AsEnumerable() on true equals true select new { InventoryId = tRow.Field<int?>("inv_no"), Name = tRow.Field<string>("description"), TitleType= tRow.Field<string>("type"), ShortName = tRow.Field<string>("short_name"), Text1 = tRow.Field<string>("text1"), Text2 = tRow.Field<string>("text2"), Text3 = tRow.Field<string>("text3"), Text4 = tRow.Field<string>("text4"), PerfDate = searchedByProdSeasonId ? null : tRow.Field<DateTime?>("perf_dt"), Id = pRow.Field<int?>("prod_season_no"), ProdId = pRow.Field<int?>("prod_no"), TitleId = pRow.Field<int?>("title_no"), Duration = pRow.Field<int?>("duration"), LanguageId = pRow.Field<int?>("lang"), Cost = pRow.Field<decimal?>("cost"), Synopsis = pRow.Field<string>("synop"), ActsCount = pRow.Field<short?>("num_acts"), CreatedLocation = pRow.Field<string>("create_loc"), CreatedBy = pRow.Field<string>("created_by"), CreatedDate = pRow.Field<DateTime?>("create_dt"), EraId = pRow.Field<short?>("era"), OriginalLanguageId = pRow.Field<short?>("orig_lang"), Libretto = pRow.Field<string>("lib"), Author = pRow.Field<string>("author"), OriginalSynopsis = pRow.Field<string>("orig_synop"), LanguageName = pRow.Field<string>("LangDesc"), ComposerId = pRow.Field<short?>("composerID"), ComposerFirstName = pRow.Field<string>("ComposerFN"), ComposerMiddleName = pRow.Field<string>("ComposerMN"), ComposerLastName = pRow.Field<string>("ComposerLN"), ComposerBio = pRow.Field<string>("bio"), Inactive = pRow.Field<string>("inactive"), VenueName = pRow.Field<string>("facility_desc") }).Single(); InventoryId = results.InventoryId; Name = results.Name; TitleType = results.TitleType; ShortName = results.ShortName; Text1 = results.Text1; Text2 = results.Text2; Text3 = results.Text3; Text4 = results.Text4; PerfDate = results.PerfDate; Id = results.Id; ProductionId = results.ProdId; TitleId = results.TitleId; Duration = results.Duration; LanguageId = results.LanguageId; Cost = results.Cost; Synopsis = results.Synopsis; ActsCount = results.ActsCount; CreatedLocation = results.CreatedLocation; CreatedBy = results.CreatedBy; CreatedDate = results.CreatedDate; EraId = results.EraId; OriginalLanguageId = results.OriginalLanguageId; Libretto = results.Libretto; Author = results.Author; OriginalSynopsis = results.OriginalSynopsis; LanguageName = results.LanguageName; ComposerId = results.ComposerId; ComposerFirstName = results.ComposerFirstName; ComposerMiddleName = results.ComposerMiddleName; ComposerLastName = results.ComposerLastName; ComposerBio = results.ComposerBio; Active = Invert(ToBool(results.Inactive)); VenueName = results.VenueName; DataTableCollection tables = tessResults.Tables; if (tables["Performance"].Rows.Count != 0) { Performances = new PerfCollection(tables["Performance"]); } if (tables["Credits"].Rows.Count != 0) { Credits = new CreditCollection(tables["Credits"]); } }
public SeatPricing(DataSet tessResults) { DataTableCollection tables = tessResults.Tables; if (tables["Price"].Rows.Count != 0) { DefaultPricesPerZone = new ZonePriceDefaultCollection(tables["Price"]); } if (tables["Credit"].Rows.Count != 0) { Credits = new CreditCollection(tables["Credit"]); } if (tables["PriceType"].Rows.Count != 0) { AvailablePriceTypes = new PriceTypeCollection(tables["PriceType"]); } if (tables["AllPrice"].Rows.Count != 0) { AllZonePriceCombos = new ZonePriceOptionCollection(tables["AllPrice"]); } var results = (from row in tessResults.Tables["Performance"].AsEnumerable() select new { InventoryId = row.Field<int?>("inv_no"), Name = row.Field<string>("description"), Type = row.Field<string>("type"), Text1 = row.Field<string>("text1"), Text2 = row.Field<string>("text2"), Text3 = row.Field<string>("text3"), Text4 = row.Field<string>("text4"), Date = row.Field<DateTime?>("perf_dt"), ComposerFirstName = row.Field<string>("composerfn"), ComposerMiddleName = row.Field<string>("composermn"), ComposerLastName = row.Field<string>("composerln"), VenueName = row.Field<string>("facility_desc"), OnSale = ToBool(row.Field<string>("on_sale_ind")), TypeName = row.Field<string>("performance_type"), TypeId = row.Field<short?>("perf_type_id"), Seat = ToBool(row.Field<string>("seat_ind")), Print = ToBool(row.Field<string>("print_ind")), ZmapId = row.Field<int?>("zmap_no"), VenueId = row.Field<int?>("facility_no"), ProdSeasonId = row.Field<int?>("prod_season_no"), SeasonId = row.Field<short?>("season_no"), SeasonName = row.Field<string>("season_desc"), StartDate = row.Field<DateTime?>("start_dt"), EndDate = row.Field<DateTime?>("end_dt"), StatusId = row.Field<short?>("perf_status"), StatusName = row.Field<string>("perf_status_desc"), TimeSlotId = row.Field<short?>("time_slot"), TimeSlotName = row.Field<string>("time_slot_desc"), Ga = ToBool(row.Field<string>("ga_ind")) }).Single(); InventoryId = results.InventoryId; Name = results.Name; Type = results.Type; Text1 = results.Text1; Text2 = results.Text2; Text3 = results.Text3; Text4 = results.Text4; Date = results.Date; ComposerFirstName = results.ComposerFirstName; ComposerMiddleName = results.ComposerMiddleName; ComposerLastName = results.ComposerLastName; VenueName = results.VenueName; OnSale = results.OnSale; TypeName = results.TypeName; TypeId = results.TypeId; Seat = results.Seat; Print = results.Print; ZmapId = results.ZmapId; VenueId = results.VenueId; ProdSeasonId = results.ProdSeasonId; SeasonId = results.SeasonId; SeasonName = results.SeasonName; StartDate = results.StartDate; EndDate = results.EndDate; StatusId = results.StatusId; StatusName = results.StatusName; TimeSlotId = results.TimeSlotId; TimeSlotName = results.TimeSlotName; Ga = results.Ga; }