예제 #1
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        internal static List <ReqStudent> TableToList(DataTable table)
        {
            List <ReqStudent> retVal = new List <ReqStudent>();
            ReqStudent        reqStudent;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                reqStudent = new ReqStudent();
                reqStudent.ReqStudentNum   = PIn.Long(table.Rows[i]["ReqStudentNum"].ToString());
                reqStudent.ReqNeededNum    = PIn.Long(table.Rows[i]["ReqNeededNum"].ToString());
                reqStudent.Descript        = PIn.String(table.Rows[i]["Descript"].ToString());
                reqStudent.SchoolCourseNum = PIn.Long(table.Rows[i]["SchoolCourseNum"].ToString());
                reqStudent.ProvNum         = PIn.Long(table.Rows[i]["ProvNum"].ToString());
                reqStudent.AptNum          = PIn.Long(table.Rows[i]["AptNum"].ToString());
                reqStudent.PatNum          = PIn.Long(table.Rows[i]["PatNum"].ToString());
                reqStudent.InstructorNum   = PIn.Long(table.Rows[i]["InstructorNum"].ToString());
                reqStudent.DateCompleted   = PIn.Date(table.Rows[i]["DateCompleted"].ToString());
                retVal.Add(reqStudent);
            }
            return(retVal);
        }
예제 #2
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        public static List <ReqStudent> TableToList(DataTable table)
        {
            List <ReqStudent> retVal = new List <ReqStudent>();
            ReqStudent        reqStudent;

            foreach (DataRow row in table.Rows)
            {
                reqStudent = new ReqStudent();
                reqStudent.ReqStudentNum   = PIn.Long(row["ReqStudentNum"].ToString());
                reqStudent.ReqNeededNum    = PIn.Long(row["ReqNeededNum"].ToString());
                reqStudent.Descript        = PIn.String(row["Descript"].ToString());
                reqStudent.SchoolCourseNum = PIn.Long(row["SchoolCourseNum"].ToString());
                reqStudent.ProvNum         = PIn.Long(row["ProvNum"].ToString());
                reqStudent.AptNum          = PIn.Long(row["AptNum"].ToString());
                reqStudent.PatNum          = PIn.Long(row["PatNum"].ToString());
                reqStudent.InstructorNum   = PIn.Long(row["InstructorNum"].ToString());
                reqStudent.DateCompleted   = PIn.Date(row["DateCompleted"].ToString());
                retVal.Add(reqStudent);
            }
            return(retVal);
        }
예제 #3
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        public static List <EhrNotPerformed> TableToList(DataTable table)
        {
            List <EhrNotPerformed> retVal = new List <EhrNotPerformed>();
            EhrNotPerformed        ehrNotPerformed;

            foreach (DataRow row in table.Rows)
            {
                ehrNotPerformed = new EhrNotPerformed();
                ehrNotPerformed.EhrNotPerformedNum = PIn.Long(row["EhrNotPerformedNum"].ToString());
                ehrNotPerformed.PatNum             = PIn.Long(row["PatNum"].ToString());
                ehrNotPerformed.ProvNum            = PIn.Long(row["ProvNum"].ToString());
                ehrNotPerformed.CodeValue          = PIn.String(row["CodeValue"].ToString());
                ehrNotPerformed.CodeSystem         = PIn.String(row["CodeSystem"].ToString());
                ehrNotPerformed.CodeValueReason    = PIn.String(row["CodeValueReason"].ToString());
                ehrNotPerformed.CodeSystemReason   = PIn.String(row["CodeSystemReason"].ToString());
                ehrNotPerformed.Note      = PIn.String(row["Note"].ToString());
                ehrNotPerformed.DateEntry = PIn.Date(row["DateEntry"].ToString());
                retVal.Add(ehrNotPerformed);
            }
            return(retVal);
        }
예제 #4
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        public static List <FeeSched> TableToList(DataTable table)
        {
            List <FeeSched> retVal = new List <FeeSched>();
            FeeSched        feeSched;

            foreach (DataRow row in table.Rows)
            {
                feeSched                 = new FeeSched();
                feeSched.FeeSchedNum     = PIn.Long(row["FeeSchedNum"].ToString());
                feeSched.Description     = PIn.String(row["Description"].ToString());
                feeSched.FeeSchedType    = (OpenDentBusiness.FeeScheduleType)PIn.Int(row["FeeSchedType"].ToString());
                feeSched.ItemOrder       = PIn.Int(row["ItemOrder"].ToString());
                feeSched.IsHidden        = PIn.Bool(row["IsHidden"].ToString());
                feeSched.IsGlobal        = PIn.Bool(row["IsGlobal"].ToString());
                feeSched.SecUserNumEntry = PIn.Long(row["SecUserNumEntry"].ToString());
                feeSched.SecDateEntry    = PIn.Date(row["SecDateEntry"].ToString());
                feeSched.SecDateTEdit    = PIn.DateT(row["SecDateTEdit"].ToString());
                retVal.Add(feeSched);
            }
            return(retVal);
        }
