Beispiel #1
0
 private void listMain_DoubleClick(object sender, System.EventArgs e)
 {
     if (PrefC.GetBool(PrefName.PublicHealthScreeningUsePat))
     {
         FormScreenPatEdit FormSPE = new FormScreenPatEdit();
         FormSPE.ShowDialog();
         if (FormSPE.DialogResult != DialogResult.OK)
         {
             return;
         }
         FillGridScreenPat();
     }
     else
     {
         FormScreenEdit FormSE = new FormScreenEdit();
         FormSE.ScreenCur      = ScreenList[gridMain.SelectedIndices[0]];
         FormSE.ScreenGroupCur = ScreenGroupCur;
         FormSE.ShowDialog();
         if (FormSE.DialogResult != DialogResult.OK)
         {
             return;
         }
         FillGrid();
     }
 }
Beispiel #2
0
		private void butAdd_Click(object sender, System.EventArgs e) {
			if(PrefC.GetBool(PrefName.PublicHealthScreeningUsePat)) {
				/*
				FormScreenPatEdit FormSPE=new FormScreenPatEdit();
				FormSPE.IsNew=true;
				while(true) {
					FormSPE.ScreenPatCur=new ScreenPat();
					FormSPE.ScreenPatCur.ScreenGroupNum=ScreenGroupCur.ScreenGroupNum;
					FormSPE.ScreenPatCur.SheetNum=PrefC.GetLong(PrefName.PublicHealthScreeningSheet);
					FormSPE.ScreenGroupCur=ScreenGroupCur;
					FormSPE.ScreenGroupCur.Description=textDescription.Text;
					FormSPE.ShowDialog();
					if(FormSPE.DialogResult!=DialogResult.OK) {
						return;
					}
					FillGridScreenPat();
				}
				*/
				FormScreenPatEdit FormSPE=new FormScreenPatEdit();
				while(true) {
					FormPatientSelect FormPS=new FormPatientSelect();
					FormPS.ShowDialog();
					if(FormPS.DialogResult!=DialogResult.OK) {
						return;
					}
					ScreenPat screenPat=new ScreenPat();
					screenPat.ScreenGroupNum=ScreenGroupCur.ScreenGroupNum;
					screenPat.SheetNum=PrefC.GetLong(PrefName.PublicHealthScreeningSheet);
					screenPat.PatNum=FormPS.SelectedPatNum;
					ScreenPats.Insert(screenPat);
					if(FormPS.DialogResult!=DialogResult.OK) {
						return;
					}
					FillGridScreenPat();
				}
			}
			else {
				FormScreenEdit FormSE=new FormScreenEdit();
				FormSE.ScreenGroupCur=ScreenGroupCur;
				FormSE.IsNew=true;
				if(ScreenList.Length==0) {
					FormSE.ScreenCur=new OpenDentBusiness.Screen();
					FormSE.ScreenCur.ScreenGroupOrder=1;
				}
				else {
					FormSE.ScreenCur=ScreenList[ScreenList.Length-1];//'remembers' the last entry
					FormSE.ScreenCur.ScreenGroupOrder=FormSE.ScreenCur.ScreenGroupOrder+1;//increments for next
				}
				while(true) {
					FormSE.ShowDialog();
					if(FormSE.DialogResult!=DialogResult.OK) {
						return;
					}
					FormSE.ScreenCur.ScreenGroupOrder++;
					FillGrid();
				}
			}
		}
Beispiel #3
0
		private void listMain_DoubleClick(object sender, System.EventArgs e) {
			if(PrefC.GetBool(PrefName.PublicHealthScreeningUsePat)) {
				FormScreenPatEdit FormSPE=new FormScreenPatEdit();
				FormSPE.ShowDialog();
				if(FormSPE.DialogResult!=DialogResult.OK) {
					return;
				}
				FillGridScreenPat();
			}
			else {
				FormScreenEdit FormSE=new FormScreenEdit();
				FormSE.ScreenCur=ScreenList[gridMain.SelectedIndices[0]];
				FormSE.ScreenGroupCur=ScreenGroupCur;
				FormSE.ShowDialog();
				if(FormSE.DialogResult!=DialogResult.OK) {
					return;
				}
				FillGrid();
			}
		}
Beispiel #4
0
 private void butAdd_Click(object sender, System.EventArgs e)
 {
     if (PrefC.GetBool(PrefName.PublicHealthScreeningUsePat))
     {
         /*
          * FormScreenPatEdit FormSPE=new FormScreenPatEdit();
          * FormSPE.IsNew=true;
          * while(true) {
          *      FormSPE.ScreenPatCur=new ScreenPat();
          *      FormSPE.ScreenPatCur.ScreenGroupNum=ScreenGroupCur.ScreenGroupNum;
          *      FormSPE.ScreenPatCur.SheetNum=PrefC.GetLong(PrefName.PublicHealthScreeningSheet);
          *      FormSPE.ScreenGroupCur=ScreenGroupCur;
          *      FormSPE.ScreenGroupCur.Description=textDescription.Text;
          *      FormSPE.ShowDialog();
          *      if(FormSPE.DialogResult!=DialogResult.OK) {
          *              return;
          *      }
          *      FillGridScreenPat();
          * }
          */
         FormScreenPatEdit FormSPE = new FormScreenPatEdit();
         while (true)
         {
             FormPatientSelect FormPS = new FormPatientSelect();
             FormPS.ShowDialog();
             if (FormPS.DialogResult != DialogResult.OK)
             {
                 return;
             }
             ScreenPat screenPat = new ScreenPat();
             screenPat.ScreenGroupNum = ScreenGroupCur.ScreenGroupNum;
             screenPat.SheetNum       = PrefC.GetLong(PrefName.PublicHealthScreeningSheet);
             screenPat.PatNum         = FormPS.SelectedPatNum;
             ScreenPats.Insert(screenPat);
             if (FormPS.DialogResult != DialogResult.OK)
             {
                 return;
             }
             FillGridScreenPat();
         }
     }
     else
     {
         FormScreenEdit FormSE = new FormScreenEdit();
         FormSE.ScreenGroupCur = ScreenGroupCur;
         FormSE.IsNew          = true;
         if (ScreenList.Length == 0)
         {
             FormSE.ScreenCur = new OpenDentBusiness.Screen();
             FormSE.ScreenCur.ScreenGroupOrder = 1;
         }
         else
         {
             FormSE.ScreenCur = ScreenList[ScreenList.Length - 1];                      //'remembers' the last entry
             FormSE.ScreenCur.ScreenGroupOrder = FormSE.ScreenCur.ScreenGroupOrder + 1; //increments for next
         }
         while (true)
         {
             FormSE.ShowDialog();
             if (FormSE.DialogResult != DialogResult.OK)
             {
                 return;
             }
             FormSE.ScreenCur.ScreenGroupOrder++;
             FillGrid();
         }
     }
 }