Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <table class="table table-bordered data-table" style="font-size: 12px">
- <tr>
- <th>Remetente</th>
- <th>@Html.DisplayNameFor(m => m.DocumentoTipoId)</th>
- <th>@Html.DisplayNameFor(m => m.DataRecebimentoRecepcao)</th>
- <th>@Html.DisplayNameFor(m => m.DataRecebimentoSecretaria)</th>
- <th>@Html.DisplayNameFor(m => m.Observacao)</th>
- <th>@Html.DisplayNameFor(m => m.UserId)</th>
- <th>Ação</th>
- </tr>
- @foreach (var docs in Model.Documentos) {
- var dataRec = docs.DataRecebimentoRecepcao.HasValue ? docs.DataRecebimentoRecepcao.Value.ToString() : "";
- var dataSec = docs.DataRecebimentoSecretaria.HasValue ? docs.DataRecebimentoSecretaria.Value.ToString() : "";
- <tr>
- <td>@docs.Remetente</td>
- <td>@docs.DocumentoTipo.Tipo</td>
- <td>@dataRec</td>
- <td>@dataSec</td>
- <td>@docs.Observacao</td>
- <td>@docs.UserProfileV.UserName</td> @*O ERRO ESTÁ NESTA LINHA*@
- <td>
- <button type="button" class="btn btn-primary" title="Editar Documento"
- onclick="location.href = '@Url.Action("ValidarDocumento", new { id = MyCrypto.Encrypt(docs.DocumentoId.ToString()) })'">
- <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
- </button>
- </td>
- </tr>
- }
- </table>
- public class Documento {
- public int DocumentoId { get; set; }
- public string Remetente { get; set; }
- public DateTime? DataRecebimentoRecepcao { get; set; }
- public DateTime? DataRecebimentoSecretaria { get; set; }
- public bool Retirado { get; set; }
- public string Observacao { get; set; }
- // Relacionamento 1:N
- public int DocumentoTipoId { get; set; }
- public virtual DocumentoTipo DocumentoTipo { get; set; }
- public int UserId { get; set; }
- public virtual UserProfileContext UserProfileV { get; set; }
- }
- public class UserProfileContext {
- public UserProfileContext() {
- this.DadosComplementares = new List<DadosComplementares>();
- this.webpages_Roles = new List<webpages_Roles>();
- this.Chamados = new List<ChamadoContext>();
- this.Interessados = new List<InteressadosContext>();
- this.Tecnicos = new List<TecnicoContext>();
- this.Documentos = new List<Documento>();
- //this.DocumentosFuncionarios = new List<DocumentoFuncionario>();
- }
- public int UserId { get; set; }
- public string UserName { get; set; }
- public virtual ICollection<ChamadoContext> Chamados { get; set; }
- public virtual ICollection<ChamadosMkt> ChamadosMkt { get; set; }
- public virtual ICollection<DadosComplementares> DadosComplementares { get; set; }
- public virtual ICollection<webpages_Roles> webpages_Roles { get; set; }
- public virtual ICollection<InteressadosContext> Interessados { get; set; }
- public virtual ICollection<TecnicoContext> Tecnicos { get; set; }
- public virtual ICollection<TecnicoMkt> TecnicosMkt { get; set; }
- public virtual ICollection<InteressadosMkt> InteressadosMkt { get; set; }
- public virtual ICollection<Gestores> Gestores { get; set; }
- public virtual ICollection<ControleChaves> ControleChaves { get; set; }
- public virtual ICollection<Documento> Documentos { get; set; }
- }
Add Comment
Please, Sign In to add comment