Exemple #1
0
        private void btnAddNewReq_Click(object sender, EventArgs e)
        {
            frmAddReq addReq = new frmAddReq();

            addReq.ShowDialog();
            updateItems();
        }
Exemple #2
0
        private void btnEditReq_Click(object sender, EventArgs e)
        {
            if (lstExistingItems.SelectedItem == null)
            {
                errProvider.SetError(lstExistingItems, "Select a requirement to edit.");
                return;
            }
            string name = lstExistingItems.SelectedItem.ToString();

            if (this.itemNamesTableAdapter.Exists(name) > 0)
            {
                errProvider.SetError(lstExistingItems, "Cannot edit item from this form. Use main form.");
                return;
            }
            frmAddReq edit = new frmAddReq();

            edit.editReq(lstExistingItems.SelectedItem.ToString());
            edit.ShowDialog();
        }