예제 #5
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        internal static List <Diseasem> TableToList(DataTable table)
        {
            List <Diseasem> retVal = new List <Diseasem>();
            Diseasem        diseasem;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                diseasem               = new Diseasem();
                diseasem.CustomerNum   = PIn.Long(table.Rows[i]["CustomerNum"].ToString());
                diseasem.DiseaseNum    = PIn.Long(table.Rows[i]["DiseaseNum"].ToString());
                diseasem.PatNum        = PIn.Long(table.Rows[i]["PatNum"].ToString());
                diseasem.DiseaseDefNum = PIn.Long(table.Rows[i]["DiseaseDefNum"].ToString());
                diseasem.PatNote       = PIn.String(table.Rows[i]["PatNote"].ToString());
                diseasem.ICD9Num       = PIn.Long(table.Rows[i]["ICD9Num"].ToString());
                diseasem.ProbStatus    = (ProblemStatus)PIn.Int(table.Rows[i]["ProbStatus"].ToString());
                diseasem.DateStart     = PIn.Date(table.Rows[i]["DateStart"].ToString());
                diseasem.DateStop      = PIn.Date(table.Rows[i]["DateStop"].ToString());
                retVal.Add(diseasem);
            }
            return(retVal);
        }
예제 #6
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        public static List <Mount> TableToList(DataTable table)
        {
            List <Mount> retVal = new List <Mount>();
            Mount        mount;

            foreach (DataRow row in table.Rows)
            {
                mount             = new Mount();
                mount.MountNum    = PIn.Long(row["MountNum"].ToString());
                mount.PatNum      = PIn.Long(row["PatNum"].ToString());
                mount.DocCategory = PIn.Long(row["DocCategory"].ToString());
                mount.DateCreated = PIn.Date(row["DateCreated"].ToString());
                mount.Description = PIn.String(row["Description"].ToString());
                mount.Note        = PIn.String(row["Note"].ToString());
                mount.ImgType     = (OpenDentBusiness.ImageType)PIn.Int(row["ImgType"].ToString());
                mount.Width       = PIn.Int(row["Width"].ToString());
                mount.Height      = PIn.Int(row["Height"].ToString());
                retVal.Add(mount);
            }
            return(retVal);
        }
예제 #7
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        public static List <Intervention> TableToList(DataTable table)
        {
            List <Intervention> retVal = new List <Intervention>();
            Intervention        intervention;

            foreach (DataRow row in table.Rows)
            {
                intervention = new Intervention();
                intervention.InterventionNum = PIn.Long(row["InterventionNum"].ToString());
                intervention.PatNum          = PIn.Long(row["PatNum"].ToString());
                intervention.ProvNum         = PIn.Long(row["ProvNum"].ToString());
                intervention.CodeValue       = PIn.String(row["CodeValue"].ToString());
                intervention.CodeSystem      = PIn.String(row["CodeSystem"].ToString());
                intervention.Note            = PIn.String(row["Note"].ToString());
                intervention.DateEntry       = PIn.Date(row["DateEntry"].ToString());
                intervention.CodeSet         = (OpenDentBusiness.InterventionCodeSet)PIn.Int(row["CodeSet"].ToString());
                intervention.IsPatDeclined   = PIn.Bool(row["IsPatDeclined"].ToString());
                retVal.Add(intervention);
            }
            return(retVal);
        }
예제 #8
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        public static List <ScreenGroup> TableToList(DataTable table)
        {
            List <ScreenGroup> retVal = new List <ScreenGroup>();
            ScreenGroup        screenGroup;

            foreach (DataRow row in table.Rows)
            {
                screenGroup = new ScreenGroup();
                screenGroup.ScreenGroupNum = PIn.Long(row["ScreenGroupNum"].ToString());
                screenGroup.Description    = PIn.String(row["Description"].ToString());
                screenGroup.SGDate         = PIn.Date(row["SGDate"].ToString());
                screenGroup.ProvName       = PIn.String(row["ProvName"].ToString());
                screenGroup.ProvNum        = PIn.Long(row["ProvNum"].ToString());
                screenGroup.PlaceService   = (OpenDentBusiness.PlaceOfService)PIn.Int(row["PlaceService"].ToString());
                screenGroup.County         = PIn.String(row["County"].ToString());
                screenGroup.GradeSchool    = PIn.String(row["GradeSchool"].ToString());
                screenGroup.SheetDefNum    = PIn.Long(row["SheetDefNum"].ToString());
                retVal.Add(screenGroup);
            }
            return(retVal);
        }
예제 #9
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        internal static List <TaskList> TableToList(DataTable table)
        {
            List <TaskList> retVal = new List <TaskList>();
            TaskList        taskList;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                taskList               = new TaskList();
                taskList.TaskListNum   = PIn.Long(table.Rows[i]["TaskListNum"].ToString());
                taskList.Descript      = PIn.String(table.Rows[i]["Descript"].ToString());
                taskList.Parent        = PIn.Long(table.Rows[i]["Parent"].ToString());
                taskList.DateTL        = PIn.Date(table.Rows[i]["DateTL"].ToString());
                taskList.IsRepeating   = PIn.Bool(table.Rows[i]["IsRepeating"].ToString());
                taskList.DateType      = (TaskDateType)PIn.Int(table.Rows[i]["DateType"].ToString());
                taskList.FromNum       = PIn.Long(table.Rows[i]["FromNum"].ToString());
                taskList.ObjectType    = (TaskObjectType)PIn.Int(table.Rows[i]["ObjectType"].ToString());
                taskList.DateTimeEntry = PIn.DateT(table.Rows[i]["DateTimeEntry"].ToString());
                retVal.Add(taskList);
            }
            return(retVal);
        }
