Exemple #1
0
        public async Task <ActionResult> ConfirmTariff(TariffDTO dto)
        {
            var tariff = await tariffService.GetTariffDTO(dto.FlatId, dto.TypeOfServiceId);

            if (tariff != null)
            {
                await tariffService.DeleteTariff(tariff.TariffId);
            }
            await tariffService.CreateTariff(dto);

            return(RedirectToAction("SelectService", new { flatId = dto.FlatId }));
        }
        public async Task <ActionResult> DeleteConfirmed(Guid id)
        {
            await tariffService.DeleteTariff(id);

            return(RedirectToAction("Index"));
        }