Example #1
0
        public async Task <IActionResult> Create([Bind("Id,Tipo,NomTipo")] Tiposid tiposid)
        {
            if (ModelState.IsValid)
            {
                _context.Add(tiposid);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(tiposid));
        }
Example #2
0
        public async Task <IActionResult> Create([Bind("Id,NomCate,TipoCate")] CategoriasInsumos categoriasInsumos)
        {
            if (ModelState.IsValid)
            {
                _context.Add(categoriasInsumos);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(categoriasInsumos));
        }
Example #3
0
        public async Task <IActionResult> Create([Bind("Id,Migration,Batch")] Migrations migrations)
        {
            if (ModelState.IsValid)
            {
                _context.Add(migrations);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(migrations));
        }
Example #4
0
        public async Task <IActionResult> Create([Bind("Id,DirSede,NomSede,TelSede")] Sedes sedes)
        {
            if (ModelState.IsValid)
            {
                _context.Add(sedes);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(sedes));
        }
Example #5
0
        public async Task <IActionResult> Create([Bind("Id,NomArl,TelArl")] Arl arl)
        {
            if (ModelState.IsValid)
            {
                _context.Add(arl);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(arl));
        }
Example #6
0
        public async Task <IActionResult> Create([Bind("Id,NomRol")] Roles roles)
        {
            if (ModelState.IsValid)
            {
                _context.Add(roles);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(roles));
        }
        public async Task <IActionResult> Create([Bind("Id,CodProc,NomProc,PreProc,Valor")] Procedimientos procedimientos)
        {
            if (ModelState.IsValid)
            {
                _context.Add(procedimientos);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(procedimientos));
        }
        public async Task <IActionResult> Create([Bind("Id,CodIns,Concen,Labora,NomIns,PrecioU,Pres,Unid,CategoriaId")] Insumos insumos)
        {
            if (ModelState.IsValid)
            {
                _context.Add(insumos);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["CategoriaId"] = new SelectList(_context.CategoriasInsumos, "Id", "NomCate", insumos.CategoriaId);
            return(View(insumos));
        }
        public async Task <IActionResult> Create([Bind("Id,Disponi,Entradas,Salidas,InsumoId")] StockInsumos stockInsumos)
        {
            if (ModelState.IsValid)
            {
                _context.Add(stockInsumos);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["InsumoId"] = new SelectList(_context.Insumos, "Id", "CodIns", stockInsumos.InsumoId);
            return(View(stockInsumos));
        }
Example #10
0
        public async Task <IActionResult> Create([Bind("Id,Concepto,FecGasto,ForPago,Valor,EmpleadoId")] Gastos gastos)
        {
            if (ModelState.IsValid)
            {
                _context.Add(gastos);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["EmpleadoId"] = new SelectList(_context.Empleados, "Id", "Id", gastos.EmpleadoId);
            return(View(gastos));
        }
        public async Task <IActionResult> Create([Bind("Id,CosConv,DurConv,FecAper,NomConv,ObjConv,Resolu,EpsId,Estado")] Convenios convenios)
        {
            if (ModelState.IsValid)
            {
                _context.Add(convenios);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["EpsId"] = new SelectList(_context.Eps, "Id", "NomEps", convenios.EpsId);
            return(View(convenios));
        }
Example #12
0
        public async Task <IActionResult> Create([Bind("Id,Cantidad,Concepto,Tipo,InsumoId")] MovInsumos movInsumos)
        {
            if (ModelState.IsValid)
            {
                _context.Add(movInsumos);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["InsumoId"] = new SelectList(_context.Insumos, "Id", "CodIns", movInsumos.InsumoId);
            return(View(movInsumos));
        }
Example #13
0
        public async Task <IActionResult> Create([Bind("Id,Name,Email,Password,RememberToken,RolId,EmpleadoId")] Users users)
        {
            if (ModelState.IsValid)
            {
                _context.Add(users);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["EmpleadoId"] = new SelectList(_context.Empleados, "Id", "Id", users.EmpleadoId);
            ViewData["RolId"]      = new SelectList(_context.Roles, "Id", "NomRol", users.RolId);
            return(View(users));
        }
        public async Task <IActionResult> Create([Bind("Id,CiuRes,DirRes,ECivil,MailPac,FecNac,Genero,NIdPac,PApe,PNom,Regimen,Rh,SApe,SNom,TelPac,EpsId,TipoIdId")] Pacientes pacientes)
        {
            if (ModelState.IsValid)
            {
                _context.Add(pacientes);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["EpsId"]    = new SelectList(_context.Eps, "Id", "NomEps", pacientes.EpsId);
            ViewData["TipoIdId"] = new SelectList(_context.Tiposid, "Id", "NomTipo", pacientes.TipoIdId);
            return(View(pacientes));
        }
        public async Task <IActionResult> Create([Bind("Id,Edad,MailAcom,NIdAcom,PApe,ParPac,PNom,SApe,SNom,TelAcom,TipoIdId,PacienteId")] Acompanantes acompanantes)
        {
            if (ModelState.IsValid)
            {
                _context.Add(acompanantes);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["PacienteId"] = new SelectList(_context.Pacientes, "Id", "CiuRes", acompanantes.PacienteId);
            ViewData["TipoIdId"]   = new SelectList(_context.Tiposid, "Id", "NomTipo", acompanantes.TipoIdId);
            return(View(acompanantes));
        }
        public async Task <IActionResult> Create([Bind("Id,CiuRes,DirRes,ECivil,MailEmp,FecIng,FecNac,Genero,NIdEmp,PApe,PNom,Rh,SApe,SNom,TelEmp,ArlId,CargoId,EpsId,TiposIdId,Estado")] Empleados empleados)
        {
            if (ModelState.IsValid)
            {
                _context.Add(empleados);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["ArlId"]     = new SelectList(_context.Arl, "Id", "NomArl", empleados.ArlId);
            ViewData["CargoId"]   = new SelectList(_context.Cargos, "Id", "NomCar", empleados.CargoId);
            ViewData["EpsId"]     = new SelectList(_context.Eps, "Id", "NomEps", empleados.EpsId);
            ViewData["TiposIdId"] = new SelectList(_context.Tiposid, "Id", "NomTipo", empleados.TiposIdId);
            return(View(empleados));
        }
Example #17
0
        public async Task <IActionResult> Create([Bind("Id,Descripcion,Fecha,AcompananteId,EmpleadoId,PacienteId,SedeId")] Citas citas)
        {
            if (ModelState.IsValid)
            {
                _context.Add(citas);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["AcompananteId"] = new SelectList(_context.Acompanantes, "Id", "MailAcom", citas.AcompananteId);
            ViewData["EmpleadoId"]    = new SelectList(_context.Empleados, "Id", "PNom", citas.EmpleadoId);
            ViewData["PacienteId"]    = new SelectList(_context.Pacientes, "Id", "CiuRes", citas.PacienteId);
            ViewData["SedeId"]        = new SelectList(_context.Sedes, "Id", "DirSede", citas.SedeId);
            return(View(citas));
        }