Esempio n. 1
0
 protected override void OnLoad(EventArgs e)
 {
     try
     {
         base.OnLoad(e);
         this.mPresenter = new PersonaEditor(this);
         Permiso permiso = GenericUtil.ValidarFormulario(AppInfo.CurrentUser, this.Name);
         this.CanActivate      = permiso.CanActivate;
         this.CanDelete        = permiso.CanDelete;
         this.CanRead          = permiso.CanRead;
         this.CanWrite         = permiso.CanWrite;
         this.ShowDeletedItems = permiso.ShowDeleteItems;
         this.btnNuevo.Enabled = false;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ErrorHandler.ObtenerMensajeError(ex, ModuloLog.Administracion, TipoObjeto.Persona),
                         AppInfo.Tittle, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
 public PersonaEditorViewModel(PersonaEditor personaEditor)
 {
     this.personaEditor       = personaEditor;
     OnSendCommand           += personaEditor.OnSendCommandHandler;
     OnSendCommandWithObject += personaEditor.OnSendCommandWithObjectCommandHandler;
 }