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; }
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); } }
private void registerEvents() { this.Loaded += load; imgAdd.PreviewMouseDown += addEntity; imgExit.PreviewMouseDown += (sender, e) => WindowsFunctions.Exit(this); }
private void registerEvents() { this.Loaded += loaded; brdDelete.PreviewMouseDown += deactivate; imgExit.PreviewMouseDown += (sender, e) => WindowsFunctions.Exit(this); }