Example #1
0
 private void funcionárioToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         FrmCadFuncionario frm = new FrmCadFuncionario();
         frm.ShowDialog();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #2
0
 private void btnEditar_Click(object sender, EventArgs e)
 {
     try
     {
         if (perfil.Equals(CLRegras.Constantes.cliente)) //Perfil Cliente
         {
             int              id                   = Convert.ToInt32(dgvListar.CurrentRow.Cells[0].Value.ToString());
             string           clienteNome          = dgvListar.CurrentRow.Cells[1].Value.ToString();
             string           clienteCPF           = dgvListar.CurrentRow.Cells[2].Value.ToString();
             int              clienteRG            = Convert.ToInt32(dgvListar.CurrentRow.Cells[3].Value.ToString());
             DateTime         clienteDatadeNasc    = Convert.ToDateTime(dgvListar.CurrentRow.Cells[4].Value.ToString());
             string           clienteGrupoSangui   = dgvListar.CurrentRow.Cells[5].Value.ToString();
             char             clienteSexo          = Convert.ToChar(dgvListar.CurrentRow.Cells[6].Value.ToString());
             DateTime         clienteDataExpiracao = Convert.ToDateTime(dgvListar.CurrentRow.Cells[8].Value.ToString());
             FrmEditarCliente frm                  = new FrmEditarCliente(id, clienteNome, clienteCPF, clienteRG, clienteDatadeNasc, clienteSexo, clienteGrupoSangui, clienteDataExpiracao);
             frm.ShowDialog();
         }
         else if (perfil.Equals(CLRegras.Constantes.usuario)) //Perfil Secretária
         {
             int id                   = Convert.ToInt32(dgvListar.CurrentRow.Cells[0].Value.ToString());
             int secretariaRG         = Convert.ToInt32(dgvListar.CurrentRow.Cells[3].Value.ToString());
             FrmCadUsuarioSistema frm = new FrmCadUsuarioSistema(true, secretariaRG);
             frm.ShowDialog();
         }
         else //Perfil Funcionário
         {
             string            funcionarioCPF = dgvListar.CurrentRow.Cells[2].Value.ToString();
             FrmCadFuncionario frm            = new FrmCadFuncionario(funcionarioCPF);
             frm.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }