public async Task <IActionResult> Create([Bind("id,name,lastName,email,userName,password,phone,job")] 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,name,identityCard,webPage,address,phone,sectors")] Client client) { if (ModelState.IsValid) { _context.Add(client); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(client)); }
public async Task <IActionResult> Create([Bind("id,ClientId,name,lastName,email,phone,jobPositions")] Contact contact) { if (ModelState.IsValid) { _context.Add(contact); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["ClientId"] = new SelectList(_context.Cliente, "id", "id", contact.ClientId); return(View(contact)); }
public async Task <IActionResult> Create([Bind("id,subject,problem,who,ClientId,state")] SupportTickets supportTickets) { if (ModelState.IsValid) { _context.Add(supportTickets); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["ClientId"] = new SelectList(_context.Cliente, "id", "id", supportTickets.ClientId); return(View(supportTickets)); }
public async Task <IActionResult> Create([Bind("id,subject,date,UserId,AVirtual,ClientId")] Meetings meetings) { if (ModelState.IsValid) { _context.Add(meetings); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["ClientId"] = new SelectList(_context.Cliente, "id", "id", meetings.ClientId); ViewData["UserId"] = new SelectList(_context.User, "id", "id", meetings.UserId); return(View(meetings)); }