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(); } }
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(); }
public void Alterar(Responsavel R) { dao_resp.update(R); }
public void Excluir(Responsavel R) { dao_resp.delete(R); }
public Responsavel Consultar(Responsavel R) { return(dao_resp.read(R)); }
public void Adicionar(Responsavel R) { dao_resp.create(R); }