示例#1
0
        ///<summary>For the current exam, clears existing skipped teeth and resets them to the specified skipped teeth. The ArrayList valid values are 1-32 int.</summary>
        public static void SetSkipped(long perioExamNum, List <int> skippedTeeth)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                Meth.GetVoid(MethodBase.GetCurrentMethod(), perioExamNum, skippedTeeth);
                return;
            }
            //for(int i=0;i<skippedTeeth.Count;i++){
            //MessageBox.Show(skippedTeeth[i].ToString());
            //}
            //first, delete all skipped teeth for this exam
            string command = "DELETE from periomeasure WHERE "
                             + "PerioExamNum = '" + perioExamNum.ToString() + "' "
                             + "AND SequenceType = '" + POut.Long((int)PerioSequenceType.SkipTooth) + "'";

            Db.NonQ(command);
            //then add the new ones in one at a time.
            PerioMeasure Cur;

            for (int i = 0; i < skippedTeeth.Count; i++)
            {
                Cur = new PerioMeasure();
                Cur.PerioExamNum = perioExamNum;
                Cur.SequenceType = PerioSequenceType.SkipTooth;
                Cur.IntTooth     = skippedTeeth[i];
                Cur.ToothValue   = 1;
                Cur.MBvalue      = -1;
                Cur.Bvalue       = -1;
                Cur.DBvalue      = -1;
                Cur.MLvalue      = -1;
                Cur.Lvalue       = -1;
                Cur.DLvalue      = -1;
                Insert(Cur);
            }
        }
示例#2
0
文件: PerioMeasures.cs 项目: mnisl/OD
		///<summary>For the current exam, clears existing skipped teeth and resets them to the specified skipped teeth. The ArrayList valid values are 1-32 int.</summary>
		public static void SetSkipped(long perioExamNum,List<int> skippedTeeth) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Meth.GetVoid(MethodBase.GetCurrentMethod(),perioExamNum,skippedTeeth);
				return;
			}
			//for(int i=0;i<skippedTeeth.Count;i++){
			//MessageBox.Show(skippedTeeth[i].ToString());
			//}
			//first, delete all skipped teeth for this exam
			string command = "DELETE from periomeasure WHERE "
				+"PerioExamNum = '"+perioExamNum.ToString()+"' "
				+"AND SequenceType = '"+POut.Long((int)PerioSequenceType.SkipTooth)+"'";
			Db.NonQ(command);
			//then add the new ones in one at a time.
			PerioMeasure Cur;
			for(int i=0;i<skippedTeeth.Count;i++){
				Cur=new PerioMeasure();
				Cur.PerioExamNum=perioExamNum;
				Cur.SequenceType=PerioSequenceType.SkipTooth;
				Cur.IntTooth=skippedTeeth[i];
				Cur.ToothValue=1;
				Cur.MBvalue=-1;
				Cur.Bvalue=-1;
				Cur.DBvalue=-1;
				Cur.MLvalue=-1;
				Cur.Lvalue=-1;
				Cur.DLvalue=-1;
				Insert(Cur);
			}
		}
示例#3
0
文件: PerioMeasures.cs 项目: mnisl/OD
		///<summary></summary>
		public static long Insert(PerioMeasure Cur) {
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Cur.PerioMeasureNum=Meth.GetLong(MethodBase.GetCurrentMethod(),Cur);
				return Cur.PerioMeasureNum;
			}
			return Crud.PerioMeasureCrud.Insert(Cur);
		}
示例#4
0
 ///<summary></summary>
 public static long Insert(PerioMeasure Cur)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         Cur.PerioMeasureNum = Meth.GetLong(MethodBase.GetCurrentMethod(), Cur);
         return(Cur.PerioMeasureNum);
     }
     return(Crud.PerioMeasureCrud.Insert(Cur));
 }
示例#5
0
文件: PerioMeasures.cs 项目: mnisl/OD
		///<summary></summary>
		public static void Delete(PerioMeasure Cur){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Meth.GetVoid(MethodBase.GetCurrentMethod(),Cur);
				return;
			}
			string command= "DELETE from periomeasure WHERE PerioMeasureNum = '"
				+Cur.PerioMeasureNum.ToString()+"'";
			Db.NonQ(command);
		}
