Это моя точка зрения: < /p>
@model prjArqBuild.entidade_endereco
Endereços
Endereco
Numero
Complemento
Bairro
Cidade
UF
CEP
Adicionar Endereço
×
Cadastro de Endereço
@Html.EditorFor(model => model.een_endereco, new { htmlAttributes = new { @class = "form-control input-sm", placeholder = "Endereço" } })
@Html.ValidationMessageFor(model => model.een_endereco, "", new { @class = "text-danger" })
@Html.EditorFor(model => model.een_numero, new { htmlAttributes = new { @class = "form-control input-sm", placeholder = "Numero" } })
@Html.ValidationMessageFor(model => model.een_numero, "", new { @class = "text-danger" })
@Html.EditorFor(model => model.een_comple, new { htmlAttributes = new { @class = "form-control input-sm", placeholder = "Complemento" } })
@Html.ValidationMessageFor(model => model.een_comple, "", new { @class = "text-danger" })
@Html.EditorFor(model => model.een_bairro, new { htmlAttributes = new { @class = "form-control input-sm", placeholder = "Bairro" } })
@Html.ValidationMessageFor(model => model.een_bairro, "", new { @class = "text-danger" })
@Html.EditorFor(model => model.een_cidade, new { htmlAttributes = new { @class = "form-control input-sm", placeholder = "Cidade" } })
@Html.ValidationMessageFor(model => model.een_cidade, "", new { @class = "text-danger" })
@Html.EditorFor(model => model.een_uf, new { htmlAttributes = new { @class = "form-control input-sm", placeholder = "Estado" } })
@Html.ValidationMessageFor(model => model.een_uf, "", new { @class = "text-danger" })
@Html.EditorFor(model => model.een_cep, new { htmlAttributes = new { @class = "form-control input-sm", placeholder = "CEP" } })
@Html.ValidationMessageFor(model => model.een_cep, "", new { @class = "text-danger" })
Fechar
Salvar
< /code>
Это моя функция jQuery, которая добавляет данные в таблицу HTML: < /p>
function gravarDetalheEnd() {
$('#tabEndereco tr:last').after('' + $('#een_endereco').val() + '' + $('#een_numero').val() + '' +
'' + $('#een_comple').val() + '' + '' + $('#een_bairro').val() + ''
+ '' + $('#een_cidade').val() + '' + '' + $('#een_uf').val() + ''
+ '' + $('#een_cep').val() + '');
}
< /code>
Мне нужно получить все ячейки и передать их этому действию контроллера как Intend: < /p>
public void AddEndereco(entidade_endereco entEnd)
{
db.entidade_endereco.Add(entEnd);
db.SaveChanges();
}
< /code>
Я пробовал много вещей, но ничего не сработало! У меня не было результатов!
Как я могу это сделать?
Подробнее здесь: https://stackoverflow.com/questions/341 ... sp-net-mvc
Мобильная версия