示例#1
0
 private void cmEditar_Click(object sender, EventArgs e)
 {
     try
     {
         if (AcCOPEdit == 1)
         {
             frmRegArticulos art = new frmRegArticulos(db, ParamSystem, user, StiloColor, 2, grdView[0, grdView.CurrentRow.Index].Value.ToString());
             art.CaptionBarColor  = ColorTranslator.FromHtml(StiloColor.Pant2);
             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);
     }
 }
示例#2
0
        private void cmdAgregar_Click(object sender, EventArgs e)
        {
            frmRegArticulos art = new frmRegArticulos(db, ParamSystem, user, StiloColor);

            art.CaptionBarColor  = ColorTranslator.FromHtml(StiloColor.Pant2);
            art.CaptionForeColor = ColorTranslator.FromHtml(StiloColor.FontColor);
            art.ShowDialog();
            LlenaGridView();
        }
示例#3
0
 private void cmdConsultar_Click(object sender, EventArgs e)
 {
     try
     {
         frmRegArticulos art = new frmRegArticulos(db, ParamSystem, user, StiloColor, 3, grdView[0, grdView.CurrentRow.Index].Value.ToString());
         art.CaptionBarColor  = ColorTranslator.FromHtml(StiloColor.Pant2);
         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);
     }
 }