private void tlbMenu_NewClick()
 {
     try
     {
         frmManTipoEntregaEdit objManTipoEntrega = new frmManTipoEntregaEdit();
         objManTipoEntrega.lstTipoEntrega = mLista;
         objManTipoEntrega.pOperacion     = frmManTipoEntregaEdit.Operacion.Nuevo;
         objManTipoEntrega.IdTipoEntrega  = 0;
         objManTipoEntrega.StartPosition  = FormStartPosition.CenterParent;
         objManTipoEntrega.ShowDialog();
         Cargar();
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        public void InicializarModificar()
        {
            if (gvTipoEntrega.RowCount > 0)
            {
                TipoEntregaBE objTipoEntrega = new TipoEntregaBE();
                objTipoEntrega.IdTipoEntrega   = int.Parse(gvTipoEntrega.GetFocusedRowCellValue("IdTipoEntrega").ToString());
                objTipoEntrega.DescTipoEntrega = gvTipoEntrega.GetFocusedRowCellValue("DescTipoEntrega").ToString();
                objTipoEntrega.FlagEstado      = Convert.ToBoolean(gvTipoEntrega.GetFocusedRowCellValue("FlagEstado").ToString());

                frmManTipoEntregaEdit objManTipoEntregaEdit = new frmManTipoEntregaEdit();
                objManTipoEntregaEdit.pOperacion     = frmManTipoEntregaEdit.Operacion.Modificar;
                objManTipoEntregaEdit.IdTipoEntrega  = objTipoEntrega.IdTipoEntrega;
                objManTipoEntregaEdit.pTipoEntregaBE = objTipoEntrega;
                objManTipoEntregaEdit.StartPosition  = FormStartPosition.CenterParent;
                objManTipoEntregaEdit.ShowDialog();

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