Exemplo n.º 1
0
 private void registerEvents()
 {
     this.Loaded += load;
     lsbEntities.SelectionChanged += getEntityData;
     txtbEdit.PreviewMouseDown    += editEntity;
     txtSearch.KeyUp                += filterEntitiesByName;
     cmbSearch.SelectionChanged     += filterEntitiesByCity;
     imgExit.PreviewMouseDown       += (sender, e) => WindowsFunctions.Exit(this);
     imgAdd.PreviewMouseDown        += addEntity;
     txtbShowData.PreviewMouseDown  += (sender, e) => showStackPanel(stkData);
     txtbShowNotes.PreviewMouseDown += (sender, e) => showStackPanel(stkNotes);
     txtSearch.GotFocus             += clear;
 }
Exemplo n.º 2
0
 private void saveEntity(object sender, MouseButtonEventArgs e)
 {
     try {
         using (var uow = Builders.UnitOfWorkBuilder.GetUnitOfWork()) {
             uow.BindingRepository.Save(entity);
             uow.Complete();
         }
         EditFinished(this, EventArgs.Empty);
         MessageBox.Show(WindowsMessages.messageForSaveInsert);
         WindowsFunctions.Exit(this);
     }
     catch (System.Exception ex) {
         MessageBox.Show(WindowsMessages.messageForAdmin);
         MessageBox.Show(ex.Message + "/n" + ex.StackTrace);
     }
 }
Exemplo n.º 3
0
 private void registerEvents()
 {
     this.Loaded              += load;
     imgAdd.PreviewMouseDown  += addEntity;
     imgExit.PreviewMouseDown += (sender, e) => WindowsFunctions.Exit(this);
 }
Exemplo n.º 4
0
 private void registerEvents()
 {
     this.Loaded += loaded;
     brdDelete.PreviewMouseDown += deactivate;
     imgExit.PreviewMouseDown   += (sender, e) => WindowsFunctions.Exit(this);
 }