Exemplo n.º 1
0
 private void cmEditar_Click(object sender, EventArgs e)
 {
     try
     {
         if (AcCOPEdit == 1)
         {
             frmCatDoctores art = new frmCatDoctores(db, ParamSystem, StiloColor, user.CodPerfil, 2, grdView[0, grdView.CurrentRow.Index].Value.ToString());
             art.CaptionBarColor  = ColorTranslator.FromHtml(StiloColor.Encabezado);
             art.CaptionForeColor = ColorTranslator.FromHtml(StiloColor.FontColor);
             art.ShowDialog();
             LlenaGridView();
         }
         else
         {
             MessageBoxAdv.Show("No tienes privilegios suficientes",
                                "Error al editar registro", MessageBoxButtons.OK,
                                MessageBoxIcon.Exclamation);
         }
     }
     catch (Exception ex)
     {
         MessageBoxAdv.Show("Tienes que seleccionar un registro \n" + ex.Message + " " + ex.StackTrace.ToString(),
                            "Error al editar", MessageBoxButtons.OK,
                            MessageBoxIcon.Error);
     }
 }
Exemplo n.º 2
0
        private void cmdAgregar_Click(object sender, EventArgs e)
        {
            frmCatDoctores art = new frmCatDoctores(db, ParamSystem, StiloColor, user.CodPerfil);

            art.CaptionBarColor  = ColorTranslator.FromHtml(StiloColor.Encabezado);
            art.CaptionForeColor = ColorTranslator.FromHtml(StiloColor.FontColor);
            art.ShowDialog();
            LlenaGridView();
        }
Exemplo n.º 3
0
 private void cmdConsultar_Click(object sender, EventArgs e)
 {
     try
     {
         frmCatDoctores art = new frmCatDoctores(db, ParamSystem, StiloColor, user.CodPerfil, 3, grdView[0, grdView.CurrentRow.Index].Value.ToString());
         art.CaptionBarColor  = ColorTranslator.FromHtml(StiloColor.Encabezado);
         art.CaptionForeColor = ColorTranslator.FromHtml(StiloColor.FontColor);
         art.ShowDialog();
     }
     catch (Exception ex)
     {
         MessageBoxAdv.Show("Tienes que seleccionar un registro \n" + ex.Message + " " + ex.StackTrace.ToString(),
                            "Error al Consultar", MessageBoxButtons.OK,
                            MessageBoxIcon.Error);
     }
 }