當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。