Beispiel #1
0
 private void tlbMenu_NewClick()
 {
     try
     {
         frmManPhaseEdit objManPhase = new frmManPhaseEdit();
         objManPhase.lstPhase      = mLista;
         objManPhase.pOperacion    = frmManPhaseEdit.Operacion.Nuevo;
         objManPhase.IdPhase       = 0;
         objManPhase.StartPosition = FormStartPosition.CenterParent;
         objManPhase.ShowDialog();
         Cargar();
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Beispiel #2
0
        public void InicializarModificar()
        {
            if (gvPhase.RowCount > 0)
            {
                PhaseBE objPhase = new PhaseBE();

                objPhase.IdPhase = int.Parse(gvPhase.GetFocusedRowCellValue("IdPhase").ToString());

                frmManPhaseEdit objManPhaseEdit = new frmManPhaseEdit();
                objManPhaseEdit.pOperacion    = frmManPhaseEdit.Operacion.Modificar;
                objManPhaseEdit.IdPhase       = objPhase.IdPhase;
                objManPhaseEdit.pPhaseBE      = objPhase;
                objManPhaseEdit.StartPosition = FormStartPosition.CenterParent;
                objManPhaseEdit.ShowDialog();

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