private void RepositoryItemSearchButtonEdit_EditValueChanging(object sender, ChangingEventArgs e)
        {
            SearchButtonEdit col = (sender as SearchButtonEdit);

            if (col.BK == false)
            {
                col.BK1 = (sender as BaseEdit).EditValue + "";
                col.BK  = true;
            }
        }
        private void RepositoryItemSearchButtonEdit_Validating(object sender, CancelEventArgs e)
        {
            SearchButtonEdit col = (sender as SearchButtonEdit);

            string value = col.EditValue + "";

            if (value != col.BK1)
            {
                if (this.AllowCustomerValue == true)
                {
                    SetSelectNull(col);
                    return;
                }
                else
                {
                    (sender as BaseEdit).EditValue = col.BK1;
                }
            }
        }
        public bool OpenDataDialog(SearchButtonEdit sender)
        {
            if (this.FormShowDialog != null)
            {
                using (frmDialogDataSearchBase frm = (frmDialogDataSearchBase)Activator.CreateInstance(this.FormShowDialog))
                {
                    frm.SearchCode       = Convert.ToString(sender.EditValue);
                    frm.OwnerEdit        = sender;
                    frm.OnSelectChanged += OnSelectChanged;

                    this.Tag = sender.EditValue;
                    if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK && FocuseMoveToNext)
                    {
                        System.Windows.Forms.SendKeys.Send("{Tab}");  //向活动应用程序发送击键 注意格式:Send("{Tab}");中的{}
                    }
                }
            }
            return(true);
        }
 internal void SetSelectNull(SearchButtonEdit col)
 {
     OnSelectChanged?.Invoke(col, null);
 }