Пример #1
0
		///<summary></summary>
		public static long Insert(ScreenPat screenPat){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb){
				screenPat.ScreenPatNum=Meth.GetLong(MethodBase.GetCurrentMethod(),screenPat);
				return screenPat.ScreenPatNum;
			}
			return Crud.ScreenPatCrud.Insert(screenPat);
		}
Пример #2
0
 ///<summary></summary>
 public static long Insert(ScreenPat screenPat)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         screenPat.ScreenPatNum = Meth.GetLong(MethodBase.GetCurrentMethod(), screenPat);
         return(screenPat.ScreenPatNum);
     }
     return(Crud.ScreenPatCrud.Insert(screenPat));
 }
Пример #3
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();
				}
			}
		}