Пример #1
0
        public void delete(Responsavel r)
        {
            string cmdSql = "DELETE FROM responsavel  WHERE cpf_1 = " + r.CPF_1;

            MySqlCommand cmd = new MySqlCommand(cmdSql, objCnx);

            try
            {
                objCnx.Open();
                cmd.ExecuteNonQuery();
            }
            catch
            {
            }
            finally
            {
                objCnx.Close();
            }
        }
Пример #2
0
        private void cmdAdd_Click(object sender, EventArgs e)
        {
            R       = new Responsavel();
            ctrResp = new ctrResponsavel();

            R.Responsavel_1 = txtRespFinn.Text;
            R.CPF_1         = Convert.ToInt32(txtCPFFIN.Text);
            R.RG_1          = Convert.ToInt32(txtRgFin.Text);
            R.Responsavel_2 = txtRespJur.Text;
            R.CPF_2         = Convert.ToInt32(txtCPFJur.Text);
            R.RG_2          = Convert.ToInt32(txtRGRespJur.Text);

            ctrResp.Adicionar(R);

            Forms.frmAlunos alunos = new frmAlunos(R.CPF_1);
            this.Hide();

            alunos.ShowDialog();
        }
Пример #3
0
 public void Alterar(Responsavel R)
 {
     dao_resp.update(R);
 }
Пример #4
0
 public void Excluir(Responsavel R)
 {
     dao_resp.delete(R);
 }
Пример #5
0
 public Responsavel Consultar(Responsavel R)
 {
     return(dao_resp.read(R));
 }
Пример #6
0
 public void Adicionar(Responsavel R)
 {
     dao_resp.create(R);
 }