当前位置: 首页>>代码示例>>C#>>正文


C# BindingSource.RemoveFilter方法代码示例

本文整理汇总了C#中System.Windows.Forms.BindingSource.RemoveFilter方法的典型用法代码示例。如果您正苦于以下问题:C# BindingSource.RemoveFilter方法的具体用法?C# BindingSource.RemoveFilter怎么用?C# BindingSource.RemoveFilter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.BindingSource的用法示例。


在下文中一共展示了BindingSource.RemoveFilter方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: frmArticulosGenerarApartir

 public frmArticulosGenerarApartir(BindingSource bindingSource)
 {
     InitializeComponent();
     this.bindingSource = bindingSource;
     bindingSource.RemoveFilter();
     txtDesde.KeyDown += new System.Windows.Forms.KeyEventHandler(BL.Utilitarios.EnterTab);
     txtHasta.KeyDown += new System.Windows.Forms.KeyEventHandler(BL.Utilitarios.EnterTab);
     txtDesde.Enter += new System.EventHandler(BL.Utilitarios.SelTextoTextBox);
     txtHasta.Enter += new System.EventHandler(BL.Utilitarios.SelTextoTextBox);
     txtDesde.KeyPress += new System.Windows.Forms.KeyPressEventHandler(BL.Utilitarios.SoloNumeros);
     txtHasta.KeyPress += new System.Windows.Forms.KeyPressEventHandler(BL.Utilitarios.SoloNumeros);
 }
开发者ID:BenjaOtero,项目名称:trend-gestion-desktop,代码行数:12,代码来源:frmArticulosGenerarApartir.cs

示例2: GenericEditAction

        public bool GenericEditAction(IEditable _geditForm, BindingSource actualActions, BindingSource groupHeadersList, bool isNew = false)
        {
            ulog = UserLog.Instance;
            try
            {
                DataRowView actionDataRowView;
                actionDataRowView = (isNew == false) ? (DataRowView)actualActions.Current : (DataRowView)actualActions.AddNew();
                if (actionDataRowView == null)
                    throw new Exception("Нет записей для редактирования.");

                using (IEditable editActForm = _geditForm)
                {//открываем форму и сохраняем изменения
                    if (editActForm.ShowDialog() == DialogResult.OK)
                    {
                        actualActions.EndEdit();
                        return true;
                    }
                    else
                    {
                        actualActions.CancelEdit();
                        return false;
                    }
                }
            }
            catch (Exception ex)
            {
                actualActions.CancelEdit();
                ulog.Message(ex.Message, UserLogMessageLevel.Error);
                return false;
            }
            finally
            {
                groupHeadersList.RemoveFilter();
                groupHeadersList.Filter = "[InList] = 1";
            }
        }
开发者ID:hprog,项目名称:exchange,代码行数:36,代码来源:CustomForm.cs

示例3: txbBuscaNome_KeyUp

        private void txbBuscaNome_KeyUp(object sender, KeyEventArgs e)
        {
            BindingSource bs = new BindingSource();
            bs.DataSource = dvgOperadores.DataSource;
            if (txbBuscaNome.Text != string.Empty)
                bs.Filter = "nome like '%" + txbBuscaNome.Text + "%'";
            else
                bs.RemoveFilter();

            dvgOperadores.DataSource = bs;
        }
开发者ID:danieldsdias,项目名称:AV2DotNet1-DanielDias-PedroHenrique,代码行数:11,代码来源:FormGerenciarOperadores.cs

示例4: txbBuscaNome_KeyUp

        private void txbBuscaNome_KeyUp(object sender, KeyEventArgs e)
        {
            BindingSource bs = new BindingSource();
            bs.DataSource = dgvProdutos.DataSource;
            if (txbBuscaNome.Text != string.Empty)
                bs.Filter = "descricao like '%" + txbBuscaNome.Text + "%'";
            else
                bs.RemoveFilter();

            dgvProdutos.DataSource = bs;
        }
开发者ID:danieldsdias,项目名称:AV2DotNet1-DanielDias-PedroHenrique,代码行数:11,代码来源:FormGerenciarProdutos.cs

示例5: textBoxSuchenTextChanged

        // Tim
        /************************************************************************************************************************************/
        /* public void textBoxSuchenTextChanged(DataGridView dataGridView, ComboBox comboBox, TextBox textBox, BindingSource bindingSource) */
        /************************************************************************************************************************************/
        /* Wenn sich er TextBox Text geändert haben sollte, wird der Filter angepasst                                                        */
        /************************************************************************************************************************************/
        public void textBoxSuchenTextChanged(DataGridView dataGridView, ComboBox comboBox, TextBox textBox, BindingSource bindingSource)
        {
            string suchen = "";
            if (String.IsNullOrEmpty(textBox.Text)) // Wenn leer dann suchen Filter entfernen
            {
                bindingSource.RemoveFilter();
            }
            else // Nach irgendwas suchen
            {
                suchen += dataGridView.Columns[comboBox.SelectedIndex].HeaderText.ToString();
                suchen = "Convert([" + suchen + "], 'System.String') LIKE '*{0}*'";
            }

            bindingSource.Filter = string.Format(suchen, textBox.Text);
        }
开发者ID:pug-tefm,项目名称:verwaltungssoftware,代码行数:21,代码来源:c_Helper.cs


注:本文中的System.Windows.Forms.BindingSource.RemoveFilter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。