예제 #1
0
        ///<summary></summary>
        public static void Refresh()
        {
            HList = new Hashtable();
            ProcedureCode tempCode = new ProcedureCode();
            string        command  = "SELECT * FROM procedurecode ORDER BY ProcCat,ProcCode";
            DataTable     table    = General.GetTable(command);

            tableStat = table.Copy();
            RecallAL  = new ArrayList();
            List      = new ProcedureCode[tableStat.Rows.Count];
            for (int i = 0; i < tableStat.Rows.Count; i++)
            {
                tempCode           = new ProcedureCode();
                tempCode.CodeNum   = PIn.PInt(tableStat.Rows[i][0].ToString());
                tempCode.ProcCode  = PIn.PString(tableStat.Rows[i][1].ToString());
                tempCode.Descript  = PIn.PString(tableStat.Rows[i][2].ToString());
                tempCode.AbbrDesc  = PIn.PString(tableStat.Rows[i][3].ToString());
                tempCode.ProcTime  = PIn.PString(tableStat.Rows[i][4].ToString());
                tempCode.ProcCat   = PIn.PInt(tableStat.Rows[i][5].ToString());
                tempCode.TreatArea = (TreatmentArea)PIn.PInt(tableStat.Rows[i][6].ToString());
                //tempCode.RemoveTooth   =PIn.PBool  (tableStat.Rows[i][7].ToString());
                tempCode.SetRecall        = PIn.PBool(tableStat.Rows[i][8].ToString());
                tempCode.NoBillIns        = PIn.PBool(tableStat.Rows[i][9].ToString());
                tempCode.IsProsth         = PIn.PBool(tableStat.Rows[i][10].ToString());
                tempCode.DefaultNote      = PIn.PString(tableStat.Rows[i][11].ToString());
                tempCode.IsHygiene        = PIn.PBool(tableStat.Rows[i][12].ToString());
                tempCode.GTypeNum         = PIn.PInt(tableStat.Rows[i][13].ToString());
                tempCode.AlternateCode1   = PIn.PString(tableStat.Rows[i][14].ToString());
                tempCode.MedicalCode      = PIn.PString(tableStat.Rows[i][15].ToString());
                tempCode.IsTaxed          = PIn.PBool(tableStat.Rows[i][16].ToString());
                tempCode.PaintType        = (ToothPaintingType)PIn.PInt(tableStat.Rows[i][17].ToString());
                tempCode.GraphicColor     = Color.FromArgb(PIn.PInt(tableStat.Rows[i][18].ToString()));
                tempCode.LaymanTerm       = PIn.PString(tableStat.Rows[i][19].ToString());
                tempCode.IsCanadianLab    = PIn.PBool(tableStat.Rows[i][20].ToString());
                tempCode.PreExisting      = PIn.PBool(tableStat.Rows[i][21].ToString());
                tempCode.BaseUnits        = PIn.PInt(tableStat.Rows[i][22].ToString());
                tempCode.SubstitutionCode = PIn.PString(tableStat.Rows[i][23].ToString());
                //tempCode.SubstOnlyIf   =(SubstitutionCondition)PIn.PInt(tableStat.Rows[i][24].ToString());
                try {
                    HList.Add(tempCode.ProcCode, tempCode.Copy());
                }
                catch {
                }
                List[i] = tempCode.Copy();
                if (tempCode.SetRecall)
                {
                    RecallAL.Add(tempCode);
                }
            }
        }
예제 #2
0
        public void MiddleTier_SimulatedProcUpdate()
        {
            ProcedureCode pc = new ProcedureCode {
                Descript = "periodic oral evaluation - established patient & stuff", ProcCatDescript = "Exams & Xrays", DefaultNote = WebServiceTests.DirtyString
            };
            ProcedureCode pc2 = pc.Copy();

            WebServiceTests.SimulatedProcUpdate(pc);
            List <string> strErrors = new List <string>();

            if (pc.Descript != pc2.Descript || pc.ProcCatDescript != pc2.ProcCatDescript)
            {
                strErrors.Add(string.Format(@"The Descript before is ""{0}"" and after is ""{1}"".  The ProcCatDescript before is ""{2}"" and after is ""{3}"".", pc2.Descript, pc.Descript, pc2.ProcCatDescript, pc.ProcCatDescript));
            }
            if (pc.DefaultNote != pc2.DefaultNote)
            {
                strErrors.Add("The dirty string was altered from the simulated update call.");
            }
            Assert.IsTrue(strErrors.Count == 0);
        }