private void RecalcFilterBox(ModelFilterValues filter)
        {
            txtFilter.Text = "";
            bool showFilterDlg = false;

            filter.QuickFilters.ForEach(p =>
            {
                if (p.ToBeModifiedInFilterEditor)
                {
                    showFilterDlg = true;
                    return;
                }
                txtFilter.Text += p.FriendlyName + Environment.NewLine;
            });

            if (showFilterDlg)
            {
                ShowFilter();
            }

            dteFrom.Value      = filter.DateFrom.Date;
            dteFromTime.Value  = filter.DateFrom;
            dteTo.Value        = filter.DateTo.Date;
            dteToTime.Value    = filter.DateTo;
            chkUseDate.Checked = filter.UseDate;
        }
 public FrmFilter(ModelFilterValues filter, List <string> headers)
 {
     InitializeComponent();
     _filter = filter;
     headers.ForEach(p => cboColumn.Items.Add(p));
     cboColumn.SelectedIndex = 0;
     _orginal = filter.DeepCopy();
     RecalcFilterBox();
 }
        private void RecalcFilterBox(ModelFilterValues filter)
        {
            txtFilter.Text = "";

            var qfDisplay = new ModelFilterHelper().CreateDisplayOfQuickFilters(filter);

            qfDisplay.ForEach(p =>
            {
                txtFilter.Text += p + Environment.NewLine;
            });


            dteFrom.Value       = filter.DateFrom.Date;
            dteFromTime.Value   = filter.DateFrom;
            dteTo.Value         = filter.DateTo.Date;
            dteToTime.Value     = filter.DateTo;
            chkUseDate.Checked  = filter.UseDate;
            _currentGrid.Filter = filter;
        }
 public void ApplyFilter(ModelFilterValues filter)
 {
     _gridAndData.Filter  = filter;
     CtrlGrid.ModelFilter = new ModelFilterService <T>(_gridAndData.Filter, _gridAndData.Headers, _gridAndData.DateColumnGetter);
 }
 private void RecalcFilterBox(ModelFilterValues currentGridFilter)
 {
     _recalcFilter.Invoke(currentGridFilter);
 }
 private void CloseCancel()
 {
     _filter      = _orginal;
     DialogResult = DialogResult.Cancel;
     Close();
 }