Пример #1
0
        private void btnnue_Click(object sender, EventArgs e)
        {
            getset   mo = new getset();
            conexion da = new conexion();

            mo.cod_tip_per = int.Parse(txtid.Text);
            mo.descip_pers = txtdesc.Text;
            da.guardartipoper(mo);
            MessageBox.Show("Datos guradados!");
        }
Пример #2
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            getset   mo = new getset();
            conexion da = new conexion();

            mo.cod_cargo = int.Parse(txtidc.Text);
            mo.nomb_car  = txtcargo.Text;
            mo.salario   = int.Parse(txtsal.Text);
            da.guardarcargo(mo);
            MessageBox.Show("Datos Guardados");
        }
Пример #3
0
        public void guardartipoper(getset mo)
        {
            string     strl = "insertartip";
            SqlCommand cmd  = new SqlCommand(strl, cnx);

            cnx.Open();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@cod_t_per", mo.cod_tip_per);
            cmd.Parameters.AddWithValue("@des_tipo_pers", mo.descip_pers);
            cmd.ExecuteNonQuery();
            cnx.Close();
        }
Пример #4
0
        private void btngu_Click(object sender, EventArgs e)
        {
            getset   mo = new getset();
            conexion da = new conexion();

            mo.id_u     = int.Parse(txtidu.Text);
            mo.pass     = txtcont.Text;
            mo.username = txtnombu.Text;
            mo.e_c_e    = int.Parse(txtidui.Text);
            da.guardarusuario(mo);
            MessageBox.Show("Datos Guardados");
        }
Пример #5
0
        private void btnge_Click(object sender, EventArgs e)
        {
            getset   mo = new getset();
            conexion da = new conexion();

            mo.cod_e  = int.Parse(txtidce.Text);
            mo.estado = txtest.Text;
            mo.tipo_p = int.Parse(txtide.Text);
            mo.c_c_c  = int.Parse(txtidce.Text);
            da.guardarcargo(mo);
            MessageBox.Show("Datos Guardados");
        }
Пример #6
0
        public void guardarcargo(getset mo)
        {
            string     strl = "guardarcargo";
            SqlCommand cmd  = new SqlCommand(strl, cnx);

            cnx.Open();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@id_c", mo.cod_cargo);
            cmd.Parameters.AddWithValue("@nom_ca", mo.nomb_car);
            cmd.Parameters.AddWithValue("@sal_c", mo.salario);
            cmd.ExecuteNonQuery();
            cnx.Close();
        }
Пример #7
0
        public void guardarusuario(getset mo)
        {
            string     strl = "guardarusario";
            SqlCommand cmd  = new SqlCommand(strl, cnx);

            cnx.Open();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@cod_u", mo.id_u);
            cmd.Parameters.AddWithValue("@contr_u", mo.pass);
            cmd.Parameters.AddWithValue("@nomb_u", mo.username);
            cmd.Parameters.AddWithValue("@e_c_e", mo.e_c_e);
            cmd.ExecuteNonQuery();
            cnx.Close();
        }
Пример #8
0
        public void guardarempl(getset mo)
        {
            string     strl = "guardaremp";
            SqlCommand cmd  = new SqlCommand(strl, cnx);

            cnx.Open();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("code", mo.cod_e);
            cmd.Parameters.AddWithValue("estaem", mo.estado);
            cmd.Parameters.AddWithValue("tipop", mo.tipo_p);
            cmd.Parameters.AddWithValue("codc", mo.c_c_c);
            cmd.ExecuteNonQuery();
            cnx.Close();
        }