コード例 #1
0
        private static ClaimProc[] RefreshAndFill(string command)
        {
            DataTable table = General.GetTable(command);

            ClaimProc[] List = new ClaimProc[table.Rows.Count];
            for (int i = 0; i < List.Length; i++)
            {
                List[i] = new ClaimProc();
                List[i].ClaimProcNum    = PIn.PInt(table.Rows[i][0].ToString());
                List[i].ProcNum         = PIn.PInt(table.Rows[i][1].ToString());
                List[i].ClaimNum        = PIn.PInt(table.Rows[i][2].ToString());
                List[i].PatNum          = PIn.PInt(table.Rows[i][3].ToString());
                List[i].ProvNum         = PIn.PInt(table.Rows[i][4].ToString());
                List[i].FeeBilled       = PIn.PDouble(table.Rows[i][5].ToString());
                List[i].InsPayEst       = PIn.PDouble(table.Rows[i][6].ToString());
                List[i].DedApplied      = PIn.PDouble(table.Rows[i][7].ToString());
                List[i].Status          = (ClaimProcStatus)PIn.PInt(table.Rows[i][8].ToString());
                List[i].InsPayAmt       = PIn.PDouble(table.Rows[i][9].ToString());
                List[i].Remarks         = PIn.PString(table.Rows[i][10].ToString());
                List[i].ClaimPaymentNum = PIn.PInt(table.Rows[i][11].ToString());
                List[i].PlanNum         = PIn.PInt(table.Rows[i][12].ToString());
                List[i].DateCP          = PIn.PDate(table.Rows[i][13].ToString());
                List[i].WriteOff        = PIn.PDouble(table.Rows[i][14].ToString());
                List[i].CodeSent        = PIn.PString(table.Rows[i][15].ToString());
                List[i].AllowedOverride = PIn.PDouble(table.Rows[i][16].ToString());
                List[i].Percentage      = PIn.PInt(table.Rows[i][17].ToString());
                List[i].PercentOverride = PIn.PInt(table.Rows[i][18].ToString());
                List[i].CopayAmt        = PIn.PDouble(table.Rows[i][19].ToString());
                List[i].OverrideInsEst  = PIn.PDouble(table.Rows[i][20].ToString());
                List[i].NoBillIns       = PIn.PBool(table.Rows[i][21].ToString());
                List[i].DedBeforePerc   = PIn.PBool(table.Rows[i][22].ToString());
                List[i].OverAnnualMax   = PIn.PDouble(table.Rows[i][23].ToString());
                List[i].PaidOtherIns    = PIn.PDouble(table.Rows[i][24].ToString());
                List[i].BaseEst         = PIn.PDouble(table.Rows[i][25].ToString());
                List[i].CopayOverride   = PIn.PDouble(table.Rows[i][26].ToString());
                List[i].ProcDate        = PIn.PDate(table.Rows[i][27].ToString());
                List[i].DateEntry       = PIn.PDate(table.Rows[i][28].ToString());
                List[i].LineNumber      = PIn.PInt(table.Rows[i][29].ToString());
            }
            return(List);
        }
コード例 #2
0
ファイル: Providers.cs プロジェクト: luisurbinanet/opendental
        //<summary>This should be eliminated when time.  It's just used in FormProviderSelect to keep track of which provider is highlighted.</summary>
        //public static int Selected;

        ///<summary>Refreshes List with all providers.</summary>
        public static void Refresh()
        {
            ArrayList AL      = new ArrayList();
            string    command = "SELECT * FROM provider ORDER BY ItemOrder";
            DataTable table   = General.GetTable(command);

            ListLong = new Provider[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                ListLong[i]              = new Provider();
                ListLong[i].ProvNum      = PIn.PInt(table.Rows[i][0].ToString());
                ListLong[i].Abbr         = PIn.PString(table.Rows[i][1].ToString());
                ListLong[i].ItemOrder    = PIn.PInt(table.Rows[i][2].ToString());
                ListLong[i].LName        = PIn.PString(table.Rows[i][3].ToString());
                ListLong[i].FName        = PIn.PString(table.Rows[i][4].ToString());
                ListLong[i].MI           = PIn.PString(table.Rows[i][5].ToString());
                ListLong[i].Suffix       = PIn.PString(table.Rows[i][6].ToString());
                ListLong[i].FeeSched     = PIn.PInt(table.Rows[i][7].ToString());
                ListLong[i].Specialty    = (DentalSpecialty)PIn.PInt(table.Rows[i][8].ToString());
                ListLong[i].SSN          = PIn.PString(table.Rows[i][9].ToString());
                ListLong[i].StateLicense = PIn.PString(table.Rows[i][10].ToString());
                ListLong[i].DEANum       = PIn.PString(table.Rows[i][11].ToString());
                ListLong[i].IsSecondary  = PIn.PBool(table.Rows[i][12].ToString());
                ListLong[i].ProvColor    = Color.FromArgb(PIn.PInt(table.Rows[i][13].ToString()));
                ListLong[i].IsHidden     = PIn.PBool(table.Rows[i][14].ToString());
                ListLong[i].UsingTIN     = PIn.PBool(table.Rows[i][15].ToString());
                //ListLong[i].BlueCrossID = PIn.PString(table.Rows[i][16].ToString());
                ListLong[i].SigOnFile         = PIn.PBool(table.Rows[i][17].ToString());
                ListLong[i].MedicaidID        = PIn.PString(table.Rows[i][18].ToString());
                ListLong[i].OutlineColor      = Color.FromArgb(PIn.PInt(table.Rows[i][19].ToString()));
                ListLong[i].SchoolClassNum    = PIn.PInt(table.Rows[i][20].ToString());
                ListLong[i].NationalProvID    = PIn.PString(table.Rows[i][21].ToString());
                ListLong[i].CanadianOfficeNum = PIn.PString(table.Rows[i][22].ToString());
                if (!ListLong[i].IsHidden)
                {
                    AL.Add(ListLong[i]);
                }
            }
            List = new Provider[AL.Count];
            AL.CopyTo(List);
        }
