public ActionResult UpdateBus(string busId, int capacity, string license, string state, string status) { DatabaseInterface db = new DatabaseInterface(); if (!db.IsLicenseUnique(license, busId)) return Json("false"); Bus bus = db.GetBusByBusId(int.Parse(busId)); bus.LicensePlate = license; bus.BusId = int.Parse(busId); BusStatus busStatus; if (status.Equals("0")) { busStatus = BusStatus.Active; } else { busStatus = BusStatus.Inactive; } bus.Status = busStatus; bus.Capacity = capacity; bus.State = state; db.UpdateBus(bus); return Json("true"); }