예제 #10
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        public static List <PayPlan> TableToList(DataTable table)
        {
            List <PayPlan> retVal = new List <PayPlan>();
            PayPlan        payPlan;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                payPlan              = new PayPlan();
                payPlan.PayPlanNum   = PIn.Long(table.Rows[i]["PayPlanNum"].ToString());
                payPlan.PatNum       = PIn.Long(table.Rows[i]["PatNum"].ToString());
                payPlan.Guarantor    = PIn.Long(table.Rows[i]["Guarantor"].ToString());
                payPlan.PayPlanDate  = PIn.Date(table.Rows[i]["PayPlanDate"].ToString());
                payPlan.APR          = PIn.Double(table.Rows[i]["APR"].ToString());
                payPlan.Note         = PIn.String(table.Rows[i]["Note"].ToString());
                payPlan.PlanNum      = PIn.Long(table.Rows[i]["PlanNum"].ToString());
                payPlan.CompletedAmt = PIn.Double(table.Rows[i]["CompletedAmt"].ToString());
                payPlan.InsSubNum    = PIn.Long(table.Rows[i]["InsSubNum"].ToString());
                retVal.Add(payPlan);
            }
            return(retVal);
        }
예제 #11
0
파일: MountCrud.cs 프로젝트: nampn/ODental
        ///<summary>Converts a DataTable to a list of objects.</summary>
        internal static List <Mount> TableToList(DataTable table)
        {
            List <Mount> retVal = new List <Mount>();
            Mount        mount;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                mount             = new Mount();
                mount.MountNum    = PIn.Long(table.Rows[i]["MountNum"].ToString());
                mount.PatNum      = PIn.Long(table.Rows[i]["PatNum"].ToString());
                mount.DocCategory = PIn.Long(table.Rows[i]["DocCategory"].ToString());
                mount.DateCreated = PIn.Date(table.Rows[i]["DateCreated"].ToString());
                mount.Description = PIn.String(table.Rows[i]["Description"].ToString());
                mount.Note        = PIn.String(table.Rows[i]["Note"].ToString());
                mount.ImgType     = (ImageType)PIn.Int(table.Rows[i]["ImgType"].ToString());
                mount.Width       = PIn.Int(table.Rows[i]["Width"].ToString());
                mount.Height      = PIn.Int(table.Rows[i]["Height"].ToString());
                retVal.Add(mount);
            }
            return(retVal);
        }
예제 #12
0
        public RegistrationKey GetByKey(string regKey)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                return(Meth.GetObject <RegistrationKey>(MethodBase.GetCurrentMethod(), regKey));
            }
            if (!Regex.IsMatch(regKey, @"^[A-Z0-9]{16}$"))
            {
                throw new ApplicationException("Invalid registration key format.");
            }
            string    command = "SELECT * FROM  registrationkey WHERE RegKey='" + POut.String(regKey) + "'";
            DataTable table   = db.GetTable(command);

            if (table.Rows.Count == 0)
            {
                throw new ApplicationException("Invalid registration key.");
            }
            RegistrationKey key = null;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                key = new RegistrationKey();
                key.RegistrationKeyNum = PIn.Int(table.Rows[i][0].ToString());
                key.PatNum             = PIn.Int(table.Rows[i][1].ToString());
                key.RegKey             = PIn.String(table.Rows[i][2].ToString());
                key.Note         = PIn.String(table.Rows[i][3].ToString());
                key.DateStarted  = PIn.Date(table.Rows[i][4].ToString());
                key.DateDisabled = PIn.Date(table.Rows[i][5].ToString());
                key.DateEnded    = PIn.Date(table.Rows[i][6].ToString());
                key.IsForeign    = PIn.Bool(table.Rows[i][7].ToString());
                //key.UsesServerVersion     =PIn.PBool(table.Rows[i][8].ToString());
                key.IsFreeVersion    = PIn.Bool(table.Rows[i][9].ToString());
                key.IsOnlyForTesting = PIn.Bool(table.Rows[i][10].ToString());
                //key.VotesAllotted         =PIn.PInt(table.Rows[i][11].ToString());
            }
            //if(key.DateDisabled.Year>1880){
            //	throw new ApplicationException("This key has been disabled.  Please call for assistance.");
            //}
            return(key);
        }