コード例 #3
0
        ///<summary></summary>
        public static void Refresh()
        {
            HList = new Hashtable();
            ProcedureCode tempCode = new ProcedureCode();
            string        command  = "SELECT * from procedurecode ORDER BY ProcCat,ADACode";
            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.ADACode   = PIn.PString(tableStat.Rows[i][0].ToString());
                tempCode.Descript  = PIn.PString(tableStat.Rows[i][1].ToString());
                tempCode.AbbrDesc  = PIn.PString(tableStat.Rows[i][2].ToString());
                tempCode.ProcTime  = PIn.PString(tableStat.Rows[i][3].ToString());
                tempCode.ProcCat   = PIn.PInt(tableStat.Rows[i][4].ToString());
                tempCode.TreatArea = (TreatmentArea)PIn.PInt(tableStat.Rows[i][5].ToString());
                //tempCode.RemoveTooth   =PIn.PBool  (tableStat.Rows[i][6].ToString());
                tempCode.SetRecall      = PIn.PBool(tableStat.Rows[i][7].ToString());
                tempCode.NoBillIns      = PIn.PBool(tableStat.Rows[i][8].ToString());
                tempCode.IsProsth       = PIn.PBool(tableStat.Rows[i][9].ToString());
                tempCode.DefaultNote    = PIn.PString(tableStat.Rows[i][10].ToString());
                tempCode.IsHygiene      = PIn.PBool(tableStat.Rows[i][11].ToString());
                tempCode.GTypeNum       = PIn.PInt(tableStat.Rows[i][12].ToString());
                tempCode.AlternateCode1 = PIn.PString(tableStat.Rows[i][13].ToString());
                tempCode.MedicalCode    = PIn.PString(tableStat.Rows[i][14].ToString());
                tempCode.IsTaxed        = PIn.PBool(tableStat.Rows[i][15].ToString());
                tempCode.PaintType      = (ToothPaintingType)PIn.PInt(tableStat.Rows[i][16].ToString());
                tempCode.GraphicColor   = Color.FromArgb(PIn.PInt(tableStat.Rows[i][17].ToString()));
                tempCode.LaymanTerm     = PIn.PString(tableStat.Rows[i][18].ToString());
                tempCode.IsCanadianLab  = PIn.PBool(tableStat.Rows[i][19].ToString());
                HList.Add(tempCode.ADACode, tempCode.Copy());
                List[i] = tempCode.Copy();
                if (tempCode.SetRecall)
                {
                    RecallAL.Add(tempCode);
                }
            }
        }
コード例 #4
0
        ///<summary>Gets all claimformitems for all claimforms.  Items for individual claimforms can later be extracted as needed.</summary>
        public static void Refresh()
        {
            string command =
                "SELECT * FROM claimformitem ORDER BY imagefilename desc";
            DataTable table = General.GetTable(command);

            List = new ClaimFormItem[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                List[i] = new ClaimFormItem();
                List[i].ClaimFormItemNum = PIn.PInt(table.Rows[i][0].ToString());
                List[i].ClaimFormNum     = PIn.PInt(table.Rows[i][1].ToString());
                List[i].ImageFileName    = PIn.PString(table.Rows[i][2].ToString());
                List[i].FieldName        = PIn.PString(table.Rows[i][3].ToString());
                List[i].FormatString     = PIn.PString(table.Rows[i][4].ToString());
                List[i].XPos             = PIn.PFloat(table.Rows[i][5].ToString());
                List[i].YPos             = PIn.PFloat(table.Rows[i][6].ToString());
                List[i].Width            = PIn.PFloat(table.Rows[i][7].ToString());
                List[i].Height           = PIn.PFloat(table.Rows[i][8].ToString());
            }
        }
コード例 #5
0
ファイル: PatPlans.cs プロジェクト: luisurbinanet/apolloniax
        ///<summary>Gets a list of all patplans for a given patient</summary>
        public static PatPlan[] Refresh(int patNum)
        {
            string command = "SELECT * from patplan"
                             + " WHERE PatNum = " + patNum.ToString()
                             + " ORDER BY Ordinal";
            DataTable table = General.GetTable(command);

            PatPlan[] List = new PatPlan[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                List[i]              = new PatPlan();
                List[i].PatPlanNum   = PIn.PInt(table.Rows[i][0].ToString());
                List[i].PatNum       = PIn.PInt(table.Rows[i][1].ToString());
                List[i].PlanNum      = PIn.PInt(table.Rows[i][2].ToString());
                List[i].Ordinal      = PIn.PInt(table.Rows[i][3].ToString());
                List[i].IsPending    = PIn.PBool(table.Rows[i][4].ToString());
                List[i].Relationship = (Relat)PIn.PInt(table.Rows[i][5].ToString());
                List[i].PatID        = PIn.PString(table.Rows[i][6].ToString());
            }
            return(List);
        }