示例#6
0
        ///<summary></summary>
        public static void Delete(PerioMeasure Cur)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                Meth.GetVoid(MethodBase.GetCurrentMethod(), Cur);
                return;
            }
            string command = "DELETE from periomeasure WHERE PerioMeasureNum = '"
                             + Cur.PerioMeasureNum.ToString() + "'";

            Db.NonQ(command);
        }
示例#7
0
文件: PerioMeasures.cs 项目: mnisl/OD
		///<summary></summary>
		public static void Update(PerioMeasure Cur){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Meth.GetVoid(MethodBase.GetCurrentMethod(),Cur);
				return;
			}
			Crud.PerioMeasureCrud.Update(Cur);
			//3-10-10 A bug that only lasted for a few weeks has resulted in a number of duplicate entries for each tooth.
			//So we need to clean up duplicates as we go.  Might put in db maint later.
			string command="DELETE FROM periomeasure WHERE "
				+ "PerioExamNum = "+POut.Long(Cur.PerioExamNum)
				+" AND SequenceType = "+POut.Long((int)Cur.SequenceType)
				+" AND IntTooth = "+POut.Long(Cur.IntTooth)
				+" AND PerioMeasureNum != "+POut.Long(Cur.PerioMeasureNum);
			Db.NonQ(command);
		}
示例#8
0
        public PerioMeasure Copy()
        {
            PerioMeasure p = new PerioMeasure();

            p.PerioMeasureNum = PerioMeasureNum;
            p.PerioExamNum    = PerioExamNum;
            p.SequenceType    = SequenceType;
            p.IntTooth        = IntTooth;
            p.ToothValue      = ToothValue;
            p.MBvalue         = MBvalue;
            p.Bvalue          = Bvalue;
            p.DBvalue         = DBvalue;
            p.MLvalue         = MLvalue;
            p.Lvalue          = Lvalue;
            p.DLvalue         = DLvalue;
            return(p);
        }
示例#9
0
        ///<summary></summary>
        public static void Update(PerioMeasure Cur)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                Meth.GetVoid(MethodBase.GetCurrentMethod(), Cur);
                return;
            }
            Crud.PerioMeasureCrud.Update(Cur);
            //3-10-10 A bug that only lasted for a few weeks has resulted in a number of duplicate entries for each tooth.
            //So we need to clean up duplicates as we go.  Might put in db maint later.
            string command = "DELETE FROM periomeasure WHERE "
                             + "PerioExamNum = " + POut.Long(Cur.PerioExamNum)
                             + " AND SequenceType = " + POut.Long((int)Cur.SequenceType)
                             + " AND IntTooth = " + POut.Long(Cur.IntTooth)
                             + " AND PerioMeasureNum != " + POut.Long(Cur.PerioMeasureNum);

            Db.NonQ(command);
        }
		public void AddPerioMeasure(PerioMeasure pm) {
			tcData.ListPerioMeasure.Add(pm);
		}
		public void AddPerioMeasure(int intTooth,PerioSequenceType sequenceType,int mb,int b,int db,int ml,int l, int dl) {
			PerioMeasure pm=new PerioMeasure();
			pm.MBvalue=mb;
			pm.Bvalue=b;
			pm.DBvalue=db;
			pm.MLvalue=ml;
			pm.Lvalue=l;
			pm.DLvalue=dl;
			pm.IntTooth=intTooth;
			pm.SequenceType=sequenceType;
			tcData.ListPerioMeasure.Add(pm);
		}
