Beispiel #1
0
        private static void addColToDisablerArrEvent(object sender, System.EventArgs e)
        {
            //add or remove to Disabler Arr
            MenuItem senderItem      = (MenuItem)sender;
            string   tableKey        = ((string[])senderItem.Tag)[1];
            string   selectedColKey1 = ((string[])senderItem.Tag)[0];
            string   selectedColKey2 = senderItem.Name;

            if (senderItem.Checked)
            {
                DatabaseFunct.addColToDisablerArr(tableKey, selectedColKey1, selectedColKey2);
            }
            else if (MessageBox.Show("This will make rows of columns \"" + selectedColKey1 + "\" and \"" + selectedColKey2 + "\" not allow eachother to contain data at the same time. For each row, data from the cell of the column mentioned second will be deleted if there is data in the first column's cell.\n Are you sure you want to initiate this?", "Are You Sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)

            {
                DatabaseFunct.addColToDisablerArr(tableKey, selectedColKey1, selectedColKey2);
            }

            cMenu.Dispose();
        }