public async Task <IActionResult> EditConsumption(int id, MaterialConsumptionViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            var success = await this.materials.EditConsumptionAsync(
                id,
                model.Date,
                model.PageWidth,
                model.PageHeight,
                model.Foil,
                model.Tape,
                model.Wischwasser,
                model.InkBlack,
                model.InkColor,
                model.PlateDeveloper);

            if (!success)
            {
                return(NotFound());
            }

            return(RedirectToAction(nameof(AllConsumption)));
        }
        public async Task <IActionResult> AddConsumption(MaterialConsumptionViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            await this.materials.AddConsumptionAsync(
                model.Date,
                model.PageWidth,
                model.PageHeight,
                model.Foil,
                model.Tape,
                model.Wischwasser,
                model.InkBlack,
                model.InkColor,
                model.PlateDeveloper);

            return(RedirectToAction(nameof(AllConsumption)));
        }