Пример #1
0
        public async Task <IActionResult> Create([Bind("id,fechaCita,observaciones")] cita cita)
        {
            if (ModelState.IsValid)
            {
                _context.Add(cita);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(cita));
        }
        public async Task <IActionResult> Create([Bind("id,medicina,precio")] Medicina medicinas)
        {
            if (ModelState.IsValid)
            {
                _context.Add(medicinas);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(medicinas));
        }
Пример #3
0
        public async Task <IActionResult> Create([Bind("id,cantidad,observaciones,medicina")] receta receta)
        {
            if (ModelState.IsValid)
            {
                _context.Add(receta);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(receta));
        }