void UpdateTable(TimeTableModel timeTableModel) { var curTrip = ListTrips.Where(i => i.idRoute == timeTableModel.idRoute).FirstOrDefault(); var idx = ListTrips.IndexOf(curTrip); ListTrips.Remove(curTrip); ListTrips.Insert(idx, timeTableModel); }
void UpdateTable(TimeTableModel timeTableModel) { var curTrip = ListTrips.Where(i => i.idRoute == timeTableModel.idRoute).FirstOrDefault(); var idx = ListTrips.IndexOf(curTrip); ListTrips.Remove(curTrip); ListTrips.Insert(idx, timeTableModel); }