protected void OnSelectionComplete(SelectionCompleteEventArgs args) { var handler = SelectionComplete; if (handler != null) { handler(this, args); } }
void form_SelectionComplete(object sender, SelectionCompleteEventArgs args) { if (args.SelectedPurchaseItems != null) { this.invoiceList = args.SelectedPurchaseItems; BindInvoices(); ComputeTotalAmountDue(); } }
void form_SelectionComplete(object sender, SelectionCompleteEventArgs args) { if (args.SelectedSalesItems == null) { return; } this.invoiceList = args.SelectedSalesItems; BindInvoices(); ComputeTotalAmountDue(); }
private void OkButton_Click(object sender, EventArgs e) { if (dataGridView1.SelectedRows.Count > 0) { SortableBindingList <SalesCounterItemModel> selectedItems = GetSelectedItems(); var args = new SelectionCompleteEventArgs(selectedItems); OnSelectionComplete(args); this.Close(); } else { ClientHelper.ShowErrorMessage("No invoice selected."); } }
private void OkButton_Click(object sender, EventArgs e) { SelectionCompleteEventArgs args = null; if (this.Type == PaymentType.Sales) { var invoices = GetSelectedInvoices(); args = new SelectionCompleteEventArgs(invoices); } else { var invoices = GetSelectedPurchases(); args = new SelectionCompleteEventArgs(invoices); } OnSelectionComplete(args); this.Close(); }