public void FillRouteWithSameCities() { route = RouteCreator.WithSameCities(); DepartureCity.SendKeys(route.DepartureCity); ArrivalCity.SendKeys(route.ArrivalCity); Body.Click(2); }
public MainPage InputRouteDateAndClickSearch(string departureCity, string arrivalCity) { DepartureCity.SendKeys(departureCity); ArrivalCity.SendKeys(arrivalCity); SearchButton.Click(); return(this); }
public async Task <IActionResult> PutDepartureCity([FromRoute] int id, [FromBody] DepartureCity departureCity) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != departureCity.ID) { return(BadRequest()); } _context.Entry(departureCity).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DepartureCityExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public void DepartureCity_returns_Seattle() { DepartureCity result = DepartureCity.Find(1); string finalResult = result.GetDepartureCity(); Assert.AreEqual("Seattle", finalResult); }
public virtual int _GetUniqueIdentifier() { var hashCode = 399326290; hashCode = hashCode * -1521134295 + (Id?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (TransportOrderNo?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrderYear?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DocumentTransportNo?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrderDate?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DepartureCustomerName?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DepartureAddress?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DepartureCity?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DepartureState?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DestinationName?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DestinationAddress?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DestinationCity?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DestinationState?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Qty?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrderWeight?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Volume?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Pallet?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (RetiredDate?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DeliveryDate?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Note?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (CallCustomerBefore?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Telephone?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DayClosed?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Urgent?.GetHashCode() ?? 0); return(hashCode); }
public ActionResult Create() { DepartureCity newDepartureCity = new DepartureCity(Request.Form["departure-city"]); newDepartureCity.Save(); return(View("Success", "Home")); }
public void EnterCustomerCardNumber(string number) { DepartureCity.Click(); Body.Click(); AddCustomerCardButton.Click(); CustomerCardInput.SendKeys(number); }
public ActionResult AddDepartureToArrival(int departureId) { ArrivalCity arrival = ArrivalCity.Find(departureId); DepartureCity departure = DepartureCity.Find(Int32.Parse(Request.Form["departure-id"])); arrival.SetDepartures(departure); //Want to run the join table method return(RedirectToAction("ViewArrivals", new { id = departureId })); }
public ActionResult DeleteConfirmed(int id) { DepartureCity departureCity = db.DepartureCities.Find(id); db.DepartureCities.Remove(departureCity); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult AddArrivalToDeparture(int arrivalId) { DepartureCity departure = DepartureCity.Find(arrivalId); ArrivalCity arrival = ArrivalCity.Find(Int32.Parse(Request.Form["arrival-id"])); departure.SetArrivals(arrival); //Want to run the join table method return(RedirectToAction("ViewDepartures", new { id = arrivalId })); }
public void FillRoute() { route = RouteCreator.WithAllProperties(); DepartureCity.SendKeys(route.DepartureCity); ArrivalCity.SendKeys(route.ArrivalCity); Body.Click(2); CalendarInput.Click(); GetTomorrow().Click(); }
public ListTicketsPage InputRouteDateAndClickSearch(Route route) { DepartureCity.SendKeys(route.DepartureCity); ArrivalCity.SendKeys(route.ArrivalCity); DateFiled.Clear(); DateFiled.SendKeys(DateTime.Now.AddDays(1).ToString("dd.MM.yyyy")); SearchButton.Click(); return(new ListTicketsPage(driver)); }
public void DepartureCityId_returns_all_ArrivalId() { DepartureCity result = DepartureCity.Find(9); int finalResult = result.GetArrivals()[0].GetId(); Console.WriteLine(finalResult); Assert.AreEqual(1, finalResult); }
public ActionResult Edit([Bind(Include = "CityID,Cities")] DepartureCity departureCity) { if (ModelState.IsValid) { db.Entry(departureCity).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(departureCity)); }
public ActionResult Create([Bind(Include = "CityID,Cities")] DepartureCity departureCity) { if (ModelState.IsValid) { db.DepartureCities.Add(departureCity); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(departureCity)); }
public ActionResult ViewDepartures(int id) { Dictionary <string, object> model = new Dictionary <string, object>(); DepartureCity selectedDepartureCity = DepartureCity.Find(id); List <ArrivalCity> flights = selectedDepartureCity.GetArrivals(); List <ArrivalCity> allArrivals = ArrivalCity.GetAll(); model.Add("selectedDepartureCity", selectedDepartureCity); model.Add("flights", flights); model.Add("allArrivals", allArrivals); return(View(model)); }
public async Task <IActionResult> PostDepartureCity([FromBody] DepartureCity departureCity) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _context.DepartureCity.Add(departureCity); await _context.SaveChangesAsync(); return(CreatedAtAction("GetDepartureCity", new { id = departureCity.ID }, departureCity)); }
public ActionResult ViewArrivals(int id) { Dictionary <string, object> model = new Dictionary <string, object>(); ArrivalCity selectedArrivalCity = ArrivalCity.Find(id); List <Flight> flights = selectedArrivalCity.GetInboundFlights(); List <DepartureCity> allDepartures = DepartureCity.GetAll(); model.Add("selectedArrivalCity", selectedArrivalCity); model.Add("flights", flights); model.Add("allDepartures", allDepartures); return(View(model)); }
// GET: DepartureCities/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DepartureCity departureCity = db.DepartureCities.Find(id); if (departureCity == null) { return(HttpNotFound()); } return(View(departureCity)); }
public ActionResult Index() { List <DepartureCity> allDepartureCities = DepartureCity.GetAll(); return(View(allDepartureCities)); }
public void FillRouteWithoutDate() { route = RouteCreator.WithoutDate(); DepartureCity.SendKeys(route.DepartureCity); ArrivalCity.SendKeys(route.ArrivalCity); }