예제 #13
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        public static List <Disease> TableToList(DataTable table)
        {
            List <Disease> retVal = new List <Disease>();
            Disease        disease;

            foreach (DataRow row in table.Rows)
            {
                disease                   = new Disease();
                disease.DiseaseNum        = PIn.Long(row["DiseaseNum"].ToString());
                disease.PatNum            = PIn.Long(row["PatNum"].ToString());
                disease.DiseaseDefNum     = PIn.Long(row["DiseaseDefNum"].ToString());
                disease.PatNote           = PIn.String(row["PatNote"].ToString());
                disease.DateTStamp        = PIn.DateT(row["DateTStamp"].ToString());
                disease.ProbStatus        = (OpenDentBusiness.ProblemStatus)PIn.Int(row["ProbStatus"].ToString());
                disease.DateStart         = PIn.Date(row["DateStart"].ToString());
                disease.DateStop          = PIn.Date(row["DateStop"].ToString());
                disease.SnomedProblemType = PIn.String(row["SnomedProblemType"].ToString());
                disease.FunctionStatus    = (OpenDentBusiness.FunctionalStatus)PIn.Int(row["FunctionStatus"].ToString());
                retVal.Add(disease);
            }
            return(retVal);
        }
예제 #14
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        internal static List <PayPlanCharge> TableToList(DataTable table)
        {
            List <PayPlanCharge> retVal = new List <PayPlanCharge>();
            PayPlanCharge        payPlanCharge;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                payPlanCharge = new PayPlanCharge();
                payPlanCharge.PayPlanChargeNum = PIn.Long(table.Rows[i]["PayPlanChargeNum"].ToString());
                payPlanCharge.PayPlanNum       = PIn.Long(table.Rows[i]["PayPlanNum"].ToString());
                payPlanCharge.Guarantor        = PIn.Long(table.Rows[i]["Guarantor"].ToString());
                payPlanCharge.PatNum           = PIn.Long(table.Rows[i]["PatNum"].ToString());
                payPlanCharge.ChargeDate       = PIn.Date(table.Rows[i]["ChargeDate"].ToString());
                payPlanCharge.Principal        = PIn.Double(table.Rows[i]["Principal"].ToString());
                payPlanCharge.Interest         = PIn.Double(table.Rows[i]["Interest"].ToString());
                payPlanCharge.Note             = PIn.String(table.Rows[i]["Note"].ToString());
                payPlanCharge.ProvNum          = PIn.Long(table.Rows[i]["ProvNum"].ToString());
                payPlanCharge.ClinicNum        = PIn.Long(table.Rows[i]["ClinicNum"].ToString());
                retVal.Add(payPlanCharge);
            }
            return(retVal);
        }
예제 #15
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        internal static List <Equipment> TableToList(DataTable table)
        {
            List <Equipment> retVal = new List <Equipment>();
            Equipment        equipment;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                equipment = new Equipment();
                equipment.EquipmentNum  = PIn.Long(table.Rows[i]["EquipmentNum"].ToString());
                equipment.Description   = PIn.String(table.Rows[i]["Description"].ToString());
                equipment.SerialNumber  = PIn.String(table.Rows[i]["SerialNumber"].ToString());
                equipment.ModelYear     = PIn.String(table.Rows[i]["ModelYear"].ToString());
                equipment.DatePurchased = PIn.Date(table.Rows[i]["DatePurchased"].ToString());
                equipment.DateSold      = PIn.Date(table.Rows[i]["DateSold"].ToString());
                equipment.PurchaseCost  = PIn.Double(table.Rows[i]["PurchaseCost"].ToString());
                equipment.MarketValue   = PIn.Double(table.Rows[i]["MarketValue"].ToString());
                equipment.Location      = PIn.String(table.Rows[i]["Location"].ToString());
                equipment.DateEntry     = PIn.Date(table.Rows[i]["DateEntry"].ToString());
                retVal.Add(equipment);
            }
            return(retVal);
        }
예제 #16
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        public static List <Disease> TableToList(DataTable table)
        {
            List <Disease> retVal = new List <Disease>();
            Disease        disease;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                disease                   = new Disease();
                disease.DiseaseNum        = PIn.Long(table.Rows[i]["DiseaseNum"].ToString());
                disease.PatNum            = PIn.Long(table.Rows[i]["PatNum"].ToString());
                disease.DiseaseDefNum     = PIn.Long(table.Rows[i]["DiseaseDefNum"].ToString());
                disease.PatNote           = PIn.String(table.Rows[i]["PatNote"].ToString());
                disease.DateTStamp        = PIn.DateT(table.Rows[i]["DateTStamp"].ToString());
                disease.ProbStatus        = (ProblemStatus)PIn.Int(table.Rows[i]["ProbStatus"].ToString());
                disease.DateStart         = PIn.Date(table.Rows[i]["DateStart"].ToString());
                disease.DateStop          = PIn.Date(table.Rows[i]["DateStop"].ToString());
                disease.SnomedProblemType = PIn.String(table.Rows[i]["SnomedProblemType"].ToString());
                disease.FunctionStatus    = (FunctionalStatus)PIn.Int(table.Rows[i]["FunctionStatus"].ToString());
                retVal.Add(disease);
            }
            return(retVal);
        }