示例#12
0
		///<summary>Saves the cur exam measurements to the db by looping through each tooth and deciding whether the data for that tooth has changed.  If so, it either updates or inserts a measurement.  It won't delete a measurement if all values for that tooth are cleared, but just sets that measurement to all -1's.</summary>
		public void SaveCurExam(long perioExamNum) {
			PerioMeasure PerioMeasureCur;
			for(int seqI=0;seqI<PerioMeasures.List.GetLength(1);seqI++){
				for(int toothI=1;toothI<PerioMeasures.List.GetLength(2);toothI++){
					if(
						//if bleeding, then check the probing row for change
						(seqI==(int)PerioSequenceType.Bleeding 
						&& HasChanged[(int)PerioSequenceType.Probing,toothI])
						//or, for any other type, check the corresponding row
						|| HasChanged[seqI,toothI])
					{
						//new measurement
						if(PerioMeasures.List[selectedExam,seqI,toothI]==null){//.PerioMeasureNum==0){
							//MessageBox.Show(toothI.ToString());
							PerioMeasureCur=new PerioMeasure();
							PerioMeasureCur.PerioExamNum=perioExamNum;
							PerioMeasureCur.SequenceType=(PerioSequenceType)seqI;
							PerioMeasureCur.IntTooth=toothI;
						}
						else{
							PerioMeasureCur=PerioMeasures.List[selectedExam,seqI,toothI];
							//PerioExam
							//Sequence
							//tooth
						}
						if(seqI==(int)PerioSequenceType.Mobility || seqI==(int)PerioSequenceType.SkipTooth){
							PerioMeasureCur.MBvalue=-1;
							PerioMeasureCur.Bvalue=-1;
							PerioMeasureCur.DBvalue=-1;
							PerioMeasureCur.MLvalue=-1;
							PerioMeasureCur.Lvalue=-1;
							PerioMeasureCur.DLvalue=-1;
							if(seqI==(int)PerioSequenceType.Mobility){
								PerioMeasureCur.ToothValue
									=GetCellValue(selectedExam,(PerioSequenceType)seqI,toothI,PerioSurf.B);
							}
							else{//skiptooth
								//skipped teeth are only saved when user marks them, not as part of regular saving.
							}
						}
						else if(seqI==(int)PerioSequenceType.Bleeding){
							PerioMeasureCur.ToothValue=-1;
							PerioMeasureCur.MBvalue
								=GetCellBleedValue(selectedExam,toothI,PerioSurf.MB);
							PerioMeasureCur.Bvalue
								=GetCellBleedValue(selectedExam,toothI,PerioSurf.B);
							PerioMeasureCur.DBvalue
								=GetCellBleedValue(selectedExam,toothI,PerioSurf.DB);
							PerioMeasureCur.MLvalue
								=GetCellBleedValue(selectedExam,toothI,PerioSurf.ML);
							PerioMeasureCur.Lvalue
								=GetCellBleedValue(selectedExam,toothI,PerioSurf.L);
							PerioMeasureCur.DLvalue
								=GetCellBleedValue(selectedExam,toothI,PerioSurf.DL);
						}
						else{
							PerioMeasureCur.ToothValue=-1;
							PerioMeasureCur.MBvalue
								=GetCellValue(selectedExam,(PerioSequenceType)seqI,toothI,PerioSurf.MB);
							PerioMeasureCur.Bvalue
								=GetCellValue(selectedExam,(PerioSequenceType)seqI,toothI,PerioSurf.B);
							PerioMeasureCur.DBvalue
								=GetCellValue(selectedExam,(PerioSequenceType)seqI,toothI,PerioSurf.DB);
							PerioMeasureCur.MLvalue
								=GetCellValue(selectedExam,(PerioSequenceType)seqI,toothI,PerioSurf.ML);
							PerioMeasureCur.Lvalue
								=GetCellValue(selectedExam,(PerioSequenceType)seqI,toothI,PerioSurf.L);
							PerioMeasureCur.DLvalue
								=GetCellValue(selectedExam,(PerioSequenceType)seqI,toothI,PerioSurf.DL);
						}
						//then to the database
						if(PerioMeasures.List[selectedExam,seqI,toothI]==null){
							PerioMeasures.Insert(PerioMeasureCur);
						}
						else{
							PerioMeasures.Update(PerioMeasureCur);
						}
					}//if haschanged
				}//for toothI
			}//for seqI
		}