Ejemplo n.º 1
0
        public static int agregarCarrera(Carrera add)
        {
            SqlConnection cone = Conexion.getConection();

            SqlCommand cmd = cone.CreateCommand();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "insert into carreer (carreer_name,carreer_status) values('" + add.c_Name + "','" + add.stado + "')";


            return(cmd.ExecuteNonQuery());
        }
        private void button1_Click(object sender, EventArgs e)
        {
            Name_Carrera = textBox1.Text;
            Carrera agregar = new Carrera();

            agregar.c_Name = Name_Carrera;;
            agregar.stado  = true;

            int verifica = funciones.agregarCarrera(agregar);

            this.Close();
            Conexion.conexion.Close();
        }