예제 #17
0
 private void butRight_Click(object sender, System.EventArgs e)
 {
     if (textDateFrom.errorProvider1.GetError(textDateFrom) != "" ||
         textDateTo.errorProvider1.GetError(textDateTo) != ""
         )
     {
         MessageBox.Show(Lan.g(this, "Please fix data entry errors first."));
         return;
     }
     _dateFrom = PIn.Date(textDateFrom.Text);
     _dateTo   = PIn.Date(textDateTo.Text);
     if (radioDaily.Checked || radioProvider.Checked)
     {
         textDateFrom.Text = _dateFrom.AddDays(1).ToShortDateString();
         textDateTo.Text   = _dateTo.AddDays(1).ToShortDateString();
     }
     else if (radioMonthly.Checked)
     {
         bool toLastDay = false;
         if (CultureInfo.CurrentCulture.Calendar.GetDaysInMonth(_dateTo.Year, _dateTo.Month) == _dateTo.Day)
         {
             toLastDay = true;
         }
         textDateFrom.Text = _dateFrom.AddMonths(1).ToShortDateString();
         textDateTo.Text   = _dateTo.AddMonths(1).ToShortDateString();
         _dateTo           = PIn.Date(textDateTo.Text);
         if (toLastDay)
         {
             textDateTo.Text = new DateTime(_dateTo.Year, _dateTo.Month,
                                            CultureInfo.CurrentCulture.Calendar.GetDaysInMonth(_dateTo.Year, _dateTo.Month))
                               .ToShortDateString();
         }
     }
     else              //annual
     {
         textDateFrom.Text = _dateFrom.AddYears(1).ToShortDateString();
         textDateTo.Text   = _dateTo.AddYears(1).ToShortDateString();
     }
 }
예제 #18
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        public static List <OrionProc> TableToList(DataTable table)
        {
            List <OrionProc> retVal = new List <OrionProc>();
            OrionProc        orionProc;

            foreach (DataRow row in table.Rows)
            {
                orionProc = new OrionProc();
                orionProc.OrionProcNum    = PIn.Long(row["OrionProcNum"].ToString());
                orionProc.ProcNum         = PIn.Long(row["ProcNum"].ToString());
                orionProc.DPC             = (OpenDentBusiness.OrionDPC)PIn.Int(row["DPC"].ToString());
                orionProc.DPCpost         = (OpenDentBusiness.OrionDPC)PIn.Int(row["DPCpost"].ToString());
                orionProc.DateScheduleBy  = PIn.Date(row["DateScheduleBy"].ToString());
                orionProc.DateStopClock   = PIn.Date(row["DateStopClock"].ToString());
                orionProc.Status2         = (OpenDentBusiness.OrionStatus)PIn.Int(row["Status2"].ToString());
                orionProc.IsOnCall        = PIn.Bool(row["IsOnCall"].ToString());
                orionProc.IsEffectiveComm = PIn.Bool(row["IsEffectiveComm"].ToString());
                orionProc.IsRepair        = PIn.Bool(row["IsRepair"].ToString());
                retVal.Add(orionProc);
            }
            return(retVal);
        }
예제 #19
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        public static List <Evaluation> TableToList(DataTable table)
        {
            List <Evaluation> retVal = new List <Evaluation>();
            Evaluation        evaluation;

            foreach (DataRow row in table.Rows)
            {
                evaluation = new Evaluation();
                evaluation.EvaluationNum       = PIn.Long(row["EvaluationNum"].ToString());
                evaluation.InstructNum         = PIn.Long(row["InstructNum"].ToString());
                evaluation.StudentNum          = PIn.Long(row["StudentNum"].ToString());
                evaluation.SchoolCourseNum     = PIn.Long(row["SchoolCourseNum"].ToString());
                evaluation.EvalTitle           = PIn.String(row["EvalTitle"].ToString());
                evaluation.DateEval            = PIn.Date(row["DateEval"].ToString());
                evaluation.GradingScaleNum     = PIn.Long(row["GradingScaleNum"].ToString());
                evaluation.OverallGradeShowing = PIn.String(row["OverallGradeShowing"].ToString());
                evaluation.OverallGradeNumber  = PIn.Float(row["OverallGradeNumber"].ToString());
                evaluation.Notes = PIn.String(row["Notes"].ToString());
                retVal.Add(evaluation);
            }
            return(retVal);
        }
예제 #20
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        internal static List <OrionProc> TableToList(DataTable table)
        {
            List <OrionProc> retVal = new List <OrionProc>();
            OrionProc        orionProc;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                orionProc = new OrionProc();
                orionProc.OrionProcNum    = PIn.Long(table.Rows[i]["OrionProcNum"].ToString());
                orionProc.ProcNum         = PIn.Long(table.Rows[i]["ProcNum"].ToString());
                orionProc.DPC             = (OrionDPC)PIn.Int(table.Rows[i]["DPC"].ToString());
                orionProc.DPCpost         = (OrionDPC)PIn.Int(table.Rows[i]["DPCpost"].ToString());
                orionProc.DateScheduleBy  = PIn.Date(table.Rows[i]["DateScheduleBy"].ToString());
                orionProc.DateStopClock   = PIn.Date(table.Rows[i]["DateStopClock"].ToString());
                orionProc.Status2         = (OrionStatus)PIn.Int(table.Rows[i]["Status2"].ToString());
                orionProc.IsOnCall        = PIn.Bool(table.Rows[i]["IsOnCall"].ToString());
                orionProc.IsEffectiveComm = PIn.Bool(table.Rows[i]["IsEffectiveComm"].ToString());
                orionProc.IsRepair        = PIn.Bool(table.Rows[i]["IsRepair"].ToString());
                retVal.Add(orionProc);
            }
            return(retVal);
        }
