Ejemplo n.º 1
0
 private void tlbMenu_NewClick()
 {
     try
     {
         frmRegEppEdit objManEpp = new frmRegEppEdit();
         objManEpp.pOperacion    = frmRegEppEdit.Operacion.Nuevo;
         objManEpp.IdEpp         = 0;
         objManEpp.StartPosition = FormStartPosition.CenterParent;
         objManEpp.ShowDialog();
         Cargar();
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Ejemplo n.º 2
0
        public void InicializarModificar()
        {
            if (gvEpp.RowCount > 0)
            {
                EppBE objEpp = new EppBE();
                objEpp.IdEpp = int.Parse(gvEpp.GetFocusedRowCellValue("IdEpp").ToString());

                frmRegEppEdit objManEppEdit = new frmRegEppEdit();
                objManEppEdit.pOperacion    = frmRegEppEdit.Operacion.Modificar;
                objManEppEdit.IdEpp         = objEpp.IdEpp;
                objManEppEdit.StartPosition = FormStartPosition.CenterParent;
                objManEppEdit.ShowDialog();

                Cargar();
            }
            else
            {
                MessageBox.Show("No se pudo editar");
            }
        }