コード例 #6
0
        ///<summary>Gets a list of all MountDefs when program first opens.  Also refreshes MountItemDefs and attaches all items to the appropriate mounts.</summary>
        public static void Refresh()
        {
            MountItemDefs.Refresh();
            string    command = "SELECT * FROM mountdef ORDER BY ItemOrder";
            DataTable table   = General.GetTable(command);

            Listt = new List <MountDef>();
            MountDef mount;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                mount              = new MountDef();
                mount.MountDefNum  = PIn.PInt(table.Rows[i][0].ToString());
                mount.Description  = PIn.PString(table.Rows[i][1].ToString());
                mount.ItemOrder    = PIn.PInt(table.Rows[i][2].ToString());
                mount.IsRadiograph = PIn.PBool(table.Rows[i][3].ToString());
                mount.Width        = PIn.PInt(table.Rows[i][4].ToString());
                mount.Height       = PIn.PInt(table.Rows[i][5].ToString());
                Listt.Add(mount);
            }
        }
コード例 #7
0
        private void grid_CellDoubleClick(object sender, OpenDental.UI.ODGridClickEventArgs e)
        {
            Cursor = Cursors.WaitCursor;
            int          selectedApt = PIn.PInt(table.Rows[e.Row]["AptNum"].ToString());
            Appointment  apt         = Appointments.GetOneApt(selectedApt);
            FormApptEdit FormA       = new FormApptEdit(apt);

            FormA.ShowDialog();
            //if(FormA.DialogResult==DialogResult.Cancel){
            //	Cursor=Cursors.Default;
            FillMain();
            for (int i = 0; i < table.Rows.Count; i++)
            {
                if (PIn.PInt(table.Rows[i]["AptNum"].ToString()) == selectedApt)
                {
                    grid.SetSelected(i, true);
                }
            }
            SetFamilyColors();
            Cursor = Cursors.Default;
        }
コード例 #8
0
ファイル: PayPlans.cs プロジェクト: luisurbinanet/apolloniax
        ///<summary>Gets a list of all payplans for a given patient, whether they are the guarantor or the patient.  This is also used in UpdateAll to store all payment plans in entire database.</summary>
        public static PayPlan[] Refresh(int guarantor, int patNum)
        {
            string command = "SELECT * from payplan"
                             + " WHERE PatNum = " + patNum.ToString()
                             + " OR Guarantor = " + guarantor.ToString() + " ORDER BY payplandate";
            DataTable table = General.GetTable(command);

            PayPlan[] List = new PayPlan[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                List[i]             = new PayPlan();
                List[i].PayPlanNum  = PIn.PInt(table.Rows[i][0].ToString());
                List[i].PatNum      = PIn.PInt(table.Rows[i][1].ToString());
                List[i].Guarantor   = PIn.PInt(table.Rows[i][2].ToString());
                List[i].PayPlanDate = PIn.PDate(table.Rows[i][3].ToString());
                List[i].APR         = PIn.PDouble(table.Rows[i][4].ToString());
                List[i].Note        = PIn.PString(table.Rows[i][5].ToString());
                List[i].PlanNum     = PIn.PInt(table.Rows[i][6].ToString());
            }
            return(List);
        }
コード例 #9
0
        ///<summary>For one patient</summary>
        public static RefAttach[] Refresh(int patNum)
        {
            string command =
                "SELECT * FROM refattach"
                + " WHERE patnum = " + patNum.ToString()
                + " ORDER BY itemorder";
            DataTable table = General.GetTable(command);

            RefAttach[] List = new RefAttach[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                List[i] = new RefAttach();
                List[i].RefAttachNum = PIn.PInt(table.Rows[i][0].ToString());
                List[i].ReferralNum  = PIn.PInt(table.Rows[i][1].ToString());
                List[i].PatNum       = PIn.PInt(table.Rows[i][2].ToString());
                List[i].ItemOrder    = PIn.PInt(table.Rows[i][3].ToString());
                List[i].RefDate      = PIn.PDate(table.Rows[i][4].ToString());
                List[i].IsFrom       = PIn.PBool(table.Rows[i][5].ToString());
            }
            return(List);
        }
コード例 #10
0
        ///<summary>Gets info directly from database.  If the employee is clocked out, this gets the status for clockin is based on how they last clocked out.  Also used to determine how to initially display timecard.</summary>
        public static TimeClockStatus GetLastStatus(int employeeNum)
        {
            string command = "SELECT ClockStatus FROM clockevent WHERE EmployeeNum=" + POut.PInt(employeeNum)
                             + " ORDER BY TimeDisplayed DESC ";

            if (FormChooseDatabase.DBtype == DatabaseType.Oracle)
            {
                command = "SELECT * FROM (" + command + ") WHERE ROWNUM<=1";
            }
            else              //Assum MySQL
            {
                command += "LIMIT 1";
            }
            DataTable table = General.GetTable(command);

            if (table.Rows.Count == 0)         //if this employee has never clocked in or out.
            {
                return(TimeClockStatus.Home);
            }
            return((TimeClockStatus)PIn.PInt(table.Rows[0][0].ToString()));
        }
コード例 #11
0
ファイル: Employers.cs プロジェクト: luisurbinanet/apolloniax
        ///<summary>Gets an employerNum from the database based on the supplied name.  If that empName does not exist, then a new employer is created, and the employerNum for the new employer is returned.</summary>
        public static int GetEmployerNum(string empName)
        {
            if (empName == "")
            {
                return(0);
            }
            string command = "SELECT EmployerNum FROM employer"
                             + " WHERE EmpName = '" + POut.PString(empName) + "'";
            DataTable table = General.GetTable(command);

            if (table.Rows.Count > 0)
            {
                return(PIn.PInt(table.Rows[0][0].ToString()));
            }
            Employer Cur = new Employer();

            Cur.EmpName = empName;
            Insert(Cur);
            //MessageBox.Show(Cur.EmployerNum.ToString());
            return(Cur.EmployerNum);
        }
