Example #1
0
        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(((HutangOperasionalModel)listDataGrid.SelectedItem).id);

                    if (model != null)
                    {
                        var view = new HutangOperasionalEntryView(false, model);
                        view.OnSaveData += HutangOperasionalEntryView_OnSaveData;
                        view.ShowDialog();
                    }
                }
            }
        }
Example #2
0
        private void _view_OnCreateData(object sender, EventArgs e)
        {
            var view = new HutangOperasionalEntryView();

            view.OnSaveData += HutangOperasionalEntryView_OnSaveData;
            view.ShowDialog();
        }