private void EditInvoice() { int id = 0; invoice b = null; DataGrid dataGrid = dgInvoices; if (dataGrid.SelectedItem != null) { object sel = dataGrid.SelectedItem; b = (invoice)sel; id = b.id; } if (id > 0) { InvoiceEditView v = new InvoiceEditView(b.id); v.ShowDialog(); LoadInvoices(); } }
private void CreateInvoice() { // вызвать диалог добавление прихода InvoiceEditView v = new InvoiceEditView(); v.ShowDialog(); LoadInvoices(); }