コード例 #12
0
        private static JournalEntry[] RefreshAndFill(string command)
        {
            DataTable table = General.GetTable(command);

            JournalEntry[] List = new JournalEntry[table.Rows.Count];
            for (int i = 0; i < List.Length; i++)
            {
                List[i] = new JournalEntry();
                List[i].JournalEntryNum = PIn.PInt(table.Rows[i][0].ToString());
                List[i].TransactionNum  = PIn.PInt(table.Rows[i][1].ToString());
                List[i].AccountNum      = PIn.PInt(table.Rows[i][2].ToString());
                List[i].DateDisplayed   = PIn.PDate(table.Rows[i][3].ToString());
                List[i].DebitAmt        = PIn.PDouble(table.Rows[i][4].ToString());
                List[i].CreditAmt       = PIn.PDouble(table.Rows[i][5].ToString());
                List[i].Memo            = PIn.PString(table.Rows[i][6].ToString());
                List[i].Splits          = PIn.PString(table.Rows[i][7].ToString());
                List[i].CheckNumber     = PIn.PString(table.Rows[i][8].ToString());
                List[i].ReconcileNum    = PIn.PInt(table.Rows[i][9].ToString());
            }
            return(List);
        }
コード例 #13
0
        ///<summary>Refresh all clinics</summary>
        public static void Refresh()
        {
            string    command = "SELECT * FROM clinic";
            DataTable table   = General.GetTable(command);

            List = new Clinic[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                List[i]                     = new Clinic();
                List[i].ClinicNum           = PIn.PInt(table.Rows[i][0].ToString());
                List[i].Description         = PIn.PString(table.Rows[i][1].ToString());
                List[i].Address             = PIn.PString(table.Rows[i][2].ToString());
                List[i].Address2            = PIn.PString(table.Rows[i][3].ToString());
                List[i].City                = PIn.PString(table.Rows[i][4].ToString());
                List[i].State               = PIn.PString(table.Rows[i][5].ToString());
                List[i].Zip                 = PIn.PString(table.Rows[i][6].ToString());
                List[i].Phone               = PIn.PString(table.Rows[i][7].ToString());
                List[i].BankNumber          = PIn.PString(table.Rows[i][8].ToString());
                List[i].DefaultPlaceService = (PlaceOfService)PIn.PInt(table.Rows[i][9].ToString());
            }
        }
コード例 #14
0
        private static Schedule[] RefreshAndFill(string command)
        {
            DataTable table = General.GetTableEx(command);

            Schedule[] List = new Schedule[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                List[i]              = new Schedule();
                List[i].ScheduleNum  = PIn.PInt(table.Rows[i][0].ToString());
                List[i].SchedDate    = PIn.PDate(table.Rows[i][1].ToString());
                List[i].StartTime    = PIn.PDateT(table.Rows[i][2].ToString());
                List[i].StopTime     = PIn.PDateT(table.Rows[i][3].ToString());
                List[i].SchedType    = (ScheduleType)PIn.PInt(table.Rows[i][4].ToString());
                List[i].ProvNum      = PIn.PInt(table.Rows[i][5].ToString());
                List[i].BlockoutType = PIn.PInt(table.Rows[i][6].ToString());
                List[i].Note         = PIn.PString(table.Rows[i][7].ToString());
                List[i].Status       = (SchedStatus)PIn.PInt(table.Rows[i][8].ToString());
                List[i].Op           = PIn.PInt(table.Rows[i][9].ToString());
            }
            return(List);
        }
コード例 #15
0
ファイル: Employers.cs プロジェクト: luisurbinanet/apolloniax
        ///<summary>The functions that use this are smart enought to refresh as needed.  So no need to invalidate local data for little stuff.</summary>
        public static void Refresh()
        {
            HList = new Hashtable();
            string    command = "SELECT * from employer ORDER BY EmpName";
            DataTable table   = General.GetTable(command);

            List = new Employer[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                List[i]             = new Employer();
                List[i].EmployerNum = PIn.PInt(table.Rows[i][0].ToString());
                List[i].EmpName     = PIn.PString(table.Rows[i][1].ToString());
                List[i].Address     = PIn.PString(table.Rows[i][2].ToString());
                List[i].Address2    = PIn.PString(table.Rows[i][3].ToString());
                List[i].City        = PIn.PString(table.Rows[i][4].ToString());
                List[i].State       = PIn.PString(table.Rows[i][5].ToString());
                List[i].Zip         = PIn.PString(table.Rows[i][6].ToString());
                List[i].Phone       = PIn.PString(table.Rows[i][7].ToString());
                HList.Add(List[i].EmployerNum, List[i]);
            }
        }
コード例 #16
0
        ///<summary>Grouped by Category.  Used only in FormRpProcCodes.</summary>
        public static ProcedureCode[] GetProcList()
        {
            //ProcedureCode[] ProcList=new ProcedureCode[tableStat.Rows.Count];
            //int i=0;
            ProcedureCode procCode;
            ArrayList     AL = new ArrayList();

            for (int j = 0; j < DefB.Short[(int)DefCat.ProcCodeCats].Length; j++)
            {
                for (int k = 0; k < tableStat.Rows.Count; k++)
                {
                    if (DefB.Short[(int)DefCat.ProcCodeCats][j].DefNum == PIn.PInt(tableStat.Rows[k][5].ToString()))
                    {
                        procCode          = new ProcedureCode();
                        procCode.CodeNum  = PIn.PInt(tableStat.Rows[k][0].ToString());
                        procCode.ProcCode = PIn.PString(tableStat.Rows[k][1].ToString());
                        procCode.Descript = PIn.PString(tableStat.Rows[k][2].ToString());
                        procCode.AbbrDesc = PIn.PString(tableStat.Rows[k][3].ToString());
                        procCode.ProcCat  = PIn.PInt(tableStat.Rows[k][5].ToString());
                        AL.Add(procCode);
                        //i++;
                    }
                }
            }

            /*for(int k=0;k<tableStat.Rows.Count;k++){
             *      if(PIn.PInt(tableStat.Rows[k][4].ToString())==255){
             *              ProcList[i]=new ProcedureCode();
             *              ProcList[i].ProcCode = PIn.PString(tableStat.Rows[k][0].ToString());
             *              ProcList[i].Descript= PIn.PString(tableStat.Rows[k][1].ToString());
             *              ProcList[i].AbbrDesc= PIn.PString(tableStat.Rows[k][2].ToString());
             *              ProcList[i].ProcCat = 255;
             *              i++;
             *      }
             * }*/
            ProcedureCode[] retVal = new ProcedureCode[AL.Count];
            AL.CopyTo(retVal);
            return(retVal);
            //return ProcList;
        }
