public RouteForm(TravelWarrant travelWarrant) { InitializeComponent(); tw = travelWarrant; routes = Ishod4.GetRoutesForWarrant(tw); initData(routes); initWidgets(); }
//TODO: Finish saving new route private void btnSave_Click(object sender, EventArgs e) { Route r = new Route(); r.DateStart = dtStart.Value; r.DateEnd = dtEnd.Value; r.CoordA = tbCity.Text; r.CoordB = tbCity2.Text; r.DistanceKm = int.Parse(tbDistance.Text); r.FuelSpent = int.Parse(tbGas.Text); r.AvgSpeed = int.Parse(tbAvgV.Text); Ishod4.SaveRoute(r); }