private void simpleButtonNew_Click(object sender, EventArgs e)
        {
            if (!_data.KiemtraDemo())
            {
                return;
            }

            Config.NewKeyValue("Operation", (sender as SimpleButton).Text);
            string s = gvMain.ActiveFilterString;

            gvMain.ClearColumnsFilter();
            _frmDesigner.formAction = FormAction.New;
            if (frmMtDtCt == null)
            {
                frmMtDtCt = new FrmMasterDetailDt(_frmDesigner);
            }
            _bindingSource.AddNew();
            _bindingSource.EndEdit();

            frmMtDtCt.ShowDialog();
            gvMain.ActiveFilterString = s;
            gvMain.ApplyColumnsFilter();
            this.gvMain.OptionsSelection.MultiSelect = false;
            this.gvMain.OptionsSelection.MultiSelect = true;
            gvMain.OptionsView.ShowGroupPanel        = false;
            this.gvMain.SelectRow(_data.DsData.Tables[0].Rows.Count - 1);
        }
 private void simpleButtonEdit_Click(object sender, EventArgs e)
 {
     Config.NewKeyValue("Operation", (sender as SimpleButton).Text);
     _frmDesigner.formAction = FormAction.Edit;
     if (frmMtDtCt == null)
     {
         frmMtDtCt = new FrmMasterDetailDt(_frmDesigner);
     }
     frmMtDtCt.ShowDialog();
 }
        private void simpleButtonCopy_Click(object sender, EventArgs e)
        {
            if (!_data.KiemtraDemo())
            {
                return;
            }

            Config.NewKeyValue("Operation", (sender as SimpleButton).Text);
            _frmDesigner.formAction = FormAction.Copy;
            if (frmMtDtCt == null)
            {
                frmMtDtCt = new FrmMasterDetailDt(_frmDesigner);
            }
            frmMtDtCt.ShowDialog();
        }