///<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); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <LabPanel> TableToList(DataTable table) { List <LabPanel> retVal = new List <LabPanel>(); LabPanel labPanel; foreach (DataRow row in table.Rows) { labPanel = new LabPanel(); labPanel.LabPanelNum = PIn.Long(row["LabPanelNum"].ToString()); labPanel.PatNum = PIn.Long(row["PatNum"].ToString()); labPanel.RawMessage = PIn.String(row["RawMessage"].ToString()); labPanel.LabNameAddress = PIn.String(row["LabNameAddress"].ToString()); labPanel.DateTStamp = PIn.DateT(row["DateTStamp"].ToString()); labPanel.SpecimenCondition = PIn.String(row["SpecimenCondition"].ToString()); labPanel.SpecimenSource = PIn.String(row["SpecimenSource"].ToString()); labPanel.ServiceId = PIn.String(row["ServiceId"].ToString()); labPanel.ServiceName = PIn.String(row["ServiceName"].ToString()); labPanel.MedicalOrderNum = PIn.Long(row["MedicalOrderNum"].ToString()); retVal.Add(labPanel); } return(retVal); }
///<summary>Limits the number of statements and documents in the database for a single patient </summary> public static void LimitStatementmsPerPatient(List <long> patList, long customerNum, int limitPerPatient) { int upperlimit = 500 + limitPerPatient; // The figure 500 is somewhat arbitrary. string limitStr = ""; if (limitPerPatient > 0) { limitStr = "LIMIT " + limitPerPatient + "," + upperlimit; } else { return; } for (int i = 0; i < patList.Count; i++) { string command = "SELECT StatementNum FROM statementm WHERE CustomerNum = " + POut.Long(customerNum) + " AND PatNum = " + POut.Long(patList[i]) + " ORDER BY DateSent DESC, StatementNum DESC " + limitStr; DataTable table = Db.GetTable(command); if (table.Rows.Count > 0) { string strStatementNums = " AND ( "; for (int j = 0; j < table.Rows.Count; j++) { if (j > 0) { strStatementNums += "OR "; } strStatementNums += "StatementNum='" + PIn.Long(table.Rows[j]["StatementNum"].ToString()) + "' "; } strStatementNums += " )"; command = "DELETE FROM statementm WHERE CustomerNum = " + POut.Long(customerNum) + " AND PatNum = " + POut.Long(patList[i]) + strStatementNums; Db.NonQ(command); } } //Note: this statement does not work: error =This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery' //DELETE FROM statementm where StatementNum in (SELECT StatementNum FROM statementm WHERE CustomerNum=6566 AND //PatNum=7 ORDER BY DateSent DESC, StatementNum DESC LIMIT 5,100) }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <AlertItem> TableToList(DataTable table) { List <AlertItem> retVal = new List <AlertItem>(); AlertItem alertItem; foreach (DataRow row in table.Rows) { alertItem = new AlertItem(); alertItem.AlertItemNum = PIn.Long(row["AlertItemNum"].ToString()); alertItem.ClinicNum = PIn.Long(row["ClinicNum"].ToString()); alertItem.Description = PIn.String(row["Description"].ToString()); alertItem.Type = (OpenDentBusiness.AlertType)PIn.Int(row["Type"].ToString()); alertItem.Severity = (OpenDentBusiness.SeverityType)PIn.Int(row["Severity"].ToString()); alertItem.Actions = (OpenDentBusiness.ActionType)PIn.Int(row["Actions"].ToString()); alertItem.FormToOpen = (OpenDentBusiness.FormType)PIn.Int(row["FormToOpen"].ToString()); alertItem.FKey = PIn.Long(row["FKey"].ToString()); alertItem.ItemValue = PIn.String(row["ItemValue"].ToString()); alertItem.UserNum = PIn.Long(row["UserNum"].ToString()); retVal.Add(alertItem); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <ApptViewItem> TableToList(DataTable table) { List <ApptViewItem> retVal = new List <ApptViewItem>(); ApptViewItem apptViewItem; foreach (DataRow row in table.Rows) { apptViewItem = new ApptViewItem(); apptViewItem.ApptViewItemNum = PIn.Long(row["ApptViewItemNum"].ToString()); apptViewItem.ApptViewNum = PIn.Long(row["ApptViewNum"].ToString()); apptViewItem.OpNum = PIn.Long(row["OpNum"].ToString()); apptViewItem.ProvNum = PIn.Long(row["ProvNum"].ToString()); apptViewItem.ElementDesc = PIn.String(row["ElementDesc"].ToString()); apptViewItem.ElementOrder = PIn.Byte(row["ElementOrder"].ToString()); apptViewItem.ElementColor = Color.FromArgb(PIn.Int(row["ElementColor"].ToString())); apptViewItem.ElementAlignment = (OpenDentBusiness.ApptViewAlignment)PIn.Int(row["ElementAlignment"].ToString()); apptViewItem.ApptFieldDefNum = PIn.Long(row["ApptFieldDefNum"].ToString()); apptViewItem.PatFieldDefNum = PIn.Long(row["PatFieldDefNum"].ToString()); retVal.Add(apptViewItem); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <Appointment> TableToList(DataTable table) { List <Appointment> retVal = new List <Appointment>(); Appointment appointment; for (int i = 0; i < table.Rows.Count; i++) { appointment = new Appointment(); appointment.AptNum = PIn.Long(table.Rows[i]["AptNum"].ToString()); appointment.PatNum = PIn.Long(table.Rows[i]["PatNum"].ToString()); appointment.AptStatus = (ApptStatus)PIn.Int(table.Rows[i]["AptStatus"].ToString()); appointment.Pattern = PIn.String(table.Rows[i]["Pattern"].ToString()); appointment.Confirmed = PIn.Long(table.Rows[i]["Confirmed"].ToString()); appointment.TimeLocked = PIn.Bool(table.Rows[i]["TimeLocked"].ToString()); appointment.Op = PIn.Long(table.Rows[i]["Op"].ToString()); appointment.Note = PIn.String(table.Rows[i]["Note"].ToString()); appointment.ProvNum = PIn.Long(table.Rows[i]["ProvNum"].ToString()); appointment.ProvHyg = PIn.Long(table.Rows[i]["ProvHyg"].ToString()); appointment.AptDateTime = PIn.DateT(table.Rows[i]["AptDateTime"].ToString()); appointment.NextAptNum = PIn.Long(table.Rows[i]["NextAptNum"].ToString()); appointment.UnschedStatus = PIn.Long(table.Rows[i]["UnschedStatus"].ToString()); appointment.IsNewPatient = PIn.Bool(table.Rows[i]["IsNewPatient"].ToString()); appointment.ProcDescript = PIn.String(table.Rows[i]["ProcDescript"].ToString()); appointment.Assistant = PIn.Long(table.Rows[i]["Assistant"].ToString()); appointment.ClinicNum = PIn.Long(table.Rows[i]["ClinicNum"].ToString()); appointment.IsHygiene = PIn.Bool(table.Rows[i]["IsHygiene"].ToString()); appointment.DateTStamp = PIn.DateT(table.Rows[i]["DateTStamp"].ToString()); appointment.DateTimeArrived = PIn.DateT(table.Rows[i]["DateTimeArrived"].ToString()); appointment.DateTimeSeated = PIn.DateT(table.Rows[i]["DateTimeSeated"].ToString()); appointment.DateTimeDismissed = PIn.DateT(table.Rows[i]["DateTimeDismissed"].ToString()); appointment.InsPlan1 = PIn.Long(table.Rows[i]["InsPlan1"].ToString()); appointment.InsPlan2 = PIn.Long(table.Rows[i]["InsPlan2"].ToString()); appointment.DateTimeAskedToArrive = PIn.DateT(table.Rows[i]["DateTimeAskedToArrive"].ToString()); appointment.ProcsColored = PIn.String(table.Rows[i]["ProcsColored"].ToString()); appointment.ColorOverride = Color.FromArgb(PIn.Int(table.Rows[i]["ColorOverride"].ToString())); retVal.Add(appointment); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <MedLabFacility> TableToList(DataTable table) { List <MedLabFacility> retVal = new List <MedLabFacility>(); MedLabFacility medLabFacility; foreach (DataRow row in table.Rows) { medLabFacility = new MedLabFacility(); medLabFacility.MedLabFacilityNum = PIn.Long(row["MedLabFacilityNum"].ToString()); medLabFacility.FacilityName = PIn.String(row["FacilityName"].ToString()); medLabFacility.Address = PIn.String(row["Address"].ToString()); medLabFacility.City = PIn.String(row["City"].ToString()); medLabFacility.State = PIn.String(row["State"].ToString()); medLabFacility.Zip = PIn.String(row["Zip"].ToString()); medLabFacility.Phone = PIn.String(row["Phone"].ToString()); medLabFacility.DirectorTitle = PIn.String(row["DirectorTitle"].ToString()); medLabFacility.DirectorLName = PIn.String(row["DirectorLName"].ToString()); medLabFacility.DirectorFName = PIn.String(row["DirectorFName"].ToString()); retVal.Add(medLabFacility); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <TimeAdjust> TableToList(DataTable table) { List <TimeAdjust> retVal = new List <TimeAdjust>(); TimeAdjust timeAdjust; foreach (DataRow row in table.Rows) { timeAdjust = new TimeAdjust(); timeAdjust.TimeAdjustNum = PIn.Long(row["TimeAdjustNum"].ToString()); timeAdjust.EmployeeNum = PIn.Long(row["EmployeeNum"].ToString()); timeAdjust.TimeEntry = PIn.DateT(row["TimeEntry"].ToString()); timeAdjust.RegHours = PIn.TSpan(row["RegHours"].ToString()); timeAdjust.OTimeHours = PIn.TSpan(row["OTimeHours"].ToString()); timeAdjust.Note = PIn.String(row["Note"].ToString()); timeAdjust.IsAuto = PIn.Bool(row["IsAuto"].ToString()); timeAdjust.ClinicNum = PIn.Long(row["ClinicNum"].ToString()); timeAdjust.PtoDefNum = PIn.Long(row["PtoDefNum"].ToString()); timeAdjust.PtoHours = PIn.TSpan(row["PtoHours"].ToString()); retVal.Add(timeAdjust); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <ApptViewItem> TableToList(DataTable table) { List <ApptViewItem> retVal = new List <ApptViewItem>(); ApptViewItem apptViewItem; for (int i = 0; i < table.Rows.Count; i++) { apptViewItem = new ApptViewItem(); apptViewItem.ApptViewItemNum = PIn.Long(table.Rows[i]["ApptViewItemNum"].ToString()); apptViewItem.ApptViewNum = PIn.Long(table.Rows[i]["ApptViewNum"].ToString()); apptViewItem.OpNum = PIn.Long(table.Rows[i]["OpNum"].ToString()); apptViewItem.ProvNum = PIn.Long(table.Rows[i]["ProvNum"].ToString()); apptViewItem.ElementDesc = PIn.String(table.Rows[i]["ElementDesc"].ToString()); apptViewItem.ElementOrder = PIn.Byte(table.Rows[i]["ElementOrder"].ToString()); apptViewItem.ElementColor = Color.FromArgb(PIn.Int(table.Rows[i]["ElementColor"].ToString())); apptViewItem.ElementAlignment = (ApptViewAlignment)PIn.Int(table.Rows[i]["ElementAlignment"].ToString()); apptViewItem.ApptFieldDefNum = PIn.Long(table.Rows[i]["ApptFieldDefNum"].ToString()); apptViewItem.PatFieldDefNum = PIn.Long(table.Rows[i]["PatFieldDefNum"].ToString()); retVal.Add(apptViewItem); } return(retVal); }
///<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); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <LabResult> TableToList(DataTable table) { List <LabResult> retVal = new List <LabResult>(); LabResult labResult; foreach (DataRow row in table.Rows) { labResult = new LabResult(); labResult.LabResultNum = PIn.Long(row["LabResultNum"].ToString()); labResult.LabPanelNum = PIn.Long(row["LabPanelNum"].ToString()); labResult.DateTimeTest = PIn.DateT(row["DateTimeTest"].ToString()); labResult.TestName = PIn.String(row["TestName"].ToString()); labResult.DateTStamp = PIn.DateT(row["DateTStamp"].ToString()); labResult.TestID = PIn.String(row["TestID"].ToString()); labResult.ObsValue = PIn.String(row["ObsValue"].ToString()); labResult.ObsUnits = PIn.String(row["ObsUnits"].ToString()); labResult.ObsRange = PIn.String(row["ObsRange"].ToString()); labResult.AbnormalFlag = (OpenDentBusiness.LabAbnormalFlag)PIn.Int(row["AbnormalFlag"].ToString()); retVal.Add(labResult); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <EhrCode> TableToList(DataTable table) { List <EhrCode> retVal = new List <EhrCode>(); EhrCode ehrCode; foreach (DataRow row in table.Rows) { ehrCode = new EhrCode(); ehrCode.EhrCodeNum = PIn.Long(row["EhrCodeNum"].ToString()); ehrCode.MeasureIds = PIn.String(row["MeasureIds"].ToString()); ehrCode.ValueSetName = PIn.String(row["ValueSetName"].ToString()); ehrCode.ValueSetOID = PIn.String(row["ValueSetOID"].ToString()); ehrCode.QDMCategory = PIn.String(row["QDMCategory"].ToString()); ehrCode.CodeValue = PIn.String(row["CodeValue"].ToString()); ehrCode.Description = PIn.String(row["Description"].ToString()); ehrCode.CodeSystem = PIn.String(row["CodeSystem"].ToString()); ehrCode.CodeSystemOID = PIn.String(row["CodeSystemOID"].ToString()); ehrCode.IsInDb = PIn.Bool(row["IsInDb"].ToString()); retVal.Add(ehrCode); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <ChartView> TableToList(DataTable table) { List <ChartView> retVal = new List <ChartView>(); ChartView chartView; for (int i = 0; i < table.Rows.Count; i++) { chartView = new ChartView(); chartView.ChartViewNum = PIn.Long(table.Rows[i]["ChartViewNum"].ToString()); chartView.Description = PIn.String(table.Rows[i]["Description"].ToString()); chartView.ItemOrder = PIn.Int(table.Rows[i]["ItemOrder"].ToString()); chartView.ProcStatuses = (ChartViewProcStat)PIn.Int(table.Rows[i]["ProcStatuses"].ToString()); chartView.ObjectTypes = (ChartViewObjs)PIn.Int(table.Rows[i]["ObjectTypes"].ToString()); chartView.ShowProcNotes = PIn.Bool(table.Rows[i]["ShowProcNotes"].ToString()); chartView.IsAudit = PIn.Bool(table.Rows[i]["IsAudit"].ToString()); chartView.SelectedTeethOnly = PIn.Bool(table.Rows[i]["SelectedTeethOnly"].ToString()); chartView.OrionStatusFlags = (OrionStatus)PIn.Int(table.Rows[i]["OrionStatusFlags"].ToString()); chartView.DatesShowing = (ChartViewDates)PIn.Int(table.Rows[i]["DatesShowing"].ToString()); retVal.Add(chartView); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <Dunning> TableToList(DataTable table) { List <Dunning> retVal = new List <Dunning>(); Dunning dunning; foreach (DataRow row in table.Rows) { dunning = new Dunning(); dunning.DunningNum = PIn.Long(row["DunningNum"].ToString()); dunning.DunMessage = PIn.String(row["DunMessage"].ToString()); dunning.BillingType = PIn.Long(row["BillingType"].ToString()); dunning.AgeAccount = PIn.Byte(row["AgeAccount"].ToString()); dunning.InsIsPending = (OpenDentBusiness.YN)PIn.Int(row["InsIsPending"].ToString()); dunning.MessageBold = PIn.String(row["MessageBold"].ToString()); dunning.EmailSubject = PIn.String(row["EmailSubject"].ToString()); dunning.EmailBody = PIn.String(row["EmailBody"].ToString()); dunning.DaysInAdvance = PIn.Int(row["DaysInAdvance"].ToString()); dunning.ClinicNum = PIn.Long(row["ClinicNum"].ToString()); retVal.Add(dunning); } return(retVal); }
///<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); }
///<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); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <ApptView> TableToList(DataTable table) { List <ApptView> retVal = new List <ApptView>(); ApptView apptView; for (int i = 0; i < table.Rows.Count; i++) { apptView = new ApptView(); apptView.ApptViewNum = PIn.Long(table.Rows[i]["ApptViewNum"].ToString()); apptView.Description = PIn.String(table.Rows[i]["Description"].ToString()); apptView.ItemOrder = PIn.Int(table.Rows[i]["ItemOrder"].ToString()); apptView.RowsPerIncr = PIn.Byte(table.Rows[i]["RowsPerIncr"].ToString()); apptView.OnlyScheduledProvs = PIn.Bool(table.Rows[i]["OnlyScheduledProvs"].ToString()); apptView.OnlySchedBeforeTime = PIn.Time(table.Rows[i]["OnlySchedBeforeTime"].ToString()); apptView.OnlySchedAfterTime = PIn.Time(table.Rows[i]["OnlySchedAfterTime"].ToString()); apptView.StackBehavUR = (ApptViewStackBehavior)PIn.Int(table.Rows[i]["StackBehavUR"].ToString()); apptView.StackBehavLR = (ApptViewStackBehavior)PIn.Int(table.Rows[i]["StackBehavLR"].ToString()); apptView.ClinicNum = PIn.Long(table.Rows[i]["ClinicNum"].ToString()); retVal.Add(apptView); } return(retVal); }
///<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); }
///<summary>Converts a DataTable to a list of objects.</summary> public 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); }
///<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); }
///<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); }
///<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); }
///<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); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <Site> TableToList(DataTable table) { List <Site> retVal = new List <Site>(); Site site; foreach (DataRow row in table.Rows) { site = new Site(); site.SiteNum = PIn.Long(row["SiteNum"].ToString()); site.Description = PIn.String(row["Description"].ToString()); site.Note = PIn.String(row["Note"].ToString()); site.Address = PIn.String(row["Address"].ToString()); site.Address2 = PIn.String(row["Address2"].ToString()); site.City = PIn.String(row["City"].ToString()); site.State = PIn.String(row["State"].ToString()); site.Zip = PIn.String(row["Zip"].ToString()); site.ProvNum = PIn.Long(row["ProvNum"].ToString()); site.PlaceService = (OpenDentBusiness.PlaceOfService)PIn.Int(row["PlaceService"].ToString()); retVal.Add(site); } return(retVal); }
///<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); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <WikiPage> TableToList(DataTable table) { List <WikiPage> retVal = new List <WikiPage>(); WikiPage wikiPage; foreach (DataRow row in table.Rows) { wikiPage = new WikiPage(); wikiPage.WikiPageNum = PIn.Long(row["WikiPageNum"].ToString()); wikiPage.UserNum = PIn.Long(row["UserNum"].ToString()); wikiPage.PageTitle = PIn.String(row["PageTitle"].ToString()); wikiPage.KeyWords = PIn.String(row["KeyWords"].ToString()); wikiPage.PageContent = PIn.String(row["PageContent"].ToString()); wikiPage.DateTimeSaved = PIn.DateT(row["DateTimeSaved"].ToString()); wikiPage.IsDeleted = PIn.Bool(row["IsDeleted"].ToString()); wikiPage.IsDraft = PIn.Bool(row["IsDraft"].ToString()); wikiPage.IsLocked = PIn.Bool(row["IsLocked"].ToString()); wikiPage.PageContentPlainText = PIn.String(row["PageContentPlainText"].ToString()); retVal.Add(wikiPage); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List<Sheet> TableToList(DataTable table){ List<Sheet> retVal=new List<Sheet>(); Sheet sheet; for(int i=0;i<table.Rows.Count;i++) { sheet=new Sheet(); sheet.SheetNum = PIn.Long (table.Rows[i]["SheetNum"].ToString()); sheet.SheetType = (SheetTypeEnum)PIn.Int(table.Rows[i]["SheetType"].ToString()); sheet.PatNum = PIn.Long (table.Rows[i]["PatNum"].ToString()); sheet.DateTimeSheet = PIn.DateT (table.Rows[i]["DateTimeSheet"].ToString()); sheet.FontSize = PIn.Float (table.Rows[i]["FontSize"].ToString()); sheet.FontName = PIn.String(table.Rows[i]["FontName"].ToString()); sheet.Width = PIn.Int (table.Rows[i]["Width"].ToString()); sheet.Height = PIn.Int (table.Rows[i]["Height"].ToString()); sheet.IsLandscape = PIn.Bool (table.Rows[i]["IsLandscape"].ToString()); sheet.InternalNote = PIn.String(table.Rows[i]["InternalNote"].ToString()); sheet.Description = PIn.String(table.Rows[i]["Description"].ToString()); sheet.ShowInTerminal= PIn.Byte (table.Rows[i]["ShowInTerminal"].ToString()); sheet.IsWebForm = PIn.Bool (table.Rows[i]["IsWebForm"].ToString()); retVal.Add(sheet); } return retVal; }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <InsEditLog> TableToList(DataTable table) { List <InsEditLog> retVal = new List <InsEditLog>(); InsEditLog insEditLog; foreach (DataRow row in table.Rows) { insEditLog = new InsEditLog(); insEditLog.InsEditLogNum = PIn.Long(row["InsEditLogNum"].ToString()); insEditLog.FKey = PIn.Long(row["FKey"].ToString()); insEditLog.LogType = (OpenDentBusiness.InsEditLogType)PIn.Int(row["LogType"].ToString()); insEditLog.FieldName = PIn.String(row["FieldName"].ToString()); insEditLog.OldValue = PIn.String(row["OldValue"].ToString()); insEditLog.NewValue = PIn.String(row["NewValue"].ToString()); insEditLog.UserNum = PIn.Long(row["UserNum"].ToString()); insEditLog.DateTStamp = PIn.DateT(row["DateTStamp"].ToString()); insEditLog.ParentKey = PIn.Long(row["ParentKey"].ToString()); insEditLog.Description = PIn.String(row["Description"].ToString()); retVal.Add(insEditLog); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> internal static List <ProcedureCode> TableToList(DataTable table) { List <ProcedureCode> retVal = new List <ProcedureCode>(); ProcedureCode procedureCode; for (int i = 0; i < table.Rows.Count; i++) { procedureCode = new ProcedureCode(); procedureCode.CodeNum = PIn.Long(table.Rows[i]["CodeNum"].ToString()); procedureCode.ProcCode = PIn.String(table.Rows[i]["ProcCode"].ToString()); procedureCode.Descript = PIn.String(table.Rows[i]["Descript"].ToString()); procedureCode.AbbrDesc = PIn.String(table.Rows[i]["AbbrDesc"].ToString()); procedureCode.ProcTime = PIn.String(table.Rows[i]["ProcTime"].ToString()); procedureCode.ProcCat = PIn.Long(table.Rows[i]["ProcCat"].ToString()); procedureCode.TreatArea = (TreatmentArea)PIn.Int(table.Rows[i]["TreatArea"].ToString()); procedureCode.NoBillIns = PIn.Bool(table.Rows[i]["NoBillIns"].ToString()); procedureCode.IsProsth = PIn.Bool(table.Rows[i]["IsProsth"].ToString()); procedureCode.DefaultNote = PIn.String(table.Rows[i]["DefaultNote"].ToString()); procedureCode.IsHygiene = PIn.Bool(table.Rows[i]["IsHygiene"].ToString()); procedureCode.GTypeNum = PIn.Int(table.Rows[i]["GTypeNum"].ToString()); procedureCode.AlternateCode1 = PIn.String(table.Rows[i]["AlternateCode1"].ToString()); procedureCode.MedicalCode = PIn.String(table.Rows[i]["MedicalCode"].ToString()); procedureCode.IsTaxed = PIn.Bool(table.Rows[i]["IsTaxed"].ToString()); procedureCode.PaintType = (ToothPaintingType)PIn.Int(table.Rows[i]["PaintType"].ToString()); procedureCode.GraphicColor = Color.FromArgb(PIn.Int(table.Rows[i]["GraphicColor"].ToString())); procedureCode.LaymanTerm = PIn.String(table.Rows[i]["LaymanTerm"].ToString()); procedureCode.IsCanadianLab = PIn.Bool(table.Rows[i]["IsCanadianLab"].ToString()); procedureCode.PreExisting = PIn.Bool(table.Rows[i]["PreExisting"].ToString()); procedureCode.BaseUnits = PIn.Int(table.Rows[i]["BaseUnits"].ToString()); procedureCode.SubstitutionCode = PIn.String(table.Rows[i]["SubstitutionCode"].ToString()); procedureCode.SubstOnlyIf = (SubstitutionCondition)PIn.Int(table.Rows[i]["SubstOnlyIf"].ToString()); procedureCode.DateTStamp = PIn.DateT(table.Rows[i]["DateTStamp"].ToString()); procedureCode.IsMultiVisit = PIn.Bool(table.Rows[i]["IsMultiVisit"].ToString()); procedureCode.DrugNDC = PIn.String(table.Rows[i]["DrugNDC"].ToString()); procedureCode.RevenueCodeDefault = PIn.String(table.Rows[i]["RevenueCodeDefault"].ToString()); retVal.Add(procedureCode); } return(retVal); }
///<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); }