Пример #1
0
        // refresh the grid
        // links:
        //  docLink: http://sql2x.org/documentationLink/a90065e7-8ace-4de7-9367-d4653a7c637f
        public void RefreshCrudeFinancialService()
        {
            var financialService = new CrudeFinancialServiceServiceClient();

            try {
                var bindingSource = new BindingSource();
                bindingSource.DataSource = financialService.FetchWithFilter(
                    Guid.Empty
                    , Guid.Empty
                    , serviceTypeRefCombo.Text
                    , maskedTextBoxAmount.Text == String.Empty ? 0 : Convert.ToDecimal(maskedTextBoxAmount.Text)
                    , financialCurrencyPicker.SelectedValue
                    , Guid.Empty
                    , Guid.Empty
                    , Guid.Empty
                    , Guid.Empty
                    , Guid.Empty
                    , DateTime.MinValue
                    );
                dataGridViewCrudeFinancialService.AutoGenerateColumns = false;
                dataGridViewCrudeFinancialService.DataSource          = bindingSource;
                dataGridViewCrudeFinancialService.AutoResizeColumns();
                dataGridViewCrudeFinancialService.Refresh();
            } catch (Exception ex) {
                if (ex == null)
                {
                }
                else
                {
                    System.Diagnostics.Debugger.Break();
                }
            } finally {
                financialService.Close();
            }
        }