Esempio n. 1
0
        private void deleteToolStripButton_Click(object sender, EventArgs e)
        {
            DialogResult result = ViewHelper.Conformation("Are you sure you want to delete this lookup information?");

            if (result == DialogResult.Yes)
            {
                if (_newMode)
                {
                    return;
                }
                ItemBindingSource.EndEdit();

                try
                {
                    _context.LookupItems.DeleteObject(lookupItem);
                    _context.SaveChanges();
                    ShowItems();
                }
                catch (Exception ex)
                {
                    ViewHelper.ShowErrorMessage(@"Error deleting lookup item information.");
                    ErrorLogger.LogError(this, ex);
                }
            }
        }
Esempio n. 2
0
 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     ItemBindingSource.ResetBindings(false);
 }