예제 #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(((SupplierModel)listDataGrid.SelectedItem).id);

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

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