private void MenuItem_Register(object sender, System.Windows.Input.MouseButtonEventArgs e) { try { var frmRegisterGoods = new frmRegisterGoods(); frmRegisterGoods.ShowDialog(); SetDataGrid(); } catch (Exception ex) { AccountingKernel.Forms.Base.BaseWindow.ShowError(ex); } }
private void MenuItem_Edit(object sender, System.Windows.Input.MouseButtonEventArgs e) { try { if (DataGrid.SelectedValue == null) { throw new Exception(Localize.ex_no_record_selected); } Guid id; id = (DataGrid.SelectedValue as dynamic).Id; var frmRegisterGoods = new frmRegisterGoods(id); frmRegisterGoods.ShowDialog(); SetDataGrid(); } catch (Exception ex) { AccountingKernel.Forms.Base.BaseWindow.ShowError(ex); } }