public ActionResult Trips_Destroy([DataSourceRequest]DataSourceRequest request, TripAdminViewModel trip) { if (this.ModelState.IsValid) { this.tripServices.AdminDelete(trip.Id); } return this.Json(new[] { trip }.ToDataSourceResult(request, this.ModelState)); }
public ActionResult Trips_Update([DataSourceRequest]DataSourceRequest request, TripAdminViewModel trip) { if (this.ModelState.IsValid) { this.tripServices.AdminEdit( trip.Id, trip.AvailableSeats, trip.PlaceOfLeaving, trip.PickUpFromAddress, trip.Description); } return this.Json(new[] { trip }.ToDataSourceResult(request, this.ModelState)); }