Beispiel #1
0
        public IActionResult PrinterDelete()
        {
            var model = new PrinterViewModel();

            model.PrinterReturnByName = _printerRepository.GetAllPrinters().Select(o => new SelectListItem(o.Printer_Name, o.Printer_ID.ToString()));

            return(View(model));
        }
        public IActionResult CartridgeAdd()
        {
            var model = new CartridgeViewModel();

            model.PrinterOptions = _printerRepository.GetAllPrinters()
                                   .Select(o => new SelectListItem(o.Printer_Name, o.Printer_Name));

            model.PrinterModelOptions = _printerRepository.GetAllPrinters()
                                        .Select(o => new SelectListItem(o.Printer_Name, o.Printer_Model));
            return(View(model));
        }