Example #1
0
 private void FormScreenGroup_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (DialogResult == DialogResult.OK)
     {
         return;
     }
     if (IsNew)
     {
         ScreenGroups.Delete(ScreenGroupCur);
     }
 }
Example #2
0
 private void butDelete_Click(object sender, EventArgs e)
 {
     if (ScreenList.Length > 0)
     {
         if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "Are you sure you want to delete this screening group? All screenings in this group will be deleted?"))
         {
             return;
         }
     }
     for (int i = 0; i < ScreenList.Length; i++)
     {
         Screens.Delete(ScreenList[i]);
     }
     ScreenGroups.Delete(ScreenGroupCur);
     DialogResult = DialogResult.Cancel;
 }
Example #3
0
 private void butDelete_Click(object sender, System.EventArgs e)
 {
     if (gridMain.SelectedIndices.Length != 1)
     {
         MessageBox.Show("Please select one item first.");
         return;
     }
     ScreenGroupCur = ScreenGroupList[gridMain.GetSelectedIndex()];
     OpenDentBusiness.Screen[] screenList = Screens.Refresh(ScreenGroupCur.ScreenGroupNum);
     if (screenList.Length > 0)
     {
         MessageBox.Show("Not allowed to delete a screening group with items in it.");
         return;
     }
     ScreenGroups.Delete(ScreenGroupCur);
     FillGrid();
 }
Example #4
0
        private void butDelete_Click(object sender, System.EventArgs e)
        {
            if (listMain.SelectedIndices.Count != 1)
            {
                MessageBox.Show("Please select one item first.");
                return;
            }
            ScreenGroup ScreenGroupCur = ScreenGroups.List[listMain.SelectedIndices[0]];

            Screens.Refresh(ScreenGroupCur.ScreenGroupNum);
            if (Screens.List.Length > 0)
            {
                MessageBox.Show("Not allowed to delete a screening group with items in it.");
                return;
            }
            ScreenGroups.Delete(ScreenGroupCur);
            FillGrid();
        }
Example #5
0
        private void butDelete_Click(object sender, System.EventArgs e)
        {
            if (gridMain.SelectedIndices.Length != 1)
            {
                MessageBox.Show("Please select one item first.");
                return;
            }
            ScreenGroup screenGroupCur = _listScreenGroups[gridMain.GetSelectedIndex()];
            List <OpenDentBusiness.Screen> listScreens = Screens.GetScreensForGroup(screenGroupCur.ScreenGroupNum);

            if (listScreens.Count > 0)
            {
                MessageBox.Show("Not allowed to delete a screening group with items in it.");
                return;
            }
            ScreenGroups.Delete(screenGroupCur);
            FillGrid();
        }