///<summary>Converts a DataTable to a list of objects.</summary> public static List <Recall> TableToList(DataTable table) { List <Recall> retVal = new List <Recall>(); Recall recall; for (int i = 0; i < table.Rows.Count; i++) { recall = new Recall(); recall.RecallNum = PIn.Long(table.Rows[i]["RecallNum"].ToString()); recall.PatNum = PIn.Long(table.Rows[i]["PatNum"].ToString()); recall.DateDueCalc = PIn.Date(table.Rows[i]["DateDueCalc"].ToString()); recall.DateDue = PIn.Date(table.Rows[i]["DateDue"].ToString()); recall.DatePrevious = PIn.Date(table.Rows[i]["DatePrevious"].ToString()); recall.RecallInterval = new Interval(PIn.Int(table.Rows[i]["RecallInterval"].ToString())); recall.RecallStatus = PIn.Long(table.Rows[i]["RecallStatus"].ToString()); recall.Note = PIn.String(table.Rows[i]["Note"].ToString()); recall.IsDisabled = PIn.Bool(table.Rows[i]["IsDisabled"].ToString()); recall.DateTStamp = PIn.DateT(table.Rows[i]["DateTStamp"].ToString()); recall.RecallTypeNum = PIn.Long(table.Rows[i]["RecallTypeNum"].ToString()); recall.DisableUntilBalance = PIn.Double(table.Rows[i]["DisableUntilBalance"].ToString()); recall.DisableUntilDate = PIn.Date(table.Rows[i]["DisableUntilDate"].ToString()); recall.DateScheduled = PIn.Date(table.Rows[i]["DateScheduled"].ToString()); retVal.Add(recall); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <Equipment> TableToList(DataTable table) { List <Equipment> retVal = new List <Equipment>(); Equipment equipment; foreach (DataRow row in table.Rows) { equipment = new Equipment(); equipment.EquipmentNum = PIn.Long(row["EquipmentNum"].ToString()); equipment.Description = PIn.String(row["Description"].ToString()); equipment.SerialNumber = PIn.String(row["SerialNumber"].ToString()); equipment.ModelYear = PIn.String(row["ModelYear"].ToString()); equipment.DatePurchased = PIn.Date(row["DatePurchased"].ToString()); equipment.DateSold = PIn.Date(row["DateSold"].ToString()); equipment.PurchaseCost = PIn.Double(row["PurchaseCost"].ToString()); equipment.MarketValue = PIn.Double(row["MarketValue"].ToString()); equipment.Location = PIn.String(row["Location"].ToString()); equipment.DateEntry = PIn.Date(row["DateEntry"].ToString()); equipment.ProvNumCheckedOut = PIn.Long(row["ProvNumCheckedOut"].ToString()); equipment.DateCheckedOut = PIn.Date(row["DateCheckedOut"].ToString()); equipment.DateExpectedBack = PIn.Date(row["DateExpectedBack"].ToString()); equipment.DispenseNote = PIn.String(row["DispenseNote"].ToString()); equipment.Status = PIn.String(row["Status"].ToString()); retVal.Add(equipment); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <ClaimPayment> TableToList(DataTable table) { List <ClaimPayment> retVal = new List <ClaimPayment>(); ClaimPayment claimPayment; foreach (DataRow row in table.Rows) { claimPayment = new ClaimPayment(); claimPayment.ClaimPaymentNum = PIn.Long(row["ClaimPaymentNum"].ToString()); claimPayment.CheckDate = PIn.Date(row["CheckDate"].ToString()); claimPayment.CheckAmt = PIn.Double(row["CheckAmt"].ToString()); claimPayment.CheckNum = PIn.String(row["CheckNum"].ToString()); claimPayment.BankBranch = PIn.String(row["BankBranch"].ToString()); claimPayment.Note = PIn.String(row["Note"].ToString()); claimPayment.ClinicNum = PIn.Long(row["ClinicNum"].ToString()); claimPayment.DepositNum = PIn.Long(row["DepositNum"].ToString()); claimPayment.CarrierName = PIn.String(row["CarrierName"].ToString()); claimPayment.DateIssued = PIn.Date(row["DateIssued"].ToString()); claimPayment.IsPartial = PIn.Bool(row["IsPartial"].ToString()); claimPayment.PayType = PIn.Long(row["PayType"].ToString()); claimPayment.SecUserNumEntry = PIn.Long(row["SecUserNumEntry"].ToString()); claimPayment.SecDateEntry = PIn.Date(row["SecDateEntry"].ToString()); claimPayment.SecDateTEdit = PIn.DateT(row["SecDateTEdit"].ToString()); claimPayment.PayGroup = PIn.Long(row["PayGroup"].ToString()); retVal.Add(claimPayment); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <OrthoCase> TableToList(DataTable table) { List <OrthoCase> retVal = new List <OrthoCase>(); OrthoCase orthoCase; foreach (DataRow row in table.Rows) { orthoCase = new OrthoCase(); orthoCase.OrthoCaseNum = PIn.Long(row["OrthoCaseNum"].ToString()); orthoCase.PatNum = PIn.Long(row["PatNum"].ToString()); orthoCase.ProvNum = PIn.Long(row["ProvNum"].ToString()); orthoCase.ClinicNum = PIn.Long(row["ClinicNum"].ToString()); orthoCase.Fee = PIn.Double(row["Fee"].ToString()); orthoCase.FeeInsPrimary = PIn.Double(row["FeeInsPrimary"].ToString()); orthoCase.FeePat = PIn.Double(row["FeePat"].ToString()); orthoCase.BandingDate = PIn.Date(row["BandingDate"].ToString()); orthoCase.DebondDate = PIn.Date(row["DebondDate"].ToString()); orthoCase.DebondDateExpected = PIn.Date(row["DebondDateExpected"].ToString()); orthoCase.IsTransfer = PIn.Bool(row["IsTransfer"].ToString()); orthoCase.OrthoType = PIn.Long(row["OrthoType"].ToString()); orthoCase.SecDateTEntry = PIn.DateT(row["SecDateTEntry"].ToString()); orthoCase.SecUserNumEntry = PIn.Long(row["SecUserNumEntry"].ToString()); orthoCase.SecDateTEdit = PIn.DateT(row["SecDateTEdit"].ToString()); orthoCase.IsActive = PIn.Bool(row["IsActive"].ToString()); orthoCase.FeeInsSecondary = PIn.Double(row["FeeInsSecondary"].ToString()); retVal.Add(orthoCase); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <CreditCard> TableToList(DataTable table) { List <CreditCard> retVal = new List <CreditCard>(); CreditCard creditCard; foreach (DataRow row in table.Rows) { creditCard = new CreditCard(); creditCard.CreditCardNum = PIn.Long(row["CreditCardNum"].ToString()); creditCard.PatNum = PIn.Long(row["PatNum"].ToString()); creditCard.Address = PIn.String(row["Address"].ToString()); creditCard.Zip = PIn.String(row["Zip"].ToString()); creditCard.XChargeToken = PIn.String(row["XChargeToken"].ToString()); creditCard.CCNumberMasked = PIn.String(row["CCNumberMasked"].ToString()); creditCard.CCExpiration = PIn.Date(row["CCExpiration"].ToString()); creditCard.ItemOrder = PIn.Int(row["ItemOrder"].ToString()); creditCard.ChargeAmt = PIn.Double(row["ChargeAmt"].ToString()); creditCard.DateStart = PIn.Date(row["DateStart"].ToString()); creditCard.DateStop = PIn.Date(row["DateStop"].ToString()); creditCard.Note = PIn.String(row["Note"].ToString()); creditCard.PayPlanNum = PIn.Long(row["PayPlanNum"].ToString()); creditCard.PayConnectToken = PIn.String(row["PayConnectToken"].ToString()); creditCard.PayConnectTokenExp = PIn.Date(row["PayConnectTokenExp"].ToString()); creditCard.Procedures = PIn.String(row["Procedures"].ToString()); creditCard.CCSource = (OpenDentBusiness.CreditCardSource)PIn.Int(row["CCSource"].ToString()); creditCard.ClinicNum = PIn.Long(row["ClinicNum"].ToString()); creditCard.ExcludeProcSync = PIn.Bool(row["ExcludeProcSync"].ToString()); creditCard.PaySimpleToken = PIn.String(row["PaySimpleToken"].ToString()); retVal.Add(creditCard); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <RxPat> TableToList(DataTable table) { List <RxPat> retVal = new List <RxPat>(); RxPat rxPat; foreach (DataRow row in table.Rows) { rxPat = new RxPat(); rxPat.RxNum = PIn.Long(row["RxNum"].ToString()); rxPat.PatNum = PIn.Long(row["PatNum"].ToString()); rxPat.RxDate = PIn.Date(row["RxDate"].ToString()); rxPat.Drug = PIn.String(row["Drug"].ToString()); rxPat.Sig = PIn.String(row["Sig"].ToString()); rxPat.Disp = PIn.String(row["Disp"].ToString()); rxPat.Refills = PIn.String(row["Refills"].ToString()); rxPat.ProvNum = PIn.Long(row["ProvNum"].ToString()); rxPat.Notes = PIn.String(row["Notes"].ToString()); rxPat.PharmacyNum = PIn.Long(row["PharmacyNum"].ToString()); rxPat.IsControlled = PIn.Bool(row["IsControlled"].ToString()); rxPat.DateTStamp = PIn.DateT(row["DateTStamp"].ToString()); rxPat.SendStatus = (OpenDentBusiness.RxSendStatus)PIn.Int(row["SendStatus"].ToString()); rxPat.RxCui = PIn.Long(row["RxCui"].ToString()); rxPat.DosageCode = PIn.String(row["DosageCode"].ToString()); rxPat.ErxGuid = PIn.String(row["ErxGuid"].ToString()); rxPat.IsErxOld = PIn.Bool(row["IsErxOld"].ToString()); rxPat.ErxPharmacyInfo = PIn.String(row["ErxPharmacyInfo"].ToString()); rxPat.IsProcRequired = PIn.Bool(row["IsProcRequired"].ToString()); rxPat.ProcNum = PIn.Long(row["ProcNum"].ToString()); rxPat.DaysOfSupply = PIn.Double(row["DaysOfSupply"].ToString()); rxPat.PatientInstruction = PIn.String(row["PatientInstruction"].ToString()); rxPat.ClinicNum = PIn.Long(row["ClinicNum"].ToString()); retVal.Add(rxPat); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> internal static List <LabCase> TableToList(DataTable table) { List <LabCase> retVal = new List <LabCase>(); LabCase labCase; for (int i = 0; i < table.Rows.Count; i++) { labCase = new LabCase(); labCase.LabCaseNum = PIn.Long(table.Rows[i]["LabCaseNum"].ToString()); labCase.PatNum = PIn.Long(table.Rows[i]["PatNum"].ToString()); labCase.LaboratoryNum = PIn.Long(table.Rows[i]["LaboratoryNum"].ToString()); labCase.AptNum = PIn.Long(table.Rows[i]["AptNum"].ToString()); labCase.PlannedAptNum = PIn.Long(table.Rows[i]["PlannedAptNum"].ToString()); labCase.DateTimeDue = PIn.DateT(table.Rows[i]["DateTimeDue"].ToString()); labCase.DateTimeCreated = PIn.DateT(table.Rows[i]["DateTimeCreated"].ToString()); labCase.DateTimeSent = PIn.DateT(table.Rows[i]["DateTimeSent"].ToString()); labCase.DateTimeRecd = PIn.DateT(table.Rows[i]["DateTimeRecd"].ToString()); labCase.DateTimeChecked = PIn.DateT(table.Rows[i]["DateTimeChecked"].ToString()); labCase.ProvNum = PIn.Long(table.Rows[i]["ProvNum"].ToString()); labCase.Instructions = PIn.String(table.Rows[i]["Instructions"].ToString()); labCase.LabFee = PIn.Double(table.Rows[i]["LabFee"].ToString()); retVal.Add(labCase); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <Benefit> TableToList(DataTable table) { List <Benefit> retVal = new List <Benefit>(); Benefit benefit; foreach (DataRow row in table.Rows) { benefit = new Benefit(); benefit.BenefitNum = PIn.Long(row["BenefitNum"].ToString()); benefit.PlanNum = PIn.Long(row["PlanNum"].ToString()); benefit.PatPlanNum = PIn.Long(row["PatPlanNum"].ToString()); benefit.CovCatNum = PIn.Long(row["CovCatNum"].ToString()); benefit.BenefitType = (OpenDentBusiness.InsBenefitType)PIn.Int(row["BenefitType"].ToString()); benefit.Percent = PIn.Int(row["Percent"].ToString()); benefit.MonetaryAmt = PIn.Double(row["MonetaryAmt"].ToString()); benefit.TimePeriod = (OpenDentBusiness.BenefitTimePeriod)PIn.Int(row["TimePeriod"].ToString()); benefit.QuantityQualifier = (OpenDentBusiness.BenefitQuantity)PIn.Int(row["QuantityQualifier"].ToString()); benefit.Quantity = PIn.Byte(row["Quantity"].ToString()); benefit.CodeNum = PIn.Long(row["CodeNum"].ToString()); benefit.CoverageLevel = (OpenDentBusiness.BenefitCoverageLevel)PIn.Int(row["CoverageLevel"].ToString()); benefit.SecDateTEntry = PIn.DateT(row["SecDateTEntry"].ToString()); benefit.SecDateTEdit = PIn.DateT(row["SecDateTEdit"].ToString()); retVal.Add(benefit); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <Adjustment> TableToList(DataTable table) { List <Adjustment> retVal = new List <Adjustment>(); Adjustment adjustment; foreach (DataRow row in table.Rows) { adjustment = new Adjustment(); adjustment.AdjNum = PIn.Long(row["AdjNum"].ToString()); adjustment.AdjDate = PIn.Date(row["AdjDate"].ToString()); adjustment.AdjAmt = PIn.Double(row["AdjAmt"].ToString()); adjustment.PatNum = PIn.Long(row["PatNum"].ToString()); adjustment.AdjType = PIn.Long(row["AdjType"].ToString()); adjustment.ProvNum = PIn.Long(row["ProvNum"].ToString()); adjustment.AdjNote = PIn.String(row["AdjNote"].ToString()); adjustment.ProcDate = PIn.Date(row["ProcDate"].ToString()); adjustment.ProcNum = PIn.Long(row["ProcNum"].ToString()); adjustment.DateEntry = PIn.Date(row["DateEntry"].ToString()); adjustment.ClinicNum = PIn.Long(row["ClinicNum"].ToString()); adjustment.StatementNum = PIn.Long(row["StatementNum"].ToString()); adjustment.SecUserNumEntry = PIn.Long(row["SecUserNumEntry"].ToString()); adjustment.SecDateTEdit = PIn.DateT(row["SecDateTEdit"].ToString()); adjustment.TaxTransID = PIn.Long(row["TaxTransID"].ToString()); retVal.Add(adjustment); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> internal static List <ProcTP> TableToList(DataTable table) { List <ProcTP> retVal = new List <ProcTP>(); ProcTP procTP; for (int i = 0; i < table.Rows.Count; i++) { procTP = new ProcTP(); procTP.ProcTPNum = PIn.Long(table.Rows[i]["ProcTPNum"].ToString()); procTP.TreatPlanNum = PIn.Long(table.Rows[i]["TreatPlanNum"].ToString()); procTP.PatNum = PIn.Long(table.Rows[i]["PatNum"].ToString()); procTP.ProcNumOrig = PIn.Long(table.Rows[i]["ProcNumOrig"].ToString()); procTP.ItemOrder = PIn.Int(table.Rows[i]["ItemOrder"].ToString()); procTP.Priority = PIn.Long(table.Rows[i]["Priority"].ToString()); procTP.ToothNumTP = PIn.String(table.Rows[i]["ToothNumTP"].ToString()); procTP.Surf = PIn.String(table.Rows[i]["Surf"].ToString()); procTP.ProcCode = PIn.String(table.Rows[i]["ProcCode"].ToString()); procTP.Descript = PIn.String(table.Rows[i]["Descript"].ToString()); procTP.FeeAmt = PIn.Double(table.Rows[i]["FeeAmt"].ToString()); procTP.PriInsAmt = PIn.Double(table.Rows[i]["PriInsAmt"].ToString()); procTP.SecInsAmt = PIn.Double(table.Rows[i]["SecInsAmt"].ToString()); procTP.PatAmt = PIn.Double(table.Rows[i]["PatAmt"].ToString()); procTP.Discount = PIn.Double(table.Rows[i]["Discount"].ToString()); procTP.Prognosis = PIn.String(table.Rows[i]["Prognosis"].ToString()); procTP.Dx = PIn.String(table.Rows[i]["Dx"].ToString()); retVal.Add(procTP); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <LabCase> TableToList(DataTable table) { List <LabCase> retVal = new List <LabCase>(); LabCase labCase; foreach (DataRow row in table.Rows) { labCase = new LabCase(); labCase.LabCaseNum = PIn.Long(row["LabCaseNum"].ToString()); labCase.PatNum = PIn.Long(row["PatNum"].ToString()); labCase.LaboratoryNum = PIn.Long(row["LaboratoryNum"].ToString()); labCase.AptNum = PIn.Long(row["AptNum"].ToString()); labCase.PlannedAptNum = PIn.Long(row["PlannedAptNum"].ToString()); labCase.DateTimeDue = PIn.DateT(row["DateTimeDue"].ToString()); labCase.DateTimeCreated = PIn.DateT(row["DateTimeCreated"].ToString()); labCase.DateTimeSent = PIn.DateT(row["DateTimeSent"].ToString()); labCase.DateTimeRecd = PIn.DateT(row["DateTimeRecd"].ToString()); labCase.DateTimeChecked = PIn.DateT(row["DateTimeChecked"].ToString()); labCase.ProvNum = PIn.Long(row["ProvNum"].ToString()); labCase.Instructions = PIn.String(row["Instructions"].ToString()); labCase.LabFee = PIn.Double(row["LabFee"].ToString()); labCase.DateTStamp = PIn.DateT(row["DateTStamp"].ToString()); retVal.Add(labCase); } 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()); retVal.Add(procTP); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> internal static List <Payment> TableToList(DataTable table) { List <Payment> retVal = new List <Payment>(); Payment payment; for (int i = 0; i < table.Rows.Count; i++) { payment = new Payment(); payment.PayNum = PIn.Long(table.Rows[i]["PayNum"].ToString()); payment.PayType = PIn.Long(table.Rows[i]["PayType"].ToString()); payment.PayDate = PIn.Date(table.Rows[i]["PayDate"].ToString()); payment.PayAmt = PIn.Double(table.Rows[i]["PayAmt"].ToString()); payment.CheckNum = PIn.String(table.Rows[i]["CheckNum"].ToString()); payment.BankBranch = PIn.String(table.Rows[i]["BankBranch"].ToString()); payment.PayNote = PIn.String(table.Rows[i]["PayNote"].ToString()); payment.IsSplit = PIn.Bool(table.Rows[i]["IsSplit"].ToString()); payment.PatNum = PIn.Long(table.Rows[i]["PatNum"].ToString()); payment.ClinicNum = PIn.Long(table.Rows[i]["ClinicNum"].ToString()); payment.DateEntry = PIn.Date(table.Rows[i]["DateEntry"].ToString()); payment.DepositNum = PIn.Long(table.Rows[i]["DepositNum"].ToString()); payment.Receipt = PIn.String(table.Rows[i]["Receipt"].ToString()); payment.IsRecurringCC = PIn.Bool(table.Rows[i]["IsRecurringCC"].ToString()); retVal.Add(payment); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <PayPlanCharge> TableToList(DataTable table) { List <PayPlanCharge> retVal = new List <PayPlanCharge>(); PayPlanCharge payPlanCharge; foreach (DataRow row in table.Rows) { payPlanCharge = new PayPlanCharge(); payPlanCharge.PayPlanChargeNum = PIn.Long(row["PayPlanChargeNum"].ToString()); payPlanCharge.PayPlanNum = PIn.Long(row["PayPlanNum"].ToString()); payPlanCharge.Guarantor = PIn.Long(row["Guarantor"].ToString()); payPlanCharge.PatNum = PIn.Long(row["PatNum"].ToString()); payPlanCharge.ChargeDate = PIn.Date(row["ChargeDate"].ToString()); payPlanCharge.Principal = PIn.Double(row["Principal"].ToString()); payPlanCharge.Interest = PIn.Double(row["Interest"].ToString()); payPlanCharge.Note = PIn.String(row["Note"].ToString()); payPlanCharge.ProvNum = PIn.Long(row["ProvNum"].ToString()); payPlanCharge.ClinicNum = PIn.Long(row["ClinicNum"].ToString()); payPlanCharge.ChargeType = (OpenDentBusiness.PayPlanChargeType)PIn.Int(row["ChargeType"].ToString()); payPlanCharge.ProcNum = PIn.Long(row["ProcNum"].ToString()); payPlanCharge.SecDateTEntry = PIn.DateT(row["SecDateTEntry"].ToString()); payPlanCharge.SecDateTEdit = PIn.DateT(row["SecDateTEdit"].ToString()); payPlanCharge.StatementNum = PIn.Long(row["StatementNum"].ToString()); retVal.Add(payPlanCharge); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <Recall> TableToList(DataTable table) { List <Recall> retVal = new List <Recall>(); Recall recall; foreach (DataRow row in table.Rows) { recall = new Recall(); recall.RecallNum = PIn.Long(row["RecallNum"].ToString()); recall.PatNum = PIn.Long(row["PatNum"].ToString()); recall.DateDueCalc = PIn.Date(row["DateDueCalc"].ToString()); recall.DateDue = PIn.Date(row["DateDue"].ToString()); recall.DatePrevious = PIn.Date(row["DatePrevious"].ToString()); recall.RecallInterval = new Interval(PIn.Int(row["RecallInterval"].ToString())); recall.RecallStatus = PIn.Long(row["RecallStatus"].ToString()); recall.Note = PIn.String(row["Note"].ToString()); recall.IsDisabled = PIn.Bool(row["IsDisabled"].ToString()); recall.DateTStamp = PIn.DateT(row["DateTStamp"].ToString()); recall.RecallTypeNum = PIn.Long(row["RecallTypeNum"].ToString()); recall.DisableUntilBalance = PIn.Double(row["DisableUntilBalance"].ToString()); recall.DisableUntilDate = PIn.Date(row["DisableUntilDate"].ToString()); recall.DateScheduled = PIn.Date(row["DateScheduled"].ToString()); recall.Priority = (OpenDentBusiness.RecallPriority)PIn.Int(row["Priority"].ToString()); retVal.Add(recall); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <InsVerifyHist> TableToList(DataTable table) { List <InsVerifyHist> retVal = new List <InsVerifyHist>(); InsVerifyHist insVerifyHist; foreach (DataRow row in table.Rows) { insVerifyHist = new InsVerifyHist(); insVerifyHist.InsVerifyHistNum = PIn.Long(row["InsVerifyHistNum"].ToString()); insVerifyHist.VerifyUserNum = PIn.Long(row["VerifyUserNum"].ToString()); insVerifyHist.InsVerifyNum = PIn.Long(row["InsVerifyNum"].ToString()); insVerifyHist.DateLastVerified = PIn.Date(row["DateLastVerified"].ToString()); insVerifyHist.UserNum = PIn.Long(row["UserNum"].ToString()); insVerifyHist.VerifyType = (OpenDentBusiness.VerifyTypes)PIn.Int(row["VerifyType"].ToString()); insVerifyHist.FKey = PIn.Long(row["FKey"].ToString()); insVerifyHist.DefNum = PIn.Long(row["DefNum"].ToString()); insVerifyHist.DateLastAssigned = PIn.Date(row["DateLastAssigned"].ToString()); insVerifyHist.Note = PIn.String(row["Note"].ToString()); insVerifyHist.DateTimeEntry = PIn.DateT(row["DateTimeEntry"].ToString()); insVerifyHist.HoursAvailableForVerification = PIn.Double(row["HoursAvailableForVerification"].ToString()); insVerifyHist.SecDateTEdit = PIn.DateT(row["SecDateTEdit"].ToString()); retVal.Add(insVerifyHist); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <PaySplit> TableToList(DataTable table) { List <PaySplit> retVal = new List <PaySplit>(); PaySplit paySplit; for (int i = 0; i < table.Rows.Count; i++) { paySplit = new PaySplit(); paySplit.SplitNum = PIn.Long(table.Rows[i]["SplitNum"].ToString()); paySplit.SplitAmt = PIn.Double(table.Rows[i]["SplitAmt"].ToString()); paySplit.PatNum = PIn.Long(table.Rows[i]["PatNum"].ToString()); paySplit.ProcDate = PIn.Date(table.Rows[i]["ProcDate"].ToString()); paySplit.PayNum = PIn.Long(table.Rows[i]["PayNum"].ToString()); paySplit.IsDiscount = PIn.Bool(table.Rows[i]["IsDiscount"].ToString()); paySplit.DiscountType = PIn.Byte(table.Rows[i]["DiscountType"].ToString()); paySplit.ProvNum = PIn.Long(table.Rows[i]["ProvNum"].ToString()); paySplit.PayPlanNum = PIn.Long(table.Rows[i]["PayPlanNum"].ToString()); paySplit.DatePay = PIn.Date(table.Rows[i]["DatePay"].ToString()); paySplit.ProcNum = PIn.Long(table.Rows[i]["ProcNum"].ToString()); paySplit.DateEntry = PIn.Date(table.Rows[i]["DateEntry"].ToString()); paySplit.UnearnedType = PIn.Long(table.Rows[i]["UnearnedType"].ToString()); paySplit.ClinicNum = PIn.Long(table.Rows[i]["ClinicNum"].ToString()); retVal.Add(paySplit); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <TsiTransLog> TableToList(DataTable table) { List <TsiTransLog> retVal = new List <TsiTransLog>(); TsiTransLog tsiTransLog; foreach (DataRow row in table.Rows) { tsiTransLog = new TsiTransLog(); tsiTransLog.TsiTransLogNum = PIn.Long(row["TsiTransLogNum"].ToString()); tsiTransLog.PatNum = PIn.Long(row["PatNum"].ToString()); tsiTransLog.UserNum = PIn.Long(row["UserNum"].ToString()); tsiTransLog.TransType = (OpenDentBusiness.TsiTransType)PIn.Int(row["TransType"].ToString()); tsiTransLog.TransDateTime = PIn.DateT(row["TransDateTime"].ToString()); tsiTransLog.DemandType = (OpenDentBusiness.TsiDemandType)PIn.Int(row["DemandType"].ToString()); tsiTransLog.ServiceCode = (OpenDentBusiness.TsiServiceCode)PIn.Int(row["ServiceCode"].ToString()); tsiTransLog.ClientId = PIn.String(row["ClientId"].ToString()); tsiTransLog.TransAmt = PIn.Double(row["TransAmt"].ToString()); tsiTransLog.AccountBalance = PIn.Double(row["AccountBalance"].ToString()); tsiTransLog.FKeyType = (OpenDentBusiness.TsiFKeyType)PIn.Int(row["FKeyType"].ToString()); tsiTransLog.FKey = PIn.Long(row["FKey"].ToString()); tsiTransLog.RawMsgText = PIn.String(row["RawMsgText"].ToString()); tsiTransLog.TransJson = PIn.String(row["TransJson"].ToString()); retVal.Add(tsiTransLog); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <CreditCard> TableToList(DataTable table) { List <CreditCard> retVal = new List <CreditCard>(); CreditCard creditCard; for (int i = 0; i < table.Rows.Count; i++) { creditCard = new CreditCard(); creditCard.CreditCardNum = PIn.Long(table.Rows[i]["CreditCardNum"].ToString()); creditCard.PatNum = PIn.Long(table.Rows[i]["PatNum"].ToString()); creditCard.Address = PIn.String(table.Rows[i]["Address"].ToString()); creditCard.Zip = PIn.String(table.Rows[i]["Zip"].ToString()); creditCard.XChargeToken = PIn.String(table.Rows[i]["XChargeToken"].ToString()); creditCard.CCNumberMasked = PIn.String(table.Rows[i]["CCNumberMasked"].ToString()); creditCard.CCExpiration = PIn.Date(table.Rows[i]["CCExpiration"].ToString()); creditCard.ItemOrder = PIn.Int(table.Rows[i]["ItemOrder"].ToString()); creditCard.ChargeAmt = PIn.Double(table.Rows[i]["ChargeAmt"].ToString()); creditCard.DateStart = PIn.Date(table.Rows[i]["DateStart"].ToString()); creditCard.DateStop = PIn.Date(table.Rows[i]["DateStop"].ToString()); creditCard.Note = PIn.String(table.Rows[i]["Note"].ToString()); creditCard.PayPlanNum = PIn.Long(table.Rows[i]["PayPlanNum"].ToString()); retVal.Add(creditCard); } return(retVal); }
///<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; foreach (DataRow row in table.Rows) { payPlan = new PayPlan(); payPlan.PayPlanNum = PIn.Long(row["PayPlanNum"].ToString()); payPlan.PatNum = PIn.Long(row["PatNum"].ToString()); payPlan.Guarantor = PIn.Long(row["Guarantor"].ToString()); payPlan.PayPlanDate = PIn.Date(row["PayPlanDate"].ToString()); payPlan.APR = PIn.Double(row["APR"].ToString()); payPlan.Note = PIn.String(row["Note"].ToString()); payPlan.PlanNum = PIn.Long(row["PlanNum"].ToString()); payPlan.CompletedAmt = PIn.Double(row["CompletedAmt"].ToString()); payPlan.InsSubNum = PIn.Long(row["InsSubNum"].ToString()); payPlan.PaySchedule = (OpenDentBusiness.PaymentSchedule)PIn.Int(row["PaySchedule"].ToString()); payPlan.NumberOfPayments = PIn.Int(row["NumberOfPayments"].ToString()); payPlan.PayAmt = PIn.Double(row["PayAmt"].ToString()); payPlan.DownPayment = PIn.Double(row["DownPayment"].ToString()); payPlan.IsClosed = PIn.Bool(row["IsClosed"].ToString()); payPlan.Signature = PIn.String(row["Signature"].ToString()); payPlan.SigIsTopaz = PIn.Bool(row["SigIsTopaz"].ToString()); payPlan.PlanCategory = PIn.Long(row["PlanCategory"].ToString()); payPlan.IsDynamic = PIn.Bool(row["IsDynamic"].ToString()); payPlan.ChargeFrequency = (OpenDentBusiness.PayPlanFrequency)PIn.Int(row["ChargeFrequency"].ToString()); payPlan.DatePayPlanStart = PIn.Date(row["DatePayPlanStart"].ToString()); payPlan.IsLocked = PIn.Bool(row["IsLocked"].ToString()); retVal.Add(payPlan); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <JournalEntry> TableToList(DataTable table) { List <JournalEntry> retVal = new List <JournalEntry>(); JournalEntry journalEntry; foreach (DataRow row in table.Rows) { journalEntry = new JournalEntry(); journalEntry.JournalEntryNum = PIn.Long(row["JournalEntryNum"].ToString()); journalEntry.TransactionNum = PIn.Long(row["TransactionNum"].ToString()); journalEntry.AccountNum = PIn.Long(row["AccountNum"].ToString()); journalEntry.DateDisplayed = PIn.Date(row["DateDisplayed"].ToString()); journalEntry.DebitAmt = PIn.Double(row["DebitAmt"].ToString()); journalEntry.CreditAmt = PIn.Double(row["CreditAmt"].ToString()); journalEntry.Memo = PIn.String(row["Memo"].ToString()); journalEntry.Splits = PIn.String(row["Splits"].ToString()); journalEntry.CheckNumber = PIn.String(row["CheckNumber"].ToString()); journalEntry.ReconcileNum = PIn.Long(row["ReconcileNum"].ToString()); journalEntry.SecUserNumEntry = PIn.Long(row["SecUserNumEntry"].ToString()); journalEntry.SecDateTEntry = PIn.DateT(row["SecDateTEntry"].ToString()); journalEntry.SecUserNumEdit = PIn.Long(row["SecUserNumEdit"].ToString()); journalEntry.SecDateTEdit = PIn.DateT(row["SecDateTEdit"].ToString()); retVal.Add(journalEntry); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <Supply> TableToList(DataTable table) { List <Supply> retVal = new List <Supply>(); Supply supply; foreach (DataRow row in table.Rows) { supply = new Supply(); supply.SupplyNum = PIn.Long(row["SupplyNum"].ToString()); supply.SupplierNum = PIn.Long(row["SupplierNum"].ToString()); supply.CatalogNumber = PIn.String(row["CatalogNumber"].ToString()); supply.Descript = PIn.String(row["Descript"].ToString()); supply.Category = PIn.Long(row["Category"].ToString()); supply.ItemOrder = PIn.Int(row["ItemOrder"].ToString()); supply.LevelDesired = PIn.Float(row["LevelDesired"].ToString()); supply.IsHidden = PIn.Bool(row["IsHidden"].ToString()); supply.Price = PIn.Double(row["Price"].ToString()); supply.BarCodeOrID = PIn.String(row["BarCodeOrID"].ToString()); supply.DispDefaultQuant = PIn.Float(row["DispDefaultQuant"].ToString()); supply.DispUnitsCount = PIn.Int(row["DispUnitsCount"].ToString()); supply.DispUnitDesc = PIn.String(row["DispUnitDesc"].ToString()); supply.LevelOnHand = PIn.Float(row["LevelOnHand"].ToString()); retVal.Add(supply); } return(retVal); }
///<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; foreach (DataRow row in table.Rows) { repeatCharge = new RepeatCharge(); repeatCharge.RepeatChargeNum = PIn.Long(row["RepeatChargeNum"].ToString()); repeatCharge.PatNum = PIn.Long(row["PatNum"].ToString()); repeatCharge.ProcCode = PIn.String(row["ProcCode"].ToString()); repeatCharge.ChargeAmt = PIn.Double(row["ChargeAmt"].ToString()); repeatCharge.DateStart = PIn.Date(row["DateStart"].ToString()); repeatCharge.DateStop = PIn.Date(row["DateStop"].ToString()); repeatCharge.Note = PIn.String(row["Note"].ToString()); repeatCharge.CopyNoteToProc = PIn.Bool(row["CopyNoteToProc"].ToString()); repeatCharge.CreatesClaim = PIn.Bool(row["CreatesClaim"].ToString()); repeatCharge.IsEnabled = PIn.Bool(row["IsEnabled"].ToString()); repeatCharge.UsePrepay = PIn.Bool(row["UsePrepay"].ToString()); repeatCharge.Npi = PIn.String(row["Npi"].ToString()); repeatCharge.ErxAccountId = PIn.String(row["ErxAccountId"].ToString()); repeatCharge.ProviderName = PIn.String(row["ProviderName"].ToString()); retVal.Add(repeatCharge); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <XWebResponse> TableToList(DataTable table) { List <XWebResponse> retVal = new List <XWebResponse>(); XWebResponse xWebResponse; foreach (DataRow row in table.Rows) { xWebResponse = new XWebResponse(); xWebResponse.XWebResponseNum = PIn.Long(row["XWebResponseNum"].ToString()); xWebResponse.PatNum = PIn.Long(row["PatNum"].ToString()); xWebResponse.ProvNum = PIn.Long(row["ProvNum"].ToString()); xWebResponse.ClinicNum = PIn.Long(row["ClinicNum"].ToString()); xWebResponse.PaymentNum = PIn.Long(row["PaymentNum"].ToString()); xWebResponse.DateTEntry = PIn.DateT(row["DateTEntry"].ToString()); xWebResponse.DateTUpdate = PIn.DateT(row["DateTUpdate"].ToString()); xWebResponse.TransactionStatus = (OpenDentBusiness.XWebTransactionStatus)PIn.Int(row["TransactionStatus"].ToString()); xWebResponse.ResponseCode = PIn.Int(row["ResponseCode"].ToString()); string xWebResponseCode = row["XWebResponseCode"].ToString(); if (xWebResponseCode == "") { xWebResponse.XWebResponseCode = (OpenDentBusiness.XWebResponseCodes) 0; } else { try{ xWebResponse.XWebResponseCode = (OpenDentBusiness.XWebResponseCodes)Enum.Parse(typeof(OpenDentBusiness.XWebResponseCodes), xWebResponseCode); } catch { xWebResponse.XWebResponseCode = (OpenDentBusiness.XWebResponseCodes) 0; } } xWebResponse.ResponseDescription = PIn.String(row["ResponseDescription"].ToString()); xWebResponse.OTK = PIn.String(row["OTK"].ToString()); xWebResponse.HpfUrl = PIn.String(row["HpfUrl"].ToString()); xWebResponse.HpfExpiration = PIn.DateT(row["HpfExpiration"].ToString()); xWebResponse.TransactionID = PIn.String(row["TransactionID"].ToString()); xWebResponse.TransactionType = PIn.String(row["TransactionType"].ToString()); xWebResponse.Alias = PIn.String(row["Alias"].ToString()); xWebResponse.CardType = PIn.String(row["CardType"].ToString()); xWebResponse.CardBrand = PIn.String(row["CardBrand"].ToString()); xWebResponse.CardBrandShort = PIn.String(row["CardBrandShort"].ToString()); xWebResponse.MaskedAcctNum = PIn.String(row["MaskedAcctNum"].ToString()); xWebResponse.Amount = PIn.Double(row["Amount"].ToString()); xWebResponse.ApprovalCode = PIn.String(row["ApprovalCode"].ToString()); xWebResponse.CardCodeResponse = PIn.String(row["CardCodeResponse"].ToString()); xWebResponse.ReceiptID = PIn.Int(row["ReceiptID"].ToString()); xWebResponse.ExpDate = PIn.String(row["ExpDate"].ToString()); xWebResponse.EntryMethod = PIn.String(row["EntryMethod"].ToString()); xWebResponse.ProcessorResponse = PIn.String(row["ProcessorResponse"].ToString()); xWebResponse.BatchNum = PIn.Int(row["BatchNum"].ToString()); xWebResponse.BatchAmount = PIn.Double(row["BatchAmount"].ToString()); xWebResponse.AccountExpirationDate = PIn.Date(row["AccountExpirationDate"].ToString()); xWebResponse.DebugError = PIn.String(row["DebugError"].ToString()); xWebResponse.PayNote = PIn.String(row["PayNote"].ToString()); xWebResponse.CCSource = (OpenDentBusiness.CreditCardSource)PIn.Int(row["CCSource"].ToString()); xWebResponse.OrderId = PIn.String(row["OrderId"].ToString()); retVal.Add(xWebResponse); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <XChargeTransaction> TableToList(DataTable table) { List <XChargeTransaction> retVal = new List <XChargeTransaction>(); XChargeTransaction xChargeTransaction; foreach (DataRow row in table.Rows) { xChargeTransaction = new XChargeTransaction(); xChargeTransaction.XChargeTransactionNum = PIn.Long(row["XChargeTransactionNum"].ToString()); xChargeTransaction.TransType = PIn.String(row["TransType"].ToString()); xChargeTransaction.Amount = PIn.Double(row["Amount"].ToString()); xChargeTransaction.CCEntry = PIn.String(row["CCEntry"].ToString()); xChargeTransaction.PatNum = PIn.Long(row["PatNum"].ToString()); xChargeTransaction.Result = PIn.String(row["Result"].ToString()); xChargeTransaction.ClerkID = PIn.String(row["ClerkID"].ToString()); xChargeTransaction.ResultCode = PIn.String(row["ResultCode"].ToString()); xChargeTransaction.Expiration = PIn.String(row["Expiration"].ToString()); xChargeTransaction.CCType = PIn.String(row["CCType"].ToString()); xChargeTransaction.CreditCardNum = PIn.String(row["CreditCardNum"].ToString()); xChargeTransaction.BatchNum = PIn.String(row["BatchNum"].ToString()); xChargeTransaction.ItemNum = PIn.String(row["ItemNum"].ToString()); xChargeTransaction.ApprCode = PIn.String(row["ApprCode"].ToString()); xChargeTransaction.TransactionDateTime = PIn.DateT(row["TransactionDateTime"].ToString()); retVal.Add(xChargeTransaction); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <PaySplit> TableToList(DataTable table) { List <PaySplit> retVal = new List <PaySplit>(); PaySplit paySplit; foreach (DataRow row in table.Rows) { paySplit = new PaySplit(); paySplit.SplitNum = PIn.Long(row["SplitNum"].ToString()); paySplit.SplitAmt = PIn.Double(row["SplitAmt"].ToString()); paySplit.PatNum = PIn.Long(row["PatNum"].ToString()); paySplit.ProcDate = PIn.Date(row["ProcDate"].ToString()); paySplit.PayNum = PIn.Long(row["PayNum"].ToString()); paySplit.IsDiscount = PIn.Bool(row["IsDiscount"].ToString()); paySplit.DiscountType = PIn.Byte(row["DiscountType"].ToString()); paySplit.ProvNum = PIn.Long(row["ProvNum"].ToString()); paySplit.PayPlanNum = PIn.Long(row["PayPlanNum"].ToString()); paySplit.DatePay = PIn.Date(row["DatePay"].ToString()); paySplit.ProcNum = PIn.Long(row["ProcNum"].ToString()); paySplit.DateEntry = PIn.Date(row["DateEntry"].ToString()); paySplit.UnearnedType = PIn.Long(row["UnearnedType"].ToString()); paySplit.ClinicNum = PIn.Long(row["ClinicNum"].ToString()); paySplit.SecUserNumEntry = PIn.Long(row["SecUserNumEntry"].ToString()); paySplit.SecDateTEdit = PIn.DateT(row["SecDateTEdit"].ToString()); paySplit.FSplitNum = PIn.Long(row["FSplitNum"].ToString()); paySplit.AdjNum = PIn.Long(row["AdjNum"].ToString()); paySplit.PayPlanChargeNum = PIn.Long(row["PayPlanChargeNum"].ToString()); retVal.Add(paySplit); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <RecurringCharge> TableToList(DataTable table) { List <RecurringCharge> retVal = new List <RecurringCharge>(); RecurringCharge recurringCharge; foreach (DataRow row in table.Rows) { recurringCharge = new RecurringCharge(); recurringCharge.RecurringChargeNum = PIn.Long(row["RecurringChargeNum"].ToString()); recurringCharge.PatNum = PIn.Long(row["PatNum"].ToString()); recurringCharge.ClinicNum = PIn.Long(row["ClinicNum"].ToString()); recurringCharge.DateTimeCharge = PIn.DateT(row["DateTimeCharge"].ToString()); recurringCharge.ChargeStatus = (OpenDentBusiness.RecurringChargeStatus)PIn.Int(row["ChargeStatus"].ToString()); recurringCharge.FamBal = PIn.Double(row["FamBal"].ToString()); recurringCharge.PayPlanDue = PIn.Double(row["PayPlanDue"].ToString()); recurringCharge.TotalDue = PIn.Double(row["TotalDue"].ToString()); recurringCharge.RepeatAmt = PIn.Double(row["RepeatAmt"].ToString()); recurringCharge.ChargeAmt = PIn.Double(row["ChargeAmt"].ToString()); recurringCharge.UserNum = PIn.Long(row["UserNum"].ToString()); recurringCharge.PayNum = PIn.Long(row["PayNum"].ToString()); recurringCharge.CreditCardNum = PIn.Long(row["CreditCardNum"].ToString()); recurringCharge.ErrorMsg = PIn.String(row["ErrorMsg"].ToString()); retVal.Add(recurringCharge); } return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <Payment> TableToList(DataTable table) { List <Payment> retVal = new List <Payment>(); Payment payment; foreach (DataRow row in table.Rows) { payment = new Payment(); payment.PayNum = PIn.Long(row["PayNum"].ToString()); payment.PayType = PIn.Long(row["PayType"].ToString()); payment.PayDate = PIn.Date(row["PayDate"].ToString()); payment.PayAmt = PIn.Double(row["PayAmt"].ToString()); payment.CheckNum = PIn.String(row["CheckNum"].ToString()); payment.BankBranch = PIn.String(row["BankBranch"].ToString()); payment.PayNote = PIn.String(row["PayNote"].ToString()); payment.IsSplit = PIn.Bool(row["IsSplit"].ToString()); payment.PatNum = PIn.Long(row["PatNum"].ToString()); payment.ClinicNum = PIn.Long(row["ClinicNum"].ToString()); payment.DateEntry = PIn.Date(row["DateEntry"].ToString()); payment.DepositNum = PIn.Long(row["DepositNum"].ToString()); payment.Receipt = PIn.String(row["Receipt"].ToString()); payment.IsRecurringCC = PIn.Bool(row["IsRecurringCC"].ToString()); payment.SecUserNumEntry = PIn.Long(row["SecUserNumEntry"].ToString()); payment.SecDateTEdit = PIn.DateT(row["SecDateTEdit"].ToString()); payment.PaymentSource = (OpenDentBusiness.CreditCardSource)PIn.Int(row["PaymentSource"].ToString()); payment.ProcessStatus = (OpenDentBusiness.ProcessStat)PIn.Int(row["ProcessStatus"].ToString()); payment.RecurringChargeDate = PIn.Date(row["RecurringChargeDate"].ToString()); retVal.Add(payment); } return(retVal); }
///<summary>Should run AllFieldsAreValid() first. This is called from the parent form to retrieve the data that the user entered. Returns an arraylist. For most fields, the length of the arraylist will be 0 or 1.</summary> public ArrayList GetCurrentValues(int item) { ArrayList retVal = new ArrayList(); if (multInputItems[item].ValueType == FieldValueType.Boolean) { if (((CheckBox)inputs[item]).Checked) { retVal.Add(true); } } else if (multInputItems[item].ValueType == FieldValueType.Date) { retVal.Add(PIn.Date(inputs[item].Text)); } else if (multInputItems[item].ValueType == FieldValueType.Def) { ComboBoxMulti comboBox = (ComboBoxMulti)inputs[item]; List <Def> listDefs = Defs.GetDefsForCategory(multInputItems[item].DefCategory, true); for (int j = 0; j < comboBox.SelectedIndices.Count; j++) { retVal.Add( listDefs[(int)comboBox.SelectedIndices[j]].DefNum); } } else if (multInputItems[item].ValueType == FieldValueType.Enum) { ComboBoxMulti comboBox = (ComboBoxMulti)inputs[item]; Type eType = Type.GetType("OpenDental." + multInputItems[item].EnumerationType.ToString()); for (int j = 0; j < comboBox.SelectedIndices.Count; j++) { retVal.Add( (int)(Enum.Parse(eType, Enum.GetNames(eType)[(int)comboBox.SelectedIndices[j]]))); } } else if (multInputItems[item].ValueType == FieldValueType.Integer) { retVal.Add(PIn.Long(inputs[item].Text)); } else if (multInputItems[item].ValueType == FieldValueType.Number) { retVal.Add(PIn.Double(inputs[item].Text)); } else if (multInputItems[item].ValueType == FieldValueType.String) { if (inputs[item].Text != "") { //the text is first stripped of any ?'s retVal.Add(Regex.Replace(inputs[item].Text, @"\?", "")); } } else if (multInputItems[item].ValueType == FieldValueType.YesNoUnknown) { retVal.Add(((ContrYN)inputs[item]).CurrentValue); } //MessageBox.Show(multInputItems[1].CurrentValues.Count.ToString()); return(retVal); }
///<summary>Converts a DataTable to a list of objects.</summary> public static List <ClaimProc> TableToList(DataTable table) { List <ClaimProc> retVal = new List <ClaimProc>(); ClaimProc claimProc; foreach (DataRow row in table.Rows) { claimProc = new ClaimProc(); claimProc.ClaimProcNum = PIn.Long(row["ClaimProcNum"].ToString()); claimProc.ProcNum = PIn.Long(row["ProcNum"].ToString()); claimProc.ClaimNum = PIn.Long(row["ClaimNum"].ToString()); claimProc.PatNum = PIn.Long(row["PatNum"].ToString()); claimProc.ProvNum = PIn.Long(row["ProvNum"].ToString()); claimProc.FeeBilled = PIn.Double(row["FeeBilled"].ToString()); claimProc.InsPayEst = PIn.Double(row["InsPayEst"].ToString()); claimProc.DedApplied = PIn.Double(row["DedApplied"].ToString()); claimProc.Status = (OpenDentBusiness.ClaimProcStatus)PIn.Int(row["Status"].ToString()); claimProc.InsPayAmt = PIn.Double(row["InsPayAmt"].ToString()); claimProc.Remarks = PIn.String(row["Remarks"].ToString()); claimProc.ClaimPaymentNum = PIn.Long(row["ClaimPaymentNum"].ToString()); claimProc.PlanNum = PIn.Long(row["PlanNum"].ToString()); claimProc.DateCP = PIn.Date(row["DateCP"].ToString()); claimProc.WriteOff = PIn.Double(row["WriteOff"].ToString()); claimProc.CodeSent = PIn.String(row["CodeSent"].ToString()); claimProc.AllowedOverride = PIn.Double(row["AllowedOverride"].ToString()); claimProc.Percentage = PIn.Int(row["Percentage"].ToString()); claimProc.PercentOverride = PIn.Int(row["PercentOverride"].ToString()); claimProc.CopayAmt = PIn.Double(row["CopayAmt"].ToString()); claimProc.NoBillIns = PIn.Bool(row["NoBillIns"].ToString()); claimProc.PaidOtherIns = PIn.Double(row["PaidOtherIns"].ToString()); claimProc.BaseEst = PIn.Double(row["BaseEst"].ToString()); claimProc.CopayOverride = PIn.Double(row["CopayOverride"].ToString()); claimProc.ProcDate = PIn.Date(row["ProcDate"].ToString()); claimProc.DateEntry = PIn.Date(row["DateEntry"].ToString()); claimProc.LineNumber = PIn.Byte(row["LineNumber"].ToString()); claimProc.DedEst = PIn.Double(row["DedEst"].ToString()); claimProc.DedEstOverride = PIn.Double(row["DedEstOverride"].ToString()); claimProc.InsEstTotal = PIn.Double(row["InsEstTotal"].ToString()); claimProc.InsEstTotalOverride = PIn.Double(row["InsEstTotalOverride"].ToString()); claimProc.PaidOtherInsOverride = PIn.Double(row["PaidOtherInsOverride"].ToString()); claimProc.EstimateNote = PIn.String(row["EstimateNote"].ToString()); claimProc.WriteOffEst = PIn.Double(row["WriteOffEst"].ToString()); claimProc.WriteOffEstOverride = PIn.Double(row["WriteOffEstOverride"].ToString()); claimProc.ClinicNum = PIn.Long(row["ClinicNum"].ToString()); claimProc.InsSubNum = PIn.Long(row["InsSubNum"].ToString()); claimProc.PaymentRow = PIn.Int(row["PaymentRow"].ToString()); claimProc.PayPlanNum = PIn.Long(row["PayPlanNum"].ToString()); claimProc.ClaimPaymentTracking = PIn.Long(row["ClaimPaymentTracking"].ToString()); claimProc.SecUserNumEntry = PIn.Long(row["SecUserNumEntry"].ToString()); claimProc.SecDateEntry = PIn.Date(row["SecDateEntry"].ToString()); claimProc.SecDateTEdit = PIn.DateT(row["SecDateTEdit"].ToString()); claimProc.DateSuppReceived = PIn.Date(row["DateSuppReceived"].ToString()); claimProc.DateInsFinalized = PIn.Date(row["DateInsFinalized"].ToString()); claimProc.IsTransfer = PIn.Bool(row["IsTransfer"].ToString()); retVal.Add(claimProc); } return(retVal); }