Example #1
0
        private void btnGravar_Click(object sender, EventArgs e)
        {
            if (validaDados())
            {
                int id = Convert.ToInt32(txtId.Text);

                nome = tratarStr(txtNome.Text);
                cpf  = tratarStr(txtCpf.Text);
                rg   = tratarStr(txtRg.Text);
                dt   = dtNasc.Text;
                fone = tratarStr(txtFone.Text);
                sexo = (rdbMasc.Checked ? "M" : "F");
                nac  = tratarStr(txtNac.Text);
                end  = tratarStr(txtEnd.Text);
                num  = tratarStr(txtNum.Text);
                cep  = tratarStr(txtCep.Text);
                uf   = tratarStr(cbxUf.Text);

                daoPaciente dp = new daoPaciente();
                if (dp.editPac(id, nome, cpf, rg, dt, fone, sexo, nac, end, num, cep, uf))
                {
                    frmPaciente fr = new frmPaciente();
                    fr.atualizaGrid();
                    this.Close();
                }
            }
        }
Example #2
0
        private void btnCanc_Click(object sender, EventArgs e)
        {
            frmPaciente frm = new frmPaciente();

            frm.setaVar(true, Convert.ToInt32(txtId.Text));
            this.Close();
        }
Example #3
0
 private void btnSel_Click(object sender, EventArgs e)
 {
     if (Convert.ToInt16(gvPesqClie.CurrentRow.Cells["ID"].Value) > 0)
     {
         frmPaciente frm = new frmPaciente();
         frm.setaVar(true, Convert.ToInt16(gvPesqClie.CurrentRow.Cells["ID"].Value));
         this.Close();
     }
 }
Example #4
0
        private void pacientesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmPaciente fp = new frmPaciente();

            fp.ShowDialog();
        }