예제 #1
0
        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 }));
        }
예제 #2
0
        public IActionResult UpdateTariff(int IDNumber)
        {
            TariffBLL tariffBLL = new TariffBLL();
            Tariff    tariff    = tariffBLL.GetTariff(IDNumber);

            if (tariff == null)
            {
                return(NotFound());
            }
            return(View(tariff));
        }
예제 #3
0
        public IActionResult TariffDetails(int id)
        {
            TariffBLL tariffBLL = new TariffBLL();
            Tariff    tariff    = tariffBLL.GetTariff(id);

            if (tariff == null)
            {
                return(NotFound());
            }

            return(View(tariff));
        }
예제 #4
0
        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"));
        }