Esempio n. 1
0
 private void tlbMenu_NewClick()
 {
     try
     {
         frmManFactorPersonalEdit objManFactorPersonal = new frmManFactorPersonalEdit();
         objManFactorPersonal.lstFactorPersonal = mLista;
         objManFactorPersonal.pOperacion        = frmManFactorPersonalEdit.Operacion.Nuevo;
         objManFactorPersonal.IdFactorPersonal  = 0;
         objManFactorPersonal.StartPosition     = FormStartPosition.CenterParent;
         objManFactorPersonal.ShowDialog();
         Cargar();
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Esempio n. 2
0
        public void InicializarModificar()
        {
            if (gvFactorPersonal.RowCount > 0)
            {
                FactorPersonalBE objFactorPersonal = new FactorPersonalBE();
                objFactorPersonal.IdFactorPersonal   = int.Parse(gvFactorPersonal.GetFocusedRowCellValue("IdFactorPersonal").ToString());
                objFactorPersonal.DescFactorPersonal = gvFactorPersonal.GetFocusedRowCellValue("DescFactorPersonal").ToString();
                objFactorPersonal.FlagEstado         = Convert.ToBoolean(gvFactorPersonal.GetFocusedRowCellValue("FlagEstado").ToString());

                frmManFactorPersonalEdit objManFactorPersonalEdit = new frmManFactorPersonalEdit();
                objManFactorPersonalEdit.pOperacion        = frmManFactorPersonalEdit.Operacion.Modificar;
                objManFactorPersonalEdit.IdFactorPersonal  = objFactorPersonal.IdFactorPersonal;
                objManFactorPersonalEdit.pFactorPersonalBE = objFactorPersonal;
                objManFactorPersonalEdit.StartPosition     = FormStartPosition.CenterParent;
                objManFactorPersonalEdit.ShowDialog();

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