public DataTable getDocAcuerdoAvanceByPersona(BE_Req_Documento Request)
        {
            BE_Res_Documento Item = new BE_Res_Documento();
            DataTable        Rs   = 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 = "sp_get_Acuerdo_Anvance_By_Persona";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("cDocCodigo", Request.cDocCodigo);
                        cm.Parameters.AddWithValue("cPerCodigo", Request.cPerCodigo);
                        cm.Connection = cn;
                        using (SqlDataReader dr = cm.ExecuteReader())
                        {
                            Rs.Load(dr);
                        }
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(Rs);
        }
        public BE_Res_Documento getDocumentoBycDocNDoc_nDocTipo(BE_Req_Documento Request)
        {
            BE_Res_Documento Item = new BE_Res_Documento();

            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 = "sp_get_DocumentoBycDocNDoc_nDocTipo";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("cDocNDoc", Request.cDocNDoc);
                        cm.Parameters.AddWithValue("nDocTipo", Request.nDocTipo);
                        cm.Connection = cn;
                        using (SqlDataReader dr = cm.ExecuteReader())
                        {
                            while (dr.Read())
                            {
                                Item.cDocCodigo  = dr.GetString(dr.GetOrdinal("cDocCodigo"));
                                Item.nDocTipoNum = dr.GetInt16(dr.GetOrdinal("nDocTipoNum"));
                                Item.cDocNDoc    = dr.GetString(dr.GetOrdinal("cDocNDoc"));
                            }
                        }
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(Item);
        }
        public BE_Res_Documento getTipoPersona(BE_Req_Documento Request)
        {
            BE_Res_Documento Item = new BE_Res_Documento();

            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 = "sp_get_TipoPersona";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("cPerCodigo", Request.cPerCodigo);
                        cm.Connection = cn;
                        using (SqlDataReader dr = cm.ExecuteReader())
                        {
                            while (dr.Read())
                            {
                                Item.cPerCodigo      = dr.GetString(dr.GetOrdinal("cPerCodigo"));
                                Item.nAdministrativo = dr.GetInt32(dr.GetOrdinal("Administrativo"));
                                Item.nAlumno         = dr.GetInt32(dr.GetOrdinal("Alumno"));
                            }
                        }
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(Item);
        }
        public DataTable getDocPendientesConAcuerdo(BE_Req_Documento Request)
        {
            BE_Res_Documento Item = new BE_Res_Documento();
            DataTable        Rs   = 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 = "sp_Get_DocPendientesConAcuerdo_BycPerCodigo";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("cPerCodigo", Request.cPerCodigo);
                        cm.Parameters.AddWithValue("FiltroPersona", Request.FiltroPersona);
                        cm.Parameters.AddWithValue("FiltroFecha", Request.FiltroFecha);
                        cm.Parameters.AddWithValue("FecIni", Request.dFechaIni);
                        cm.Parameters.AddWithValue("FecFin", Request.dFechaFin);
                        cm.Connection = cn;
                        using (SqlDataReader dr = cm.ExecuteReader())
                        {
                            Rs.Load(dr);
                        }
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(Rs);
        }
        public BE_Res_Documento getUltimoDocumentoBycPerCodigo(BE_Req_Documento Request)
        {
            BE_Res_Documento Item = new BE_Res_Documento();

            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 = "sp_get_UltimoDocumentoBycPerCodigo";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("cPerCodigo", Request.cPerCodigo);
                        cm.Connection = cn;
                        using (SqlDataReader dr = cm.ExecuteReader())
                        {
                            while (dr.Read())
                            {
                                Item.cDocNDoc     = dr.GetString(dr.GetOrdinal("cDocNDoc"));
                                Item.dDocFecha    = dr.GetDateTime(dr.GetOrdinal("dDocFecha"));
                                Item.cPerApellido = dr.GetString(dr.GetOrdinal("cPerApellido"));
                            }
                        }
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(Item);
        }