예제 #21
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        public static List <RepeatCharge> TableToList(DataTable table)
        {
            List <RepeatCharge> retVal = new List <RepeatCharge>();
            RepeatCharge        repeatCharge;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                repeatCharge = new RepeatCharge();
                repeatCharge.RepeatChargeNum = PIn.Long(table.Rows[i]["RepeatChargeNum"].ToString());
                repeatCharge.PatNum          = PIn.Long(table.Rows[i]["PatNum"].ToString());
                repeatCharge.ProcCode        = PIn.String(table.Rows[i]["ProcCode"].ToString());
                repeatCharge.ChargeAmt       = PIn.Double(table.Rows[i]["ChargeAmt"].ToString());
                repeatCharge.DateStart       = PIn.Date(table.Rows[i]["DateStart"].ToString());
                repeatCharge.DateStop        = PIn.Date(table.Rows[i]["DateStop"].ToString());
                repeatCharge.Note            = PIn.String(table.Rows[i]["Note"].ToString());
                repeatCharge.CopyNoteToProc  = PIn.Bool(table.Rows[i]["CopyNoteToProc"].ToString());
                repeatCharge.CreatesClaim    = PIn.Bool(table.Rows[i]["CreatesClaim"].ToString());
                repeatCharge.IsEnabled       = PIn.Bool(table.Rows[i]["IsEnabled"].ToString());
                retVal.Add(repeatCharge);
            }
            return(retVal);
        }
예제 #22
0
        ///<Summary>asOfDate is typically 12/31/...  </Summary>
        public static double NetIncomeThisYear(object asOfDateObj)
        {
            DateTime asOfDate;

            if (asOfDateObj.GetType() == typeof(string))
            {
                asOfDate = PIn.Date(asOfDateObj.ToString());
            }
            else if (asOfDateObj.GetType() == typeof(DateTime))
            {
                asOfDate = (DateTime)asOfDateObj;
            }
            else
            {
                return(0);
            }
            DateTime firstOfYear = new DateTime(asOfDate.Year, 1, 1);
            string   command     = "SELECT SUM(ROUND(CreditAmt,3)), SUM(ROUND(DebitAmt,3)), AcctType "
                                   + "FROM journalentry,account "
                                   + "WHERE journalentry.AccountNum=account.AccountNum "
                                   + "AND DateDisplayed >= " + POut.Date(firstOfYear)
                                   + " AND DateDisplayed <= " + POut.Date(asOfDate)
                                   + " GROUP BY AcctType";
            DataConnection dcon   = new DataConnection();
            DataTable      table  = dcon.GetTable(command);
            double         retVal = 0;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                if (table.Rows[i][2].ToString() == "3" ||          //income
                    table.Rows[i][2].ToString() == "4")                     //expense
                {
                    retVal += PIn.Double(table.Rows[i][0].ToString());      //add credit
                    retVal -= PIn.Double(table.Rows[i][1].ToString());      //subtract debit
                    //if it's an expense, we are subtracting (income-expense), but the signs cancel.
                }
            }
            return(retVal);
        }
예제 #23
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        internal static List <JournalEntry> TableToList(DataTable table)
        {
            List <JournalEntry> retVal = new List <JournalEntry>();
            JournalEntry        journalEntry;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                journalEntry = new JournalEntry();
                journalEntry.JournalEntryNum = PIn.Long(table.Rows[i]["JournalEntryNum"].ToString());
                journalEntry.TransactionNum  = PIn.Long(table.Rows[i]["TransactionNum"].ToString());
                journalEntry.AccountNum      = PIn.Long(table.Rows[i]["AccountNum"].ToString());
                journalEntry.DateDisplayed   = PIn.Date(table.Rows[i]["DateDisplayed"].ToString());
                journalEntry.DebitAmt        = PIn.Double(table.Rows[i]["DebitAmt"].ToString());
                journalEntry.CreditAmt       = PIn.Double(table.Rows[i]["CreditAmt"].ToString());
                journalEntry.Memo            = PIn.String(table.Rows[i]["Memo"].ToString());
                journalEntry.Splits          = PIn.String(table.Rows[i]["Splits"].ToString());
                journalEntry.CheckNumber     = PIn.String(table.Rows[i]["CheckNumber"].ToString());
                journalEntry.ReconcileNum    = PIn.Long(table.Rows[i]["ReconcileNum"].ToString());
                retVal.Add(journalEntry);
            }
            return(retVal);
        }
