public IActionResult UpdateTariff(string Name, int Price, int InternetSpeed, int IDNumber) { TariffBLL tariffBLL = new TariffBLL(); tariffBLL.UpdateTariff(Name, Price, InternetSpeed, IDNumber); return(RedirectToAction("TariffDetails", new { ID = IDNumber })); }
public IActionResult UpdateTariff(int IDNumber) { TariffBLL tariffBLL = new TariffBLL(); Tariff tariff = tariffBLL.GetTariff(IDNumber); if (tariff == null) { return(NotFound()); } return(View(tariff)); }
public IActionResult TariffDetails(int id) { TariffBLL tariffBLL = new TariffBLL(); Tariff tariff = tariffBLL.GetTariff(id); if (tariff == null) { return(NotFound()); } return(View(tariff)); }
public IActionResult AddTariff( string Name, int Price, int InternetSpeed) { TariffBLL tariffBLL = new TariffBLL(); if (Name != null) { tariffBLL.Add( Name, Price, InternetSpeed); return(RedirectToAction("Index")); } return(View("AddTariff")); }