private void _view_OnUpdateData(object sender, EventArgs e) { using (new WaitCursorHandler()) { ListDataGrid listDataGrid = null; if (sender is ListDataGrid) { listDataGrid = (ListDataGrid)sender; } else { listDataGrid = _view.ListDataGrid; } if (listDataGrid != null && listDataGrid.SelectedItem != null) { var model = _services.GetById(((SatuanModel)listDataGrid.SelectedItem).id); if (model != null) { var view = new SatuanEntryView(false, model); view.OnSaveData += SatuanEntryView_OnSaveData; view.ShowDialog(); } } } }
private void _view_OnCreateData(object sender, EventArgs e) { var view = new SatuanEntryView(); view.OnSaveData += SatuanEntryView_OnSaveData; view.ShowDialog(); }