Example #1
0
 private void tlbMenu_NewClick()
 {
     try
     {
         frmManClassificationEdit objManClassification = new frmManClassificationEdit();
         objManClassification.lstClassification = mLista;
         objManClassification.pOperacion        = frmManClassificationEdit.Operacion.Nuevo;
         objManClassification.IdClassification  = 0;
         objManClassification.StartPosition     = FormStartPosition.CenterParent;
         objManClassification.ShowDialog();
         Cargar();
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Example #2
0
        public void InicializarModificar()
        {
            if (gvClassification.RowCount > 0)
            {
                ClassificationBE objClassification = new ClassificationBE();

                objClassification.IdClassification = int.Parse(gvClassification.GetFocusedRowCellValue("IdClassification").ToString());

                frmManClassificationEdit objManClassificationEdit = new frmManClassificationEdit();
                objManClassificationEdit.pOperacion        = frmManClassificationEdit.Operacion.Modificar;
                objManClassificationEdit.IdClassification  = objClassification.IdClassification;
                objManClassificationEdit.pClassificationBE = objClassification;
                objManClassificationEdit.StartPosition     = FormStartPosition.CenterParent;
                objManClassificationEdit.ShowDialog();

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