public DataTable Get_PerIdioma(BE_ReqPerIdioma Request)
 {
     //Recuperando registros
     DataTable dt = new DataTable();
     DA_Persona Obj = new DA_Persona();
     return Obj.Get_PerIdioma(Request);
 }
Beispiel #2
0
        //----------------
        // PerIdioma
        //----------------
        //INSERT
        public BE_ResGenerico InsPerIdioma(BE_ReqPerIdioma Request)
        {
            BE_ResGenerico Item = new BE_ResGenerico();
            long Resultado = 0;
            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_Ins_PerIdioma]";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("cPerCodigo", Request.cPerCodigo);
                        cm.Parameters.AddWithValue("nIdioma", Request.nIdioma);
                        cm.Parameters.AddWithValue("nIdiHabilidad", Request.nIdiHabilidad);
                        cm.Parameters.AddWithValue("nNivel", Request.nNivel);
                        cm.Connection = cn;
                        Resultado = cm.ExecuteNonQuery();
                        Item.Resultado = Resultado;
                    }
                }

            }
            catch (Exception)
            {
                throw;
            }
            return Item;
        }
Beispiel #3
0
        //Get_PerIdioma
        public DataTable Get_PerIdioma(BE_ReqPerIdioma 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_PerIdioma]";
                        cm.CommandType = CommandType.StoredProcedure ;
                        cm.Parameters.AddWithValue("cPerCodigo", Request.cPerCodigo);
                        cm.Connection = cn;
                        using (SqlDataReader dr = cm.ExecuteReader())
                            dt.Load(dr);
                    }
                }

            }
            catch (Exception)
            {
                throw;
            }
            return dt;
        }
 //-----------
 //PerIdioma
 //-----------
 //Insert PerIdioma
 public BE_ResGenerico InsPerIdioma(BE_ReqPerIdioma Request)
 {
     BE_ResGenerico Item = new BE_ResGenerico();
     DA_Persona Obj = new DA_Persona();
     Item = Obj.InsPerIdioma(Request);
     return Item;
 }