コード例 #17
0
 ///<summary>Not possible if no security admin.</summary>
 private void butCreateUsers_Click(object sender, EventArgs e)
 {
     if (gridMain.SelectedIndices.Length == 0)
     {
         MsgBox.Show(this, "Please select one or more providers first.");
         return;
     }
     for (int i = 0; i < gridMain.SelectedIndices.Length; i++)
     {
         if (table.Rows[i]["UserName"].ToString() != "")
         {
             MsgBox.Show(this, "Not allowed to create users on providers which already have users.");
             return;
         }
     }
     if (comboUserGroup.SelectedIndex == -1)
     {
         MsgBox.Show(this, "Please select a User Group first.");
         return;
     }
     for (int i = 0; i < gridMain.SelectedIndices.Length; i++)
     {
         Userod user = new Userod();
         user.UserGroupNum = UserGroups.List[comboUserGroup.SelectedIndex].UserGroupNum;
         user.ProvNum      = PIn.PInt(table.Rows[gridMain.SelectedIndices[i]]["ProvNum"].ToString());
         user.UserName     = GetUniqueUserName(table.Rows[gridMain.SelectedIndices[i]]["LName"].ToString(),
                                               table.Rows[gridMain.SelectedIndices[i]]["FName"].ToString());
         user.Password = user.UserName;              //this will be enhanced later.
         try{
             Userods.InsertOrUpdate(true, user);
         }
         catch (ApplicationException ex) {
             MessageBox.Show(ex.Message);
             changed = true;
             return;
         }
     }
     changed = true;
     FillGrid();
 }
コード例 #18
0
        ///<summary></summary>
        public static void Synch(int schoolClassNum, int schoolCourseNum)
        {
            //get list of all reqneededs for the given class and course.
            DataTable  table = Refresh(schoolClassNum, schoolCourseNum);
            string     command;
            int        reqNeededNum;
            DataTable  tStudent;
            string     descript;
            ReqStudent req;

            //1. Delete any reqstudents that do not have gradepoint
            command = "DELETE FROM reqstudent "
                      + "WHERE NOT EXISTS(SELECT * FROM reqneeded WHERE reqstudent.ReqNeededNum=reqneeded.ReqNeededNum) "
                      + "AND reqstudent.DateCompleted < " + POut.PDate(new DateTime(1880, 1, 1));
            General.NonQ(command);
            for (int i = 0; i < table.Rows.Count; i++)
            {
                reqNeededNum = PIn.PInt(table.Rows[i]["ReqNeededNum"].ToString());
                descript     = PIn.PString(table.Rows[i]["Descript"].ToString());
                //2. Update.  Update the description for all students using this requirement.
                command = "UPDATE reqstudent SET Descript='" + POut.PString(descript) + "' "
                          + "WHERE ReqNeededNum=" + POut.PInt(reqNeededNum);
                General.NonQ(command);
                //3. Insert.  Get list of students that do not have this req.  For each student, insert.
                command = "SELECT ProvNum FROM provider WHERE SchoolClassNum=" + POut.PInt(schoolClassNum)
                          + " AND NOT EXISTS(SELECT * FROM reqstudent WHERE reqstudent.ProvNum=provider.ProvNum"
                          + " AND ReqNeededNum=" + POut.PInt(reqNeededNum) + ")";
                tStudent = General.GetTable(command);
                for (int s = 0; s < tStudent.Rows.Count; s++)
                {
                    req                 = new ReqStudent();
                    req.Descript        = descript;
                    req.ProvNum         = PIn.PInt(tStudent.Rows[s]["ProvNum"].ToString());
                    req.ReqNeededNum    = reqNeededNum;
                    req.SchoolCourseNum = PIn.PInt(table.Rows[i]["SchoolCourseNum"].ToString());
                    ReqStudents.Insert(req);
                }
            }
        }
コード例 #19
0
        /// <summary>A list with all the control settings</summary>
        public static void Refresh()
        {
            string    command = "SELECT * FROM autonotecontrol ORDER BY AutoNoteControlNum";
            DataTable table   = General.GetTable(command);

            Listt = new List <AutoNoteControl>();
            //List = new AutoNote[table.Rows.Count];
            AutoNoteControl noteCont;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                noteCont = new AutoNoteControl();
                noteCont.AutoNoteControlNum = PIn.PInt(table.Rows[i][0].ToString());
                noteCont.Descript           = PIn.PString(table.Rows[i]["Descript"].ToString());
                noteCont.ControlType        = PIn.PString(table.Rows[i]["ControlType"].ToString());
                noteCont.ControlLabel       = PIn.PString(table.Rows[i]["ControlLabel"].ToString());
                noteCont.PrefaceText        = PIn.PString(table.Rows[i]["PrefaceText"].ToString());
                noteCont.MultiLineText      = PIn.PString(table.Rows[i]["MultiLineText"].ToString());
                noteCont.ControlOptions     = PIn.PString(table.Rows[i]["ControlOptions"].ToString());
                Listt.Add(noteCont);
            }
        }
