// refresh the grid // links: // docLink: http://sql2x.org/documentationLink/a90065e7-8ace-4de7-9367-d4653a7c637f public void RefreshCrudeFinancialAdjustment() { var financialAdjustment = new CrudeFinancialAdjustmentServiceClient(); try { var bindingSource = new BindingSource(); bindingSource.DataSource = financialAdjustment.FetchWithFilter( Guid.Empty , financialAdjustmentTypeRefCombo.Text , maskedTextBoxAmount.Text == String.Empty ? 0 : Convert.ToDecimal(maskedTextBoxAmount.Text) , financialCurrencyPicker.SelectedValue , Guid.Empty , DateTime.MinValue ); dataGridViewCrudeFinancialAdjustment.AutoGenerateColumns = false; dataGridViewCrudeFinancialAdjustment.DataSource = bindingSource; dataGridViewCrudeFinancialAdjustment.AutoResizeColumns(); dataGridViewCrudeFinancialAdjustment.Refresh(); } catch (Exception ex) { if (ex == null) { } else { System.Diagnostics.Debugger.Break(); } } finally { financialAdjustment.Close(); } }