public List <JourneyEntity> CheckFlights(string source, string dest, DateTime date) { List <JourneyEntity> lst = new List <JourneyEntity>(); var res = soa.Journeys.Where(x => x.Source == source && x.Destination == dest && x.dDate == date); try { foreach (var r in res) { JourneyEntity jn = new JourneyEntity(); jn.JourneyId = r.JourneyId; jn.Source = r.Source; jn.Destination = r.Destination; jn.dDate = r.dDate; jn.Cost = r.Cost; jn.DeptTime = r.DeptTime; jn.ArrTime = r.ArrTime; lst.Add(jn); } } catch (Exception ex) { throw ex; } return(lst); }
public List <JourneyEntity> UpdateSchedule(string source, string dest, DateTime date) { List <JourneyEntity> lst = new List <JourneyEntity>(); try { var res = soa.Journeys.Where(x => x.Source == source && x.Destination == dest && x.dDate == date); if (res != null) { foreach (var r in res) { JourneyEntity je = new JourneyEntity(); je.JourneyId = r.JourneyId; je.Source = r.Source; je.Destination = r.Destination; je.Cost = r.Cost; je.DeptTime = r.DeptTime; je.ArrTime = r.ArrTime; lst.Add(je); } } } catch (Exception ex) { throw ex; } return(lst); }
public List <JourneyEntity> Update(JourneyEntity je, int id) { List <JourneyEntity> lst = new List <JourneyEntity>(); try { var res = (from j in soa.Journeys join t in soa.Tickets on j.JourneyId equals t.JourneyId where t.TicketId == id select new { JourneyID = j.JourneyId, Source = j.Source, Destination = j.Destination, Departure = j.DeptTime, Arrival = j.ArrTime, Cost = j.Cost }).SingleOrDefault(); if (res != null) { je.JourneyId = res.JourneyID; je.Source = res.Source; je.Destination = res.Destination; je.Cost = res.Cost; je.DeptTime = res.Departure; je.ArrTime = res.Arrival; lst.Add(je); } } catch (Exception ex) { throw ex; } return(lst); }
public CustomerJourneyRp(JourneyEntity journey) { this.JourneyId = journey.Id.Value; this.Journey = journey.Name; this.AvailabilitySLO = journey.AvailabilitySlo; var measure = journey.Measure(); this.Availability = measure.Availability; this.AvailabilityErrorBudget = measure.AvailabilityErrorBudget; }
public ExportExcelJourneyDetailRp(JourneyMapEntity map) { JourneyEntity journey = map.Journey; FeatureEntity feature = map.Feature; this.JourneyId = journey.Id.Value; this.FeatureId = feature.Id.Value; this.Journey = journey.Name; this.Feature = feature.Name; this.AvailabilitySLO = journey.AvailabilitySlo; this.JourneyQuality = journey.Measure().Availability; }
public ExportExcelJourneyRp(JourneyEntity journey) { this.JourneyId = journey.Id.Value; this.Product = journey.Product.Name; this.Group = journey.Group; this.Name = journey.Name; this.AvailabilitySLO = journey.AvailabilitySlo; this.ExperienceSLO = journey.ExperienceSlo; this.LatencySLO = journey.LatencySlo; var measure = journey.Measure(); this.Availability = measure.Availability; this.Latency = measure.Latency; this.Experience = measure.Experience; this.Description = journey.Description; }
public void Load(string organization, string product, JourneyEntity entity) { this.Name = entity.Name; this.Description = entity.Description; this.Avatar = entity.Avatar; this.Description = entity.Description; this.Group = entity.Group; this.AvailabilitySlo = entity.AvailabilitySlo; this.ExperienceSlo = entity.ExperienceSlo; this.LatencySlo = entity.LatencySlo; this.AvailabilitySLA = entity.AvailabilitySla; this.LatencySLA = entity.LatencySla; this.Leaders = entity.Leaders; this.Organization = organization; this.Product = product; }
protected void Page_Load(object sender, EventArgs e) { //Load the Existing Schedule when the Page Loads txtTicketID.Text = Session["TicketID"].ToString(); int id = Convert.ToInt32(txtTicketID.Text); JourneyEntity te = new JourneyEntity(); try { var res = b.Update(te, id); if (res != null) { GridView1.DataSource = res; GridView1.DataBind(); } } catch (Exception ex) { throw ex; } }
public void AvailabilityAggregateSuccess() { var sourceEntity = new SourceEntity() { }; sourceEntity.AddSourceItem(800, 1000, OwlveyCalendar.January201903, DateTime.Now, "test", SourceGroupEnum.Availability); var entity = new JourneyEntity() { FeatureMap = new List <JourneyMapEntity>() { new JourneyMapEntity() { Feature = new Core.Entities.FeatureEntity() { Id = 1, Name = "test", Indicators = new List <IndicatorEntity>() { new IndicatorEntity() { Id = 1, Source = sourceEntity } } } } } }; var result = entity.Measure(); Assert.Equal(0.8m, result.Availability); }
public JourneyDailyAggregate(JourneyEntity entity, DatePeriodValue period) { this.Journey = entity; this.Period = period; }
public List <JourneyEntity> Update(JourneyEntity te, int id) { return(d.Update(te, id)); }