public PP_PaymentItem(LedgerItemTypes cLedgerItemType, uint cGuarantor, uint cPatNum, int cProvNum, uint cProcNum, DateTime cDate, decimal cItemAmt, ulong cLedgerItemNumber, MyAllocator1.ODTablesUsed.ODTablesPulled cSourceTable) : base(cLedgerItemType, cGuarantor, cPatNum, cProvNum, cProcNum, cDate, cItemAmt, cLedgerItemNumber, cSourceTable) { }
/// <summary> /// 2nd OverLoad has values IsAllocated, DebugString, AmtAllocated /// </summary> public PP_LedgerItem(LedgerItemTypes cLedgerItemType, uint cGuarantor, uint cPatNum, ushort cProvNum, uint cProcNum, DateTime cDate, decimal cItemAmt, ulong cLedgerItemNumber, MyAllocator1.ODTablesUsed.ODTablesPulled cSourceTable, bool IsAllocated1, decimal AmtAllocated1, string DebugString1) { SetConstructorValues(cLedgerItemType, cGuarantor, cPatNum, cProvNum, cProcNum, cDate, cItemAmt, cLedgerItemNumber, cSourceTable, IsAllocated1, DebugString1, AmtAllocated1); }
/// <summary> /// Last 3 parameters are different. Used if want to set IsAllocated, DebugString,or AmtAllocated /// </summary> private void SetConstructorValues(LedgerItemTypes cLedgerItemType, uint cGuarantor, uint cPatNum, ushort cProvNum, uint cProcNum, DateTime cDate, decimal cItemAmt, ulong cLedgerItemNumber, MyAllocator1.ODTablesUsed.ODTablesPulled cSourceTable, bool IsAllocated1, string DebugString1, decimal AmtAllocated1) { SetConstructorValues(cLedgerItemType, cGuarantor, cPatNum, cProvNum, cProcNum, cDate, cItemAmt, cLedgerItemNumber, cSourceTable); this.m_IsAllocated = IsAllocated1; this.m_DebugString = DebugString1; this.m_AmtAllocated = AmtAllocated1; }
private void SetConstructorValues(LedgerItemTypes cLedgerItemType, uint cGuarantor, uint cPatNum, int cProvNum, uint cProcNum, DateTime cDate, decimal cItemAmt, ulong cLedgerItemNumber, MyAllocator1.ODTablesUsed.ODTablesPulled cSourceTable) { this.m_LedgerItemType = cLedgerItemType; this.m_Guarantor = cGuarantor; this.m_PatNum = cPatNum; this.m_ProvNum = cProvNum; this.m_ProcNum = cProcNum; this.m_ItemDate = new DateTime(cDate.Year, cDate.Month, cDate.Day); this.m_ItemAmt = cItemAmt; this.m_LedgerItemNum = cLedgerItemNumber; this.m_TableSource = cSourceTable; }
/// <summary> /// Used for creating LedgerItems that can be sorted in a FIFO Manner /// Input values are similar to the Table Columns. Readonly properties provided. /// IComparable Interface Provided for sorting /// /// Strips time off of cDate /// /// Set cLedgerItemNumber =0 if unknown. /// </summary> public PP_LedgerItem(LedgerItemTypes cLedgerItemType, uint cGuarantor, uint cPatNum, int cProvNum, uint cProcNum, DateTime cDate, decimal cItemAmt, ulong cLedgerItemNumber, MyAllocator1.ODTablesUsed.ODTablesPulled cSourceTable) { //this.m_LedgerItemType = cLedgerItemType; //this.m_Guarantor = cGuarantor; //this.m_PatNum = cPatNum; //this.m_ProvNum = cProvNum; //this.m_ProcNum = cProcNum; //this.m_ItemDate = new DateTime(cDate.Year, cDate.Month, cDate.Day); //this.m_ItemAmt = cItemAmt; //this.m_LedgerItemNum = cLedgerItemNumber; SetConstructorValues(cLedgerItemType, cGuarantor, cPatNum, cProvNum, cProcNum, cDate, cItemAmt, cLedgerItemNumber, cSourceTable); }
/// <summary> /// 2nd OverLoad has values IsAllocated, DebugString, AmtAllocated /// </summary> public PP_LedgerItem(LedgerItemTypes cLedgerItemType, uint cGuarantor, uint cPatNum, ushort cProvNum, uint cProcNum, DateTime cDate, decimal cItemAmt, ulong cLedgerItemNumber, MyAllocator1.ODTablesUsed.ODTablesPulled cSourceTable, bool IsAllocated1, decimal AmtAllocated1, string DebugString1) { SetConstructorValues(cLedgerItemType, cGuarantor, cPatNum, cProvNum, cProcNum, cDate, cItemAmt, cLedgerItemNumber,cSourceTable, IsAllocated1, DebugString1, AmtAllocated1); }
/// <summary> /// Just makes a datatable of the Full Ledger list of items /// </summary> /// <returns></returns> public DataTable ViewLedgerObject(LedgerItemTypes[] lit) { DataTable dtLookAtLedger = new DataTable(); dtLookAtLedger.Columns.Add("Guarantor"); dtLookAtLedger.Columns.Add("IsAllocated"); dtLookAtLedger.Columns.Add("ProvNum"); dtLookAtLedger.Columns.Add("ItemDate"); dtLookAtLedger.Columns.Add("PatNum"); dtLookAtLedger.Columns.Add("ProcNum"); dtLookAtLedger.Columns.Add("ODTableSource"); dtLookAtLedger.Columns.Add("ItemNum"); dtLookAtLedger.Columns.Add("ItemType"); dtLookAtLedger.Columns.Add("Amount"); //dtLookAtLedger.Columns.Add(" //dtLookAtLedger.Columns.Add(" foreach(PP_LedgerItem pp1 in this.FullLedger) { bool ShowItem = false; for(int i = 0;i < lit.Length;i++) if(pp1.ITEMTYPE == lit[i]) { ShowItem = true; i = lit.Length; } if(ShowItem) { DataRow newRow = dtLookAtLedger.NewRow(); newRow["Guarantor"] = pp1.GUARANTOR.ToString(); newRow["IsAllocated"] = pp1.IS_ALLOCATED.ToString(); newRow["ProvNum"] = pp1.PROVNUM.ToString(); newRow["ItemDate"] = pp1.ITEMDATE.ToString(); newRow["PatNum"] = pp1.PATNUM.ToString(); newRow["ProcNum"] = pp1.PROCNUM.ToString(); newRow["ODTableSource"] = pp1.OD_TABLESOURCE.ToString(); newRow["ItemNum"] = pp1.ITEMNUM.ToString(); newRow["ItemType"] = pp1.ITEMTYPE.ToString(); newRow["Amount"] = pp1.AMMOUNT; dtLookAtLedger.Rows.Add(newRow); if(pp1 is PP_PaymentItem) { PP_PaymentItem pyI = (PP_PaymentItem)pp1; if(pyI.PAYMENT_SPLITS != null) { for(int j = 0;j < pyI.PAYMENT_SPLITS.Count;j++) { DataRow newRow2 = dtLookAtLedger.NewRow(); newRow2["Guarantor"] = "\""; newRow2["IsAllocated"] = "\""; newRow2["ProvNum"] = pyI.PAYMENT_SPLITS[j].PROVNUM.ToString(); newRow2["ItemDate"] = "\""; newRow2["PatNum"] = "\""; newRow2["ProcNum"] = pyI.PAYMENT_SPLITS[j].ALLOCATED_FROM_NUM.ToString(); newRow2["ODTableSource"] = pyI.PAYMENT_SPLITS[j].ALLOCATED_FROM_TABLE.ToString(); newRow2["ItemNum"] = ""; newRow2["ItemType"] = ""; newRow2["Amount"] = pyI.PAYMENT_SPLITS[j].AMMOUNT.ToString(); dtLookAtLedger.Rows.Add(newRow2); } } } }//end if (showitem) } return dtLookAtLedger; }