コード例 #20
0
ファイル: InsPlans.cs プロジェクト: luisurbinanet/apolloniax
        private static InsPlan[] RefreshFill(string command)
        {
            DataTable table = General.GetTable(command);

            InsPlan[] PlanList = new InsPlan[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                PlanList[i]                      = new InsPlan();
                PlanList[i].PlanNum              = PIn.PInt(table.Rows[i][0].ToString());
                PlanList[i].Subscriber           = PIn.PInt(table.Rows[i][1].ToString());
                PlanList[i].DateEffective        = PIn.PDate(table.Rows[i][2].ToString());
                PlanList[i].DateTerm             = PIn.PDate(table.Rows[i][3].ToString());
                PlanList[i].GroupName            = PIn.PString(table.Rows[i][4].ToString());
                PlanList[i].GroupNum             = PIn.PString(table.Rows[i][5].ToString());
                PlanList[i].PlanNote             = PIn.PString(table.Rows[i][6].ToString());
                PlanList[i].FeeSched             = PIn.PInt(table.Rows[i][7].ToString());
                PlanList[i].ReleaseInfo          = PIn.PBool(table.Rows[i][8].ToString());
                PlanList[i].AssignBen            = PIn.PBool(table.Rows[i][9].ToString());
                PlanList[i].PlanType             = PIn.PString(table.Rows[i][10].ToString());
                PlanList[i].ClaimFormNum         = PIn.PInt(table.Rows[i][11].ToString());
                PlanList[i].UseAltCode           = PIn.PBool(table.Rows[i][12].ToString());
                PlanList[i].ClaimsUseUCR         = PIn.PBool(table.Rows[i][13].ToString());
                PlanList[i].CopayFeeSched        = PIn.PInt(table.Rows[i][14].ToString());
                PlanList[i].SubscriberID         = PIn.PString(table.Rows[i][15].ToString());
                PlanList[i].EmployerNum          = PIn.PInt(table.Rows[i][16].ToString());
                PlanList[i].CarrierNum           = PIn.PInt(table.Rows[i][17].ToString());
                PlanList[i].AllowedFeeSched      = PIn.PInt(table.Rows[i][18].ToString());
                PlanList[i].TrojanID             = PIn.PString(table.Rows[i][19].ToString());
                PlanList[i].DivisionNo           = PIn.PString(table.Rows[i][20].ToString());
                PlanList[i].BenefitNotes         = PIn.PString(table.Rows[i][21].ToString());
                PlanList[i].IsMedical            = PIn.PBool(table.Rows[i][22].ToString());
                PlanList[i].SubscNote            = PIn.PString(table.Rows[i][23].ToString());
                PlanList[i].FilingCode           = (InsFilingCode)PIn.PInt(table.Rows[i][24].ToString());
                PlanList[i].DentaideCardSequence = PIn.PInt(table.Rows[i][25].ToString());
                PlanList[i].ShowBaseUnits        = PIn.PBool(table.Rows[i][26].ToString());
                PlanList[i].DedBeforePerc        = PIn.PBool(table.Rows[i][27].ToString());
            }
            return(PlanList);
        }
コード例 #21
0
ファイル: Defs.cs プロジェクト: luisurbinanet/apolloniax
        ///<summary>Only used in FormDefinitions</summary>
        public static Def[] GetCatList(int myCat)
        {
            string command =
                "SELECT * from definition"
                + " WHERE category = '" + myCat + "'"
                + " ORDER BY ItemOrder";
            DataSet ds = null;

            try {
                if (RemotingClient.OpenDentBusinessIsLocal)
                {
                    ds = GeneralB.GetTable(command);
                }
                else
                {
                    DtoGeneralGetTable dto = new DtoGeneralGetTable();
                    dto.Command = command;
                    ds          = RemotingClient.ProcessQuery(dto);
                }
            }
            catch (Exception e) {
                MessageBox.Show(e.Message);
            }
            DataTable table = ds.Tables[0];

            Def[] List = new Def[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                List[i]           = new Def();
                List[i].DefNum    = PIn.PInt(table.Rows[i][0].ToString());
                List[i].Category  = (DefCat)PIn.PInt(table.Rows[i][1].ToString());
                List[i].ItemOrder = PIn.PInt(table.Rows[i][2].ToString());
                List[i].ItemName  = PIn.PString(table.Rows[i][3].ToString());
                List[i].ItemValue = PIn.PString(table.Rows[i][4].ToString());
                List[i].ItemColor = Color.FromArgb(PIn.PInt(table.Rows[i][5].ToString()));
                List[i].IsHidden  = PIn.PBool(table.Rows[i][6].ToString());
            }
            return(List);
        }
コード例 #22
0
 private void butOK_Click(object sender, System.EventArgs e)
 {
     if (IsSelectMode)
     {
         if (gridMain.SelectedIndices.Length == 0)
         {
             MessageBox.Show(Lan.g(this, "Please select an item first."));
             return;
         }
         if (gridMain.SelectedIndices.Length > 1)
         {
             MessageBox.Show(Lan.g(this, "Please select only one item first."));
             return;
         }
         SelectedPlan = InsPlans.GetPlan(PIn.PInt(table.Rows[gridMain.SelectedIndices[0]]["PlanNum"].ToString()), null).Copy();
         DialogResult = DialogResult.OK;
     }
     else             //just editing the list from the main menu
     {
         DialogResult = DialogResult.OK;
     }
 }
