Exemplo n.º 1
0
        protected virtual void OnPrimaryKeyChanged()
        {
            try
            {
                if (_primaryKey == null)
                {
                    SetText(null);
                }
                else
                {
                    RefreshRecord(true);
                }

                PrimaryKeyChanged?.Invoke(FindForm(), EventArgs.Empty);

                _miRefresh.Enabled = _miEdit.Enabled = _miCopyPrimaryKey.Enabled = PrimaryKey != null;
            }
            catch (Exception ex)
            {
                ExceptionHelper.Show(this, ex, "ButtonBrowse.OnPrimaryKeyChanged()", MessageBoxIcon.Error);
            }
        }
Exemplo n.º 2
0
 private void comboBoxKey1_SelectedIndexChanged(object sender, EventArgs e)
 {
     PrimaryKeyChanged.RaiseEventEx(this);
 }