예제 #24
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        public static List <InsVerify> TableToList(DataTable table)
        {
            List <InsVerify> retVal = new List <InsVerify>();
            InsVerify        insVerify;

            foreach (DataRow row in table.Rows)
            {
                insVerify = new InsVerify();
                insVerify.InsVerifyNum     = PIn.Long(row["InsVerifyNum"].ToString());
                insVerify.DateLastVerified = PIn.Date(row["DateLastVerified"].ToString());
                insVerify.UserNum          = PIn.Long(row["UserNum"].ToString());
                insVerify.VerifyType       = (OpenDentBusiness.VerifyTypes)PIn.Int(row["VerifyType"].ToString());
                insVerify.FKey             = PIn.Long(row["FKey"].ToString());
                insVerify.DefNum           = PIn.Long(row["DefNum"].ToString());
                insVerify.DateLastAssigned = PIn.Date(row["DateLastAssigned"].ToString());
                insVerify.Note             = PIn.String(row["Note"].ToString());
                insVerify.DateTimeEntry    = PIn.DateT(row["DateTimeEntry"].ToString());
                insVerify.HoursAvailableForVerification = PIn.Double(row["HoursAvailableForVerification"].ToString());
                retVal.Add(insVerify);
            }
            return(retVal);
        }
예제 #25
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        public static List <VaccineObs> TableToList(DataTable table)
        {
            List <VaccineObs> retVal = new List <VaccineObs>();
            VaccineObs        vaccineObs;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                vaccineObs = new VaccineObs();
                vaccineObs.VaccineObsNum      = PIn.Long(table.Rows[i]["VaccineObsNum"].ToString());
                vaccineObs.VaccinePatNum      = PIn.Long(table.Rows[i]["VaccinePatNum"].ToString());
                vaccineObs.ValType            = (VaccineObsType)PIn.Int(table.Rows[i]["ValType"].ToString());
                vaccineObs.IdentifyingCode    = (VaccineObsIdentifier)PIn.Int(table.Rows[i]["IdentifyingCode"].ToString());
                vaccineObs.ValReported        = PIn.String(table.Rows[i]["ValReported"].ToString());
                vaccineObs.ValCodeSystem      = (VaccineObsValCodeSystem)PIn.Int(table.Rows[i]["ValCodeSystem"].ToString());
                vaccineObs.VaccineObsNumGroup = PIn.Long(table.Rows[i]["VaccineObsNumGroup"].ToString());
                vaccineObs.UcumCode           = PIn.String(table.Rows[i]["UcumCode"].ToString());
                vaccineObs.DateObs            = PIn.Date(table.Rows[i]["DateObs"].ToString());
                vaccineObs.MethodCode         = PIn.String(table.Rows[i]["MethodCode"].ToString());
                retVal.Add(vaccineObs);
            }
            return(retVal);
        }
예제 #26
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        public static List <ProcTP> TableToList(DataTable table)
        {
            List <ProcTP> retVal = new List <ProcTP>();
            ProcTP        procTP;

            foreach (DataRow row in table.Rows)
            {
                procTP                 = new ProcTP();
                procTP.ProcTPNum       = PIn.Long(row["ProcTPNum"].ToString());
                procTP.TreatPlanNum    = PIn.Long(row["TreatPlanNum"].ToString());
                procTP.PatNum          = PIn.Long(row["PatNum"].ToString());
                procTP.ProcNumOrig     = PIn.Long(row["ProcNumOrig"].ToString());
                procTP.ItemOrder       = PIn.Int(row["ItemOrder"].ToString());
                procTP.Priority        = PIn.Long(row["Priority"].ToString());
                procTP.ToothNumTP      = PIn.String(row["ToothNumTP"].ToString());
                procTP.Surf            = PIn.String(row["Surf"].ToString());
                procTP.ProcCode        = PIn.String(row["ProcCode"].ToString());
                procTP.Descript        = PIn.String(row["Descript"].ToString());
                procTP.FeeAmt          = PIn.Double(row["FeeAmt"].ToString());
                procTP.PriInsAmt       = PIn.Double(row["PriInsAmt"].ToString());
                procTP.SecInsAmt       = PIn.Double(row["SecInsAmt"].ToString());
                procTP.PatAmt          = PIn.Double(row["PatAmt"].ToString());
                procTP.Discount        = PIn.Double(row["Discount"].ToString());
                procTP.Prognosis       = PIn.String(row["Prognosis"].ToString());
                procTP.Dx              = PIn.String(row["Dx"].ToString());
                procTP.ProcAbbr        = PIn.String(row["ProcAbbr"].ToString());
                procTP.SecUserNumEntry = PIn.Long(row["SecUserNumEntry"].ToString());
                procTP.SecDateEntry    = PIn.Date(row["SecDateEntry"].ToString());
                procTP.SecDateTEdit    = PIn.DateT(row["SecDateTEdit"].ToString());
                procTP.FeeAllowed      = PIn.Double(row["FeeAllowed"].ToString());
                procTP.TaxAmt          = PIn.Double(row["TaxAmt"].ToString());
                procTP.ProvNum         = PIn.Long(row["ProvNum"].ToString());
                procTP.DateTP          = PIn.Date(row["DateTP"].ToString());
                procTP.ClinicNum       = PIn.Long(row["ClinicNum"].ToString());
                procTP.CatPercUCR      = PIn.Double(row["CatPercUCR"].ToString());
                retVal.Add(procTP);
            }
            return(retVal);
        }
