示例#1
0
        public List <BE.ClsBeTbPostulanteEstado> ListarEstadosReclutamiento(int?IdPostulante = null)
        {
            List <BE.ClsBeTbPostulanteEstado> lst = new List <BE.ClsBeTbPostulanteEstado>();

            try
            {
                var daEstado = new DA.ClsDaTbPostulanteEstado();

                DataTable dt = daEstado.Listar(IdPostulante, true);

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    var beEstado = new BE.ClsBeTbPostulanteEstado();

                    DataRow dr = dt.Rows[i];
                    daEstado.Cargar(ref beEstado, dr);

                    lst.Add(beEstado);
                }


                return(lst);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#2
0
        public BE.ClsBeTbPostulante Obtener(int idPostulante)
        {
            BE.ClsBeTbPostulante bePostulante = null;
            try
            {
                //General
                bePostulante = new DA.ClsDaTbPostulante().Obtener(idPostulante);
                if (bePostulante == null)
                {
                    return(bePostulante);
                }


                //Contacto
                bePostulante.Contacto = new DA.ClsDaTbPostulanteContacto().Obtener(idPostulante);
                if (bePostulante.Contacto == null)
                {
                    bePostulante = null;
                    return(bePostulante);
                }
                else
                {
                    //Telefonos
                    var lstBePostulanteTelefonos = new DA.ClsDaTbPostulanteTelefono().Listar(idPostulante);
                    foreach (BE.ClsBeTbPostulanteTelefono bePostulanteTelefono in lstBePostulanteTelefonos)
                    {
                        bePostulante.Telefonos.Add(bePostulanteTelefono);
                    }
                }


                //Contratacion
                bePostulante.Reclutamiento = new DA.ClsDaTbPostulanteReclutamiento().Obtener(idPostulante);
                if (bePostulante.Reclutamiento == null)
                {
                    bePostulante = null;
                    return(bePostulante);
                }
                else
                {
                    var lstBePostulanteHistorial = new DA.ClsDaTbPostulanteHistorial().Listar(idPostulante);

                    for (int i = 0; i < lstBePostulanteHistorial.Count; i++)
                    {
                        var beEstado = new BE.ClsBeTbPostulanteEstado()
                        {
                            IdPostulanteEstado = lstBePostulanteHistorial[i].Estado.IdPostulanteEstado
                        };
                        if (new DA.ClsDaTbPostulanteEstado().Obtener(ref beEstado))
                        {
                            lstBePostulanteHistorial[i].Estado = beEstado;
                        }
                    }

                    bePostulante.Reclutamiento.Historial = lstBePostulanteHistorial;
                }

                return(bePostulante);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#3
0
 public ClsBeTbPostulanteHistorial()
 {
     Estado = new ClsBeTbPostulanteEstado();
 }