public async Task <IActionResult> RegistrarLuchador([Bind("Nombre", "Apellidos", "Categoria", "Diciplina", "Descripcion1", "Descripcion2", "Descripcion3")] Luchador luchador) { if (ModelState.IsValid) { _context.Add(luchador); await _context.SaveChangesAsync(); return(RedirectToAction("VerLuchadores")); } return(View(luchador)); }
public async Task <IActionResult> Create([Bind("Nombre", "Apellidos", "Usu", "Contraseña", "ConfirmarContraseña", "Correo", "ConfirmarCorreo", "Celular", "Nacimiento")] Usuario usuario) { if (ModelState.IsValid) { _context.Add(usuario); await _context.SaveChangesAsync(); return(RedirectToAction("Login")); } return(View(usuario)); }
public async Task <IActionResult> CrearEmpresa([Bind("Gerente", "RUC", "Nombre", "Direccion", "Celular", "Telefono", "Tipo")] Empresa empresa) { if (ModelState.IsValid) { _context.Add(empresa); await _context.SaveChangesAsync(); return(RedirectToAction("Empresas")); } return(View(empresa)); }
public async Task <IActionResult> Create([Bind("ID,Name,Password,Account")] User user) { if (ModelState.IsValid) { _context.Add(user); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(user)); }
public async Task <IActionResult> Create([Bind("Id,Title,Content")] Article article) { if (ModelState.IsValid) { _context.Add(article); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(article)); }
public async Task <IActionResult> Create([Bind("Id,FirstName,LastName,Email,Message")] UserInfo userInfo) { if (ModelState.IsValid) { _context.Add(userInfo); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(userInfo)); }
public async Task <IActionResult> Create([Bind("Id,FirstName,LastName,PhoneNumber,Email,BirthDate")] Client client) { if (ModelState.IsValid) { _context.Add(client); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(client)); }
public async Task <IActionResult> RegistrarFactura([Bind("CodigoFactura", "PlacaTracto", "PlacaCarreta", "CodigoConductor", "Origen", "FechaSalida", "Destino", "FechaDestino", "CodigoCarga", "FechaEntregaDocumento", "MontoFacturado", "Estado", "FechaCobrado", "MontoCobrado")] Factura factura) { if (ModelState.IsValid) { _context.Add(factura); await _context.SaveChangesAsync(); return(RedirectToAction("Facturas")); } return(View(factura)); }
public async Task <IActionResult> Create([Bind("Id,name,description")] Role role) { if (ModelState.IsValid) { _context.Add(role); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(role)); }
public async Task <IActionResult> Create([Bind("ID,Nombre,Precio,Stock")] Producto producto) { if (ModelState.IsValid) { _context.Add(producto); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(producto)); }
public async Task <IActionResult> Agregar_juegos([Bind("Nom_juego, Desc_juego, trailer_juego, Img_juego, pre_juego")] Juegos juegos) { if (ModelState.IsValid) { _context.Add(juegos); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Mostrar_juegos))); } return(View(juegos)); }
public async Task <IActionResult> Create([Bind("Nombre")] Cita cita) { if (ModelState.IsValid) { _context.Add(cita); await _context.SaveChangesAsync(); return(RedirectToAction("index")); } return(View("Cita", cita)); }
public async Task <IActionResult> Create([Bind("Id,name,picture_url")] Category category) { if (ModelState.IsValid) { _context.Add(category); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(category)); }
public async Task <IActionResult> Agregar_Programas([Bind("Nom_programa, Desc_programa, Img_programa, pre_programa")] Programas programas) { if (ModelState.IsValid) { _context.Add(programas); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Mostrar_Programas))); } return(View(programas)); }
public async Task <IActionResult> Create([Bind("ID,Nombre,Precio,Celular,Email,Mensaje")] Servicio servicio) { if (ModelState.IsValid) { _context.Add(servicio); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(servicio)); }
public async Task <IActionResult> Create([Bind("Id,Title,ReleaseDate,Price,Genre,Rating")] Movie movie) { if (ModelState.IsValid) { _context.Add(movie); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(movie)); }
public async Task <IActionResult> Create([Bind("Id,Title,ReleaseDate,Rating,Author")] Book book) { if (ModelState.IsValid) { _context.Add(book); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(book)); }
public async Task <IActionResult> Agregar_Perifericos([Bind("Nom_perifericos, Desc_perifericos, Img_perifericos, pre_perifericos")] Perifericos perifericos) { if (ModelState.IsValid) { _context.Add(perifericos); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Mostrar_Perifericos))); } return(View(perifericos)); }
public async Task <IActionResult> Create([Bind("ID,Name,IdentityCard,WebPage,Address,Phone,Sector")] Client client) { if (ModelState.IsValid) { _context.Add(client); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(client)); }
public async Task <IActionResult> Create([Bind("Nom_juego, Desc_juego, Trailer_juego, Imagen_juego, Pre_juego")] Prueba_bd prueba_bd) { if (ModelState.IsValid) { _context.Add(prueba_bd); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Prueba))); } return(View(prueba_bd)); }
public async Task <IActionResult> Create([Bind("Nombre,Mascota,Telefono,TipoTelefono,Doctor,Fecha,Hora,TipoMascota,TipoCita,Direccion")] Cita cita) { if (ModelState.IsValid) { _context.Add(cita); await _context.SaveChangesAsync(); return(RedirectToAction("Index", "Home")); } return(View("Cita", cita)); }
public async Task <IActionResult> Create([Bind("Name")] Student student) { if (ModelState.IsValid) { _context.Add(student); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(student)); }
public async Task <IActionResult> Create([Bind("Id,name,description,price,added_date,BrandId")] Item item) { if (ModelState.IsValid) { _context.Add(item); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["BrandId"] = new SelectList(_context.Brands, "Id", "Id", item.BrandId); return(View(item)); }
public async Task <IActionResult> Create([Bind("ID,ClientID,Name,LastName,Email,Phone,Employment")] Contact contact) { if (ModelState.IsValid) { _context.Add(contact); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["ClientID"] = new SelectList(_context.Client, "ID", "IdentityCard", contact.ClientID); return(View(contact)); }
public async Task <IActionResult> Create([Bind("Id,name,CountryId")] Brand brand) { if (ModelState.IsValid) { _context.Add(brand); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["CountryId"] = new SelectList(_context.Countries, "Id", "Id", brand.CountryId); return(View(brand)); }
public async Task <IActionResult> Create([Bind("Id,UserId,RoleId")] User_Role user_Role) { if (ModelState.IsValid) { _context.Add(user_Role); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["RoleId"] = new SelectList(_context.Roles, "Id", "Id", user_Role.RoleId); ViewData["UserId"] = new SelectList(_context.Users, "Id", "Id", user_Role.UserId); return(View(user_Role)); }
public async Task <IActionResult> Create([Bind("ID,ProblemTittle,ProblemDetail,UserID,ClientID,Status")] SupportTicket supportTicket) { if (ModelState.IsValid) { _context.Add(supportTicket); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["ClientID"] = new SelectList(_context.Client, "ID", "IdentityCard", supportTicket.ClientID); ViewData["UserID"] = new SelectList(_context.User, "ID", "Name", supportTicket.UserID); return(View(supportTicket)); }
public async Task <IActionResult> Create([Bind("ID,MeetingTittle,Date,UserID,Virtual,ClientID")] Meeting meeting) { if (ModelState.IsValid) { _context.Add(meeting); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["ClientID"] = new SelectList(_context.Client, "ID", "IdentityCard", meeting.ClientID); ViewData["UserID"] = new SelectList(_context.User, "ID", "Name", meeting.UserID); return(View(meeting)); }