예제 #27
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        public static List <VaccineObs> TableToList(DataTable table)
        {
            List <VaccineObs> retVal = new List <VaccineObs>();
            VaccineObs        vaccineObs;

            foreach (DataRow row in table.Rows)
            {
                vaccineObs = new VaccineObs();
                vaccineObs.VaccineObsNum      = PIn.Long(row["VaccineObsNum"].ToString());
                vaccineObs.VaccinePatNum      = PIn.Long(row["VaccinePatNum"].ToString());
                vaccineObs.ValType            = (OpenDentBusiness.VaccineObsType)PIn.Int(row["ValType"].ToString());
                vaccineObs.IdentifyingCode    = (OpenDentBusiness.VaccineObsIdentifier)PIn.Int(row["IdentifyingCode"].ToString());
                vaccineObs.ValReported        = PIn.String(row["ValReported"].ToString());
                vaccineObs.ValCodeSystem      = (OpenDentBusiness.VaccineObsValCodeSystem)PIn.Int(row["ValCodeSystem"].ToString());
                vaccineObs.VaccineObsNumGroup = PIn.Long(row["VaccineObsNumGroup"].ToString());
                vaccineObs.UcumCode           = PIn.String(row["UcumCode"].ToString());
                vaccineObs.DateObs            = PIn.Date(row["DateObs"].ToString());
                vaccineObs.MethodCode         = PIn.String(row["MethodCode"].ToString());
                retVal.Add(vaccineObs);
            }
            return(retVal);
        }
예제 #28
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        public static List <InsSub> TableToList(DataTable table)
        {
            List <InsSub> retVal = new List <InsSub>();
            InsSub        insSub;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                insSub               = new InsSub();
                insSub.InsSubNum     = PIn.Long(table.Rows[i]["InsSubNum"].ToString());
                insSub.PlanNum       = PIn.Long(table.Rows[i]["PlanNum"].ToString());
                insSub.Subscriber    = PIn.Long(table.Rows[i]["Subscriber"].ToString());
                insSub.DateEffective = PIn.Date(table.Rows[i]["DateEffective"].ToString());
                insSub.DateTerm      = PIn.Date(table.Rows[i]["DateTerm"].ToString());
                insSub.ReleaseInfo   = PIn.Bool(table.Rows[i]["ReleaseInfo"].ToString());
                insSub.AssignBen     = PIn.Bool(table.Rows[i]["AssignBen"].ToString());
                insSub.SubscriberID  = PIn.String(table.Rows[i]["SubscriberID"].ToString());
                insSub.BenefitNotes  = PIn.String(table.Rows[i]["BenefitNotes"].ToString());
                insSub.SubscNote     = PIn.String(table.Rows[i]["SubscNote"].ToString());
                retVal.Add(insSub);
            }
            return(retVal);
        }
예제 #29
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        internal static List <Signalod> TableToList(DataTable table)
        {
            List <Signalod> retVal = new List <Signalod>();
            Signalod        signalod;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                signalod             = new Signalod();
                signalod.SignalNum   = PIn.Long(table.Rows[i]["SignalNum"].ToString());
                signalod.FromUser    = PIn.String(table.Rows[i]["FromUser"].ToString());
                signalod.ITypes      = PIn.String(table.Rows[i]["ITypes"].ToString());
                signalod.DateViewing = PIn.Date(table.Rows[i]["DateViewing"].ToString());
                signalod.SigType     = (SignalType)PIn.Int(table.Rows[i]["SigType"].ToString());
                signalod.SigText     = PIn.String(table.Rows[i]["SigText"].ToString());
                signalod.SigDateTime = PIn.DateT(table.Rows[i]["SigDateTime"].ToString());
                signalod.ToUser      = PIn.String(table.Rows[i]["ToUser"].ToString());
                signalod.AckTime     = PIn.DateT(table.Rows[i]["AckTime"].ToString());
                signalod.TaskNum     = PIn.Long(table.Rows[i]["TaskNum"].ToString());
                retVal.Add(signalod);
            }
            return(retVal);
        }
예제 #30
0
        ///<summary>Converts a DataTable to a list of objects.</summary>
        internal static List <Recallm> TableToList(DataTable table)
        {
            List <Recallm> retVal = new List <Recallm>();
            Recallm        recallm;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                recallm                     = new Recallm();
                recallm.CustomerNum         = PIn.Long(table.Rows[i]["CustomerNum"].ToString());
                recallm.RecallNum           = PIn.Long(table.Rows[i]["RecallNum"].ToString());
                recallm.PatNum              = PIn.Long(table.Rows[i]["PatNum"].ToString());
                recallm.DateDue             = PIn.Date(table.Rows[i]["DateDue"].ToString());
                recallm.DatePrevious        = PIn.Date(table.Rows[i]["DatePrevious"].ToString());
                recallm.RecallStatus        = PIn.Long(table.Rows[i]["RecallStatus"].ToString());
                recallm.Note                = PIn.String(table.Rows[i]["Note"].ToString());
                recallm.IsDisabled          = PIn.Bool(table.Rows[i]["IsDisabled"].ToString());
                recallm.DisableUntilBalance = PIn.Double(table.Rows[i]["DisableUntilBalance"].ToString());
                recallm.DisableUntilDate    = PIn.Date(table.Rows[i]["DisableUntilDate"].ToString());
                retVal.Add(recallm);
            }
            return(retVal);
        }