예제 #1
0
        //para buscar persona
        public DataTable Get_SearhPersona(BE_ReqPersonaSearh Request)
        {
            //Recuperando registros
            DA_Persona Obj = new DA_Persona();

            return(Obj.Get_SearhPersona(Request));
        }
예제 #2
0
        //----------------
        // SearhPersona
        //----------------
        public DataTable Get_SearhPersona(BE_ReqPersonaSearh Request)
        {
            DataTable dt = new DataTable();

            try
            {
                clsConection Obj    = new clsConection();
                string       Cadena = Obj.GetConexionString("Naylamp");

                using (SqlConnection cn = new SqlConnection(Cadena))
                {
                    cn.Open();

                    using (SqlCommand cm = new SqlCommand())
                    {
                        cm.CommandText = "[usp_Get_FiltroPersona]";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("cNombre", Request.cNombre);
                        cm.Parameters.AddWithValue("cPerIdeNumero", Request.cPerIdeNumero);
                        cm.Parameters.AddWithValue("nPerTipo", Request.nPerTipo);
                        cm.Parameters.AddWithValue("cPerCodigo", Request.cPerCodigo);
                        cm.Parameters.AddWithValue("cCodColegio", Request.cCodColegio);
                        cm.Connection = cn;

                        using (SqlDataReader dr = cm.ExecuteReader())
                            dt.Load(dr);
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(dt);
        }
예제 #3
0
        //para buscar persona by cPerApellido
        public DataTable Get_Persona_by_cPerApellido(BE_ReqPersonaSearh Request)
        {
            DA_Persona Obj = new DA_Persona();

            return(Obj.Get_Persona_by_cPerApellido(Request));
        }