/// <summary> /// Get all invoices from the same day as selected date and fill datagrid. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void InvoiceDatePicker_SelectionChanged(object sender, EventArgs e) { try { if (dateInvoice.SelectedDate != null) { int iRet = 0; ds = db.ExecuteSQLStatement(sql.SelectInvoiceByDate(dateInvoice.SelectedDate.ToString()), ref iRet); dgInvoices.ItemsSource = new DataView(ds.Tables[0]); FillInvoiceComboBox(); } } catch (Exception ex) { HandleError(MethodInfo.GetCurrentMethod().DeclaringType.Name, MethodInfo.GetCurrentMethod().Name, ex.Message); } }