Beispiel #1
0
        private void bindingNavigatorDeleteItem_Click(object sender, EventArgs e)
        {
            if (CruItItemBindingSource.Current == null)
            {
                return;
            }

            if (MessageBox.Show("Are you sure you want to delete?", "CONFIRM", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                modified = false;
                newRec   = false;
                CruItItemBindingSource.RemoveCurrent();
                errorProvider1.Clear();
                context.SaveChanges();
                panelControlStatus.Visible = true;
                LabelStatus.Text           = "Record Deleted";
                rowStatusDelete            = new Timer();
                rowStatusDelete.Interval   = 3000;
                rowStatusDelete.Start();
                rowStatusDelete.Tick += new EventHandler(TimedEventDelete);
            }
            //currentVal = gridSearchControl1.Text;
        }