コード例 #23
0
 private void butOK_Click(object sender, System.EventArgs e)
 {
     //Cur.IsFrom already handled
     if (textOrder.errorProvider1.GetError(textOrder) != "" ||
         textRefDate.errorProvider1.GetError(textRefDate) != ""
         )
     {
         MessageBox.Show(Lan.g(this, "Please fix data entry errors first."));
         return;
     }
     RefAttachCur.RefDate   = PIn.PDate(textRefDate.Text);
     RefAttachCur.ItemOrder = PIn.PInt(textOrder.Text);
     if (IsNew)
     {
         RefAttaches.Insert(RefAttachCur);
     }
     else
     {
         RefAttaches.Update(RefAttachCur);
     }
     DialogResult = DialogResult.OK;
 }
コード例 #24
0
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            Userod       user  = UserodB.GetUser(PIn.PInt(table.Rows[e.Row]["UserNum"].ToString()));
            FormUserEdit FormU = new FormUserEdit(user);

            FormU.ShowDialog();
            if (FormU.DialogResult == DialogResult.Cancel)
            {
                return;
            }
            FillUsers();
            for (int i = 0; i < table.Rows.Count; i++)
            {
                if (table.Rows[i]["UserNum"].ToString() == FormU.UserCur.UserNum.ToString())
                {
                    gridMain.SetSelected(i, true);
                    SelectedGroupNum = FormU.UserCur.UserGroupNum;
                }
            }
            FillTreePerm();
            changed = true;
        }
コード例 #25
0
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            //if(IsSelectionMode){
            //	if(table.Rows[e.Row]["appointment"].ToString()!=""){
            //		MsgBox.Show(this,"Already attached to an appointment.");
            //		return;
            //	}
            //	SelectedReqStudentNum=PIn.PInt(table.Rows[e.Row]["ReqStudentNum"].ToString());
            //	DialogResult=DialogResult.OK;
            //}
            //else{
            FormReqStudentEdit FormRSE = new FormReqStudentEdit();

            FormRSE.ReqCur = ReqStudents.GetOne(PIn.PInt(table.Rows[e.Row]["ReqStudentNum"].ToString()));
            FormRSE.ShowDialog();
            if (FormRSE.DialogResult != DialogResult.OK)
            {
                return;
            }
            FillGrid();
            //}
        }
コード例 #26
0
        ///<summary>Gets all scheddefaults and stores them in a static array.</summary>
        public static void Refresh()
        {
            string command =
                "SELECT * from scheddefault "
                + "ORDER BY SchedType,"      //this keeps the painting in the correct order
                + "StartTime";               //this helps in the monthly display
            DataTable table = General.GetTable(command);

            List = new SchedDefault[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                List[i] = new SchedDefault();
                List[i].SchedDefaultNum = PIn.PInt(table.Rows[i][0].ToString());
                List[i].DayOfWeek       = PIn.PInt(table.Rows[i][1].ToString());
                List[i].StartTime       = PIn.PDateT(table.Rows[i][2].ToString());
                List[i].StopTime        = PIn.PDateT(table.Rows[i][3].ToString());
                List[i].SchedType       = (ScheduleType)PIn.PInt(table.Rows[i][4].ToString());
                List[i].ProvNum         = PIn.PInt(table.Rows[i][5].ToString());
                List[i].BlockoutType    = PIn.PInt(table.Rows[i][6].ToString());
                List[i].Op = PIn.PInt(table.Rows[i][7].ToString());
            }
        }
コード例 #27
0
ファイル: Printers.cs プロジェクト: luisurbinanet/apolloniax
        ///<summary>Either does an insert or an update to the database if need to create a Printer object.  Or it also deletes a printer object if needed.</summary>
        public static void PutForSit(PrintSituation sit, string computerName, string printerName
                                     , bool displayPrompt)
        {
            //Computer[] compList=Computers.Refresh();
            //Computer compCur=Computers.GetCur();
            string command = "SELECT ComputerNum FROM computer "
                             + "WHERE CompName = '" + POut.PString(computerName) + "'";
            DataTable table = General.GetTable(command);

            if (table.Rows.Count == 0)
            {
                return;                //computer not yet entered in db.
            }
            int     compNum  = PIn.PInt(table.Rows[0][0].ToString());
            Printer existing = GetOnePrinter(sit, compNum); //GetForSit(sit);

            if (printerName == "" && !displayPrompt)        //then should not be an entry in db
            {
                if (existing != null)                       //need to delete Printer
                {
                    Delete(existing);
                }
            }
            else if (existing == null)
            {
                Printer cur = new Printer();
                cur.ComputerNum   = compNum;
                cur.PrintSit      = sit;
                cur.PrinterName   = printerName;
                cur.DisplayPrompt = displayPrompt;
                Insert(cur);
            }
            else
            {
                existing.PrinterName   = printerName;
                existing.DisplayPrompt = displayPrompt;
                Update(existing);
            }
        }
コード例 #28
0
        ///<summary>Gets all measurements for the current patient, then organizes them by exam and sequence.</summary>
        public static void Refresh(int patNum)
        {
            string command =
                "SELECT periomeasure.*,perioexam.ExamDate"
                + " FROM periomeasure,perioexam"
                + " WHERE periomeasure.PerioExamNum = perioexam.PerioExamNum"
                + " AND perioexam.PatNum = '" + patNum.ToString() + "'"
                + " ORDER BY perioexam.ExamDate";
            DataTable table = General.GetTable(command);

            List = new PerioMeasure[PerioExams.List.Length, Enum.GetNames(typeof(PerioSequenceType)).Length, 33];
            int          curExamI = 0;
            PerioMeasure Cur;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                Cur = new PerioMeasure();
                Cur.PerioMeasureNum = PIn.PInt(table.Rows[i][0].ToString());
                Cur.PerioExamNum    = PIn.PInt(table.Rows[i][1].ToString());
                Cur.SequenceType    = (PerioSequenceType)PIn.PInt(table.Rows[i][2].ToString());
                Cur.IntTooth        = PIn.PInt(table.Rows[i][3].ToString());
                Cur.ToothValue      = PIn.PInt(table.Rows[i][4].ToString());
                Cur.MBvalue         = PIn.PInt(table.Rows[i][5].ToString());
                Cur.Bvalue          = PIn.PInt(table.Rows[i][6].ToString());
                Cur.DBvalue         = PIn.PInt(table.Rows[i][7].ToString());
                Cur.MLvalue         = PIn.PInt(table.Rows[i][8].ToString());
                Cur.Lvalue          = PIn.PInt(table.Rows[i][9].ToString());
                Cur.DLvalue         = PIn.PInt(table.Rows[i][10].ToString());
                //perioexam.ExamDate                           11
                //the next statement can also handle exams with no measurements:
                if (i == 0 ||          //if this is the first row
                    table.Rows[i][1].ToString() != table.Rows[i - 1][1].ToString())                     //or examNum has changed
                {
                    curExamI = PerioExams.GetExamIndex(PIn.PInt(table.Rows[i][1].ToString()));
                }
                List[curExamI, (int)Cur.SequenceType, Cur.IntTooth] = Cur;
            }
        }
コード例 #29
0
        ///<summary>This is used by FormImageViewer to get a list of paths based on supplied list of DocNums. The reason is that later we will allow sharing of documents, so the paths may not be in the current patient folder.</summary>
        public static ArrayList GetPaths(ArrayList docNums)
        {
            if (docNums.Count == 0)
            {
                return(new ArrayList());
            }
            string command = "SELECT document.DocNum,document.FileName,patient.ImageFolder "
                             + "FROM document "
                             + "LEFT JOIN patient ON patient.PatNum=document.WithPat "
                             + "WHERE document.DocNum = '" + docNums[0].ToString() + "'";

            for (int i = 1; i < docNums.Count; i++)
            {
                command += " OR document.DocNum = '" + docNums[i].ToString() + "'";
            }
            //remember, they will not be in the correct order.
            DataTable table = General.GetTable(command);
            Hashtable hList = new Hashtable();          //key=docNum, value=path

            //one row for each document, but in the wrong order
            for (int i = 0; i < table.Rows.Count; i++)
            {
                hList.Add(PIn.PInt(table.Rows[i][0].ToString()),
                          ((Pref)PrefB.HList["DocPath"]).ValueString
                          + PIn.PString(table.Rows[i][2].ToString()).Substring(0, 1)
                          + @"\"
                          + PIn.PString(table.Rows[i][2].ToString())
                          + @"\"
                          + PIn.PString(table.Rows[i][1].ToString()));
            }
            ArrayList retVal = new ArrayList();

            for (int i = 0; i < docNums.Count; i++)
            {
                retVal.Add((string)hList[(int)docNums[i]]);
            }
            return(retVal);
        }
コード例 #30
0
ファイル: Claims.cs プロジェクト: luisurbinanet/apolloniax
        ///<summary>Called from claimsend window and from Claim edit window.  Use -1 to get all waiting claims, or an actual claimnum to get just one claim.</summary>
        public static ClaimSendQueueItem[] GetQueueList(int claimNum)
        {
            string command =
                "SELECT claim.ClaimNum,carrier.NoSendElect"
                + ",CONCAT(CONCAT(CONCAT(concat(patient.LName,', '),patient.FName),' '),patient.MiddleI)"
                + ",claim.ClaimStatus,carrier.CarrierName,patient.PatNum,carrier.ElectID,insplan.IsMedical "
                + "FROM claim "
                + "Left join insplan on claim.PlanNum = insplan.PlanNum "
                + "Left join carrier on insplan.CarrierNum = carrier.CarrierNum "
                + "Left join patient on patient.PatNum = claim.PatNum ";

            if (claimNum == 0)
            {
                command += "WHERE claim.ClaimStatus = 'W' OR claim.ClaimStatus = 'P' ";
            }
            else
            {
                command += "WHERE claim.ClaimNum=" + POut.PInt(claimNum) + " ";
            }
            command += "ORDER BY insplan.IsMedical";          //this puts the medical claims at the end, helping with the looping in X12.
            //MessageBox.Show(string command);
            DataTable table = General.GetTable(command);

            ClaimSendQueueItem[] listQueue = new ClaimSendQueueItem[table.Rows.Count];
            for (int i = 0; i < table.Rows.Count; i++)
            {
                listQueue[i]                  = new ClaimSendQueueItem();
                listQueue[i].ClaimNum         = PIn.PInt(table.Rows[i][0].ToString());
                listQueue[i].NoSendElect      = PIn.PBool(table.Rows[i][1].ToString());
                listQueue[i].PatName          = PIn.PString(table.Rows[i][2].ToString());
                listQueue[i].ClaimStatus      = PIn.PString(table.Rows[i][3].ToString());
                listQueue[i].Carrier          = PIn.PString(table.Rows[i][4].ToString());
                listQueue[i].PatNum           = PIn.PInt(table.Rows[i][5].ToString());
                listQueue[i].ClearinghouseNum = Clearinghouses.GetNumForPayor(PIn.PString(table.Rows[i][6].ToString()));
                listQueue[i].IsMedical        = PIn.PBool(table.Rows[i][7].ToString());
            }
            return(listQueue);
        }