public List<ElementoVob> BuscarElementos(string idgrupo) { List<ElementoVob> lista = new List<ElementoVob>(); var multiRepo = new MultitablaRepositorio(); lista = multiRepo.ListarTablas(idgrupo); return lista; }
public EditorExpedienteVob ObtenerEditor(int? id) { var expedienterepositorio = new GNTExpedienteRepositorio(); var generalrepositorio = new MultitablaRepositorio(); ExpedienteVob objexpediente = new ExpedienteVob(); string valor = string.Empty; string texto = PrimerValorEnum.Seleccione.ToString(); if (id == null) { id = 0; }; var expediente = expedienterepositorio.BuscarExpedienteporId(Convert.ToInt32(id)); var tipos_expediente = generalrepositorio.ListarTablas(GrupoTabla.TipoExpediente); tipos_expediente.Add(new Entidad.General.ElementoVob { Valor = valor, Texto = texto }); tipos_expediente = tipos_expediente.OrderBy(x=> x.Valor).ToList(); if (expediente != null) { objexpediente = expediente; } return new EditorExpedienteVob { Expediente = objexpediente, Tipo_Expedientes = tipos_expediente }; }
public EditorSolicitudVob ObtenerEditor(int? id) { var solicitudrepositorio = new GNTSolicitudRepositorio(); var generalrepositorio = new MultitablaRepositorio(); SolicitudVob objsolicitud = new SolicitudVob(); string valor = string.Empty; string texto = PrimerValorEnum.Seleccione.ToString(); if (id == null) { id = 0; }; var solicitud = solicitudrepositorio.BuscarSolicitudporId(Convert.ToInt32(id)); var tipos_documento = generalrepositorio.ListarTablas(GrupoTabla.TipoDocumento); var modos_envio = generalrepositorio.ListarTablas(GrupoTabla.ModoEnvio); var tipos_informacion = generalrepositorio.ListarTablas(GrupoTabla.TipoInformacionMunicipal); tipos_documento.Add(new Entidad.General.ElementoVob { Valor = valor, Texto = texto }); modos_envio.Add(new Entidad.General.ElementoVob { Valor = valor, Texto = texto }); tipos_informacion.Add(new Entidad.General.ElementoVob { Valor = valor, Texto = texto }); tipos_documento = tipos_documento.OrderBy(x => x.Valor).ToList(); modos_envio = modos_envio.OrderBy(x => x.Valor).ToList(); tipos_informacion = tipos_informacion.OrderBy(x => x.Valor).ToList(); if (solicitud != null) { objsolicitud = solicitud; } return new EditorSolicitudVob { Solicitud = objsolicitud, Tipo_Documentos = tipos_documento, Tipo_Informaciones = tipos_informacion, Modo_Envios = modos_envio }; }