Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. public class ClienteEmpresa : Pessoa
  2. {
  3. public virtual ICollection<TipoDeSistemas> TipoDeSistemas { get; set; }
  4. }
  5.  
  6. public ActionResult _frmCadastroCliente()
  7. {
  8. ViewBag.SistemaComercial = new SelectList(db.TipoDeSistemaDb, "Id", "Descricao");
  9. return PartialView();
  10. }
  11.  
  12. <div class="row">
  13. <div class="col-md-12" style="margin-left:10px; min-width:100%;">
  14. <div class="form-group" style="margin-left:-7px; margin-top:17px;margin-bottom:11px;">
  15. <label for="vat" class=" form-control-label">Tipo De Sistema</label>
  16. @Html.DropDownList("SistemaComercial", null, htmlAttributes: new { @class = "standardSelect", multiple = "multiple" })
  17. </div>
  18. </div>
  19. </div>
  20.  
  21. public ActionResult Create(ClienteEmpresaViewModel clienteEmpresaviewmodel, int[] SistemaComercial)
  22. {
  23. //Aqui que eu quero saber como tratar e salvar essa lista.
  24. //Eu tentei Assim
  25. foreach (var sistema in SistemaComercial)
  26. {
  27. //Mas não sei como salvar.
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement