public ActionResult Update(CabEntity cab) { int id = cab.LocationId; CabRepository.Update(cab); return(RedirectToAction("DataPassing")); }
public static void Delete(int locationId) { CabEntity cab = GetLocationById(locationId); if (cab != null) { list.Remove(cab); } }
public ActionResult CreateLocation() { CabEntity cab = new CabEntity(); UpdateModel(cab); //int locationId=cab[ CabRepository.Add(cab); TempData["Result"] = "Added successfully"; return(RedirectToAction("DataPassing")); }
public ActionResult Edit([Bind(Exclude = "LocationId")] int id) { CabEntity cab = CabRepository.GetLocationById(id); return(View(cab)); }
public static void Update(CabEntity cab) { CabEntity cabEntity = list.Find(id => id.LocationId == cab.LocationId); cabEntity.Location = cab.Location; }
public static void Add(CabEntity cab) { list.Add(cab); }