Created
November 21, 2012 16:38
-
-
Save WilliamBZA/4125905 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Data; | |
namespace DBPortal | |
{ | |
[Serializable()] | |
public class AmountsRec | |
{ | |
public int AmtSeqNo {get{return _AmtSeqNo_;}set{_AmtSeqNo_=value;}}int _AmtSeqNo_; | |
public int BopDataSeqNo {get{return _BopDataSeqNo_;}set{_BopDataSeqNo_=value;}}int _BopDataSeqNo_; | |
public double RandAmt {get{return _RandAmt_;}set{_RandAmt_=value;}}double _RandAmt_; | |
public double Amt {get{return _Amt_;}set{_Amt_=value;}}double _Amt_; | |
public string ExConNo {get{return _ExConNo_;}set{_ExConNo_=value;}}string _ExConNo_; | |
public string ImpConNo {get{return _ImpConNo_;}set{_ImpConNo_=value;}}string _ImpConNo_; | |
public string SARBAuthNo {get{return _SARBAuthNo_;}set{_SARBAuthNo_=value;}}string _SARBAuthNo_; | |
public string CatCde {get{return _CatCde_;}set{_CatCde_=value;}}string _CatCde_; | |
public string CatQual {get{return _CatQual_;}set{_CatQual_=value;}}string _CatQual_; | |
public string OrigRef {get{return _OrigRef_;}set{_OrigRef_=value;}}string _OrigRef_; | |
public string CannotCat {get{return _CannotCat_;}set{_CannotCat_=value;}}string _CannotCat_; | |
public string SARBLoanRef {get{return _SARBLoanRef_;}set{_SARBLoanRef_=value;}}string _SARBLoanRef_; | |
public string LocCtry {get{return _LocCtry_;}set{_LocCtry_=value;}}string _LocCtry_; | |
public string LocQualCde {get{return _LocQualCde_;}set{_LocQualCde_=value;}}string _LocQualCde_; | |
public string AccType {get{return _AccType_;}set{_AccType_=value;}}string _AccType_; | |
public string OrigAccNo {get{return _OrigAccNo_;}set{_OrigAccNo_=value;}}string _OrigAccNo_; | |
public string RecAccNo {get{return _RecAccNo_;}set{_RecAccNo_=value;}}string _RecAccNo_; | |
public string PymntType {get{return _PymntType_;}set{_PymntType_=value;}}string _PymntType_; | |
public string ReasonCde {get{return _ReasonCde_;}set{_ReasonCde_=value;}}string _ReasonCde_; | |
public string ZZReason {get{return _ZZReason_;}set{_ZZReason_=value;}}string _ZZReason_; | |
public int InterestOnLoan {get{return _InterestOnLoan_;}set{_InterestOnLoan_=value;}}int _InterestOnLoan_; | |
public string OrigAccNoCfcCategory {get{return _OrigAccNoCfcCategory_;}set{_OrigAccNoCfcCategory_=value;}}string _OrigAccNoCfcCategory_; | |
public string RecAccNoCfcCategory {get{return _RecAccNoCfcCategory_;}set{_RecAccNoCfcCategory_=value;}}string _RecAccNoCfcCategory_; | |
public string BopCatOverrideInd {get{return _BopCatOverrideInd_;}set{_BopCatOverrideInd_=value;}}string _BopCatOverrideInd_; | |
public string BopCatOverrideReason {get{return _BopCatOverrideReason_;}set{_BopCatOverrideReason_=value;}}string _BopCatOverrideReason_; | |
public string CustomsClientNumber {get{return _CustomsClientNumber_;}set{_CustomsClientNumber_=value;}}string _CustomsClientNumber_; | |
} | |
[Serializable()] | |
public class AmountsDeleteOneRec | |
{ | |
public int AmtSeqNo {get{return _AmtSeqNo_;}set{_AmtSeqNo_=value;}}int _AmtSeqNo_; | |
} | |
[Serializable()] | |
public class AmountsExistsRec | |
{ | |
public int Count {get{return _Count_;}set{_Count_=value;}}int _Count_; | |
public int AmtSeqNo {get{return _AmtSeqNo_;}set{_AmtSeqNo_=value;}}int _AmtSeqNo_; | |
} | |
[Serializable()] | |
public class AmountsUnusedAmountsRec | |
{ | |
public int BopDataSeqNo {get{return _BopDataSeqNo_;}set{_BopDataSeqNo_=value;}}int _BopDataSeqNo_; | |
public int AmtSeqNo {get{return _AmtSeqNo_;}set{_AmtSeqNo_=value;}}int _AmtSeqNo_; | |
public double Amt {get{return _Amt_;}set{_Amt_=value;}}double _Amt_; | |
public double RandAmt {get{return _RandAmt_;}set{_RandAmt_=value;}}double _RandAmt_; | |
public string CatCde {get{return _CatCde_;}set{_CatCde_=value;}}string _CatCde_; | |
public string UsedList {get{return _UsedList_;}set{_UsedList_=value;}}string _UsedList_; | |
} | |
[Serializable()] | |
public class AmountsCountByBopDataSeqNoRec | |
{ | |
public int BopDataSeqNo {get{return _BopDataSeqNo_;}set{_BopDataSeqNo_=value;}}int _BopDataSeqNo_; | |
public int AmtCount {get{return _AmtCount_;}set{_AmtCount_=value;}}int _AmtCount_; | |
} | |
[Serializable()] | |
public class AmountsGetByBopDataSeqNoRec | |
{ | |
public int BopDataSeqNo {get{return _BopDataSeqNo_;}set{_BopDataSeqNo_=value;}}int _BopDataSeqNo_; | |
public int AmtSeqNo {get{return _AmtSeqNo_;}set{_AmtSeqNo_=value;}}int _AmtSeqNo_; | |
} | |
[Serializable()] | |
public class AmountsDeleteByBopDataSeqNoRec | |
{ | |
public int BopDataSeqNo {get{return _BopDataSeqNo_;}set{_BopDataSeqNo_=value;}}int _BopDataSeqNo_; | |
} | |
[Serializable()] | |
public class AmountsIsReportableRec | |
{ | |
public int BopDataSeqNo {get{return _BopDataSeqNo_;}set{_BopDataSeqNo_=value;}}int _BopDataSeqNo_; | |
public string ReportableCatQual {get{return _ReportableCatQual_;}set{_ReportableCatQual_=value;}}string _ReportableCatQual_; | |
public int QualCount {get{return _QualCount_;}set{_QualCount_=value;}}int _QualCount_; | |
} | |
[Serializable()] | |
public class AmountsBopDexGetXmlReportDetailsRec | |
{ | |
public int BopDataSeqNo {get{return _BopDataSeqNo_;}set{_BopDataSeqNo_=value;}}int _BopDataSeqNo_; | |
public int AmtSeqNo {get{return _AmtSeqNo_;}set{_AmtSeqNo_=value;}}int _AmtSeqNo_; | |
public double RandAmt {get{return _RandAmt_;}set{_RandAmt_=value;}}double _RandAmt_; | |
public double Amt {get{return _Amt_;}set{_Amt_=value;}}double _Amt_; | |
public string ExConNo {get{return _ExConNo_;}set{_ExConNo_=value;}}string _ExConNo_; | |
public string ImpConNo {get{return _ImpConNo_;}set{_ImpConNo_=value;}}string _ImpConNo_; | |
public string SARBAuthNo {get{return _SARBAuthNo_;}set{_SARBAuthNo_=value;}}string _SARBAuthNo_; | |
public string CatCde {get{return _CatCde_;}set{_CatCde_=value;}}string _CatCde_; | |
public string CatQual {get{return _CatQual_;}set{_CatQual_=value;}}string _CatQual_; | |
public string OrigRef {get{return _OrigRef_;}set{_OrigRef_=value;}}string _OrigRef_; | |
public string CannotCat {get{return _CannotCat_;}set{_CannotCat_=value;}}string _CannotCat_; | |
public string SARBLoanRef {get{return _SARBLoanRef_;}set{_SARBLoanRef_=value;}}string _SARBLoanRef_; | |
public string LocCtry {get{return _LocCtry_;}set{_LocCtry_=value;}}string _LocCtry_; | |
public string LocQualCde {get{return _LocQualCde_;}set{_LocQualCde_=value;}}string _LocQualCde_; | |
public string LQDescription {get{return _LQDescription_;}set{_LQDescription_=value;}}string _LQDescription_; | |
public string AccType {get{return _AccType_;}set{_AccType_=value;}}string _AccType_; | |
public string AccTypDescription {get{return _AccTypDescription_;}set{_AccTypDescription_=value;}}string _AccTypDescription_; | |
public string OrigAccNo {get{return _OrigAccNo_;}set{_OrigAccNo_=value;}}string _OrigAccNo_; | |
public string RecAccNo {get{return _RecAccNo_;}set{_RecAccNo_=value;}}string _RecAccNo_; | |
public string PymntType {get{return _PymntType_;}set{_PymntType_=value;}}string _PymntType_; | |
public string PTDescription {get{return _PTDescription_;}set{_PTDescription_=value;}}string _PTDescription_; | |
public string ReasonCde {get{return _ReasonCde_;}set{_ReasonCde_=value;}}string _ReasonCde_; | |
public string ZZReason {get{return _ZZReason_;}set{_ZZReason_=value;}}string _ZZReason_; | |
public string CustomsClientNumber {get{return _CustomsClientNumber_;}set{_CustomsClientNumber_=value;}}string _CustomsClientNumber_; | |
} | |
[Serializable()] | |
public class AmountsGetBopdata2TransactionTotalRec | |
{ | |
public int BopDataSeqNo {get{return _BopDataSeqNo_;}set{_BopDataSeqNo_=value;}}int _BopDataSeqNo_; | |
public double AmtTotal {get{return _AmtTotal_;}set{_AmtTotal_=value;}}double _AmtTotal_; | |
} | |
[Serializable()] | |
public class AmountsGetSingleAmountsRecRec | |
{ | |
public int BopDataSeqNo {get{return _BopDataSeqNo_;}set{_BopDataSeqNo_=value;}}int _BopDataSeqNo_; | |
public int AmtSeqNo {get{return _AmtSeqNo_;}set{_AmtSeqNo_=value;}}int _AmtSeqNo_; | |
public double RandAmt {get{return _RandAmt_;}set{_RandAmt_=value;}}double _RandAmt_; | |
public double Amt {get{return _Amt_;}set{_Amt_=value;}}double _Amt_; | |
public string ExConNo {get{return _ExConNo_;}set{_ExConNo_=value;}}string _ExConNo_; | |
public string ImpConNo {get{return _ImpConNo_;}set{_ImpConNo_=value;}}string _ImpConNo_; | |
public string SARBAuthNo {get{return _SARBAuthNo_;}set{_SARBAuthNo_=value;}}string _SARBAuthNo_; | |
public string CatCde {get{return _CatCde_;}set{_CatCde_=value;}}string _CatCde_; | |
public string CatQual {get{return _CatQual_;}set{_CatQual_=value;}}string _CatQual_; | |
public string OrigRef {get{return _OrigRef_;}set{_OrigRef_=value;}}string _OrigRef_; | |
public string CannotCat {get{return _CannotCat_;}set{_CannotCat_=value;}}string _CannotCat_; | |
public string SARBLoanRef {get{return _SARBLoanRef_;}set{_SARBLoanRef_=value;}}string _SARBLoanRef_; | |
public string LocCtry {get{return _LocCtry_;}set{_LocCtry_=value;}}string _LocCtry_; | |
public string LocQualCde {get{return _LocQualCde_;}set{_LocQualCde_=value;}}string _LocQualCde_; | |
public string AccType {get{return _AccType_;}set{_AccType_=value;}}string _AccType_; | |
public string OrigAccNo {get{return _OrigAccNo_;}set{_OrigAccNo_=value;}}string _OrigAccNo_; | |
public string RecAccNo {get{return _RecAccNo_;}set{_RecAccNo_=value;}}string _RecAccNo_; | |
public string PymntType {get{return _PymntType_;}set{_PymntType_=value;}}string _PymntType_; | |
public string ReasonCde {get{return _ReasonCde_;}set{_ReasonCde_=value;}}string _ReasonCde_; | |
public string ZZReason {get{return _ZZReason_;}set{_ZZReason_=value;}}string _ZZReason_; | |
public int InterestOnLoan {get{return _InterestOnLoan_;}set{_InterestOnLoan_=value;}}int _InterestOnLoan_; | |
public string CustomsClientNumber {get{return _CustomsClientNumber_;}set{_CustomsClientNumber_=value;}}string _CustomsClientNumber_; | |
} | |
[Serializable()] | |
public class AmountsGetAmountsRec | |
{ | |
public string RunDateFrom {get{return _RunDateFrom_;}set{_RunDateFrom_=value;}}string _RunDateFrom_; | |
public string RunDateTo {get{return _RunDateTo_;}set{_RunDateTo_=value;}}string _RunDateTo_; | |
public string AmtSeqNo {get{return _AmtSeqNo_;}set{_AmtSeqNo_=value;}}string _AmtSeqNo_; | |
public string BopDataSeqNo {get{return _BopDataSeqNo_;}set{_BopDataSeqNo_=value;}}string _BopDataSeqNo_; | |
public string RandAmt {get{return _RandAmt_;}set{_RandAmt_=value;}}string _RandAmt_; | |
public string Amt {get{return _Amt_;}set{_Amt_=value;}}string _Amt_; | |
public string ExConNo {get{return _ExConNo_;}set{_ExConNo_=value;}}string _ExConNo_; | |
public string ImpConNo {get{return _ImpConNo_;}set{_ImpConNo_=value;}}string _ImpConNo_; | |
public string SARBAuthNo {get{return _SARBAuthNo_;}set{_SARBAuthNo_=value;}}string _SARBAuthNo_; | |
public string CatCde {get{return _CatCde_;}set{_CatCde_=value;}}string _CatCde_; | |
public string CatQual {get{return _CatQual_;}set{_CatQual_=value;}}string _CatQual_; | |
public string OrigRef {get{return _OrigRef_;}set{_OrigRef_=value;}}string _OrigRef_; | |
public string Status {get{return _Status_;}set{_Status_=value;}}string _Status_; | |
public string OrigSys {get{return _OrigSys_;}set{_OrigSys_=value;}}string _OrigSys_; | |
public string CannotCat {get{return _CannotCat_;}set{_CannotCat_=value;}}string _CannotCat_; | |
public string SARBLoanRef {get{return _SARBLoanRef_;}set{_SARBLoanRef_=value;}}string _SARBLoanRef_; | |
public string LocCtry {get{return _LocCtry_;}set{_LocCtry_=value;}}string _LocCtry_; | |
public string LocQualCde {get{return _LocQualCde_;}set{_LocQualCde_=value;}}string _LocQualCde_; | |
public string AccType {get{return _AccType_;}set{_AccType_=value;}}string _AccType_; | |
public string OrigAccNo {get{return _OrigAccNo_;}set{_OrigAccNo_=value;}}string _OrigAccNo_; | |
public string RecAccNo {get{return _RecAccNo_;}set{_RecAccNo_=value;}}string _RecAccNo_; | |
public string PymntType {get{return _PymntType_;}set{_PymntType_=value;}}string _PymntType_; | |
public string ReasonCde {get{return _ReasonCde_;}set{_ReasonCde_=value;}}string _ReasonCde_; | |
public string ZZReason {get{return _ZZReason_;}set{_ZZReason_=value;}}string _ZZReason_; | |
public string InterestOnLoan {get{return _InterestOnLoan_;}set{_InterestOnLoan_=value;}}string _InterestOnLoan_; | |
public string CustomsClientNumber {get{return _CustomsClientNumber_;}set{_CustomsClientNumber_=value;}}string _CustomsClientNumber_; | |
public string ValueDate {get{return _ValueDate_;}set{_ValueDate_=value;}}string _ValueDate_; | |
} | |
[Serializable()] | |
public class AmountsGetAmountsCFCRec | |
{ | |
public string RunDateFrom {get{return _RunDateFrom_;}set{_RunDateFrom_=value;}}string _RunDateFrom_; | |
public string RunDateTo {get{return _RunDateTo_;}set{_RunDateTo_=value;}}string _RunDateTo_; | |
public string AmtSeqNo {get{return _AmtSeqNo_;}set{_AmtSeqNo_=value;}}string _AmtSeqNo_; | |
public string BopDataSeqNo {get{return _BopDataSeqNo_;}set{_BopDataSeqNo_=value;}}string _BopDataSeqNo_; | |
public string RandAmt {get{return _RandAmt_;}set{_RandAmt_=value;}}string _RandAmt_; | |
public string Amt {get{return _Amt_;}set{_Amt_=value;}}string _Amt_; | |
public string ExConNo {get{return _ExConNo_;}set{_ExConNo_=value;}}string _ExConNo_; | |
public string ImpConNo {get{return _ImpConNo_;}set{_ImpConNo_=value;}}string _ImpConNo_; | |
public string SARBAuthNo {get{return _SARBAuthNo_;}set{_SARBAuthNo_=value;}}string _SARBAuthNo_; | |
public string CatCde {get{return _CatCde_;}set{_CatCde_=value;}}string _CatCde_; | |
public string CatQual {get{return _CatQual_;}set{_CatQual_=value;}}string _CatQual_; | |
public string OrigRef {get{return _OrigRef_;}set{_OrigRef_=value;}}string _OrigRef_; | |
public string Status {get{return _Status_;}set{_Status_=value;}}string _Status_; | |
public string OrigSys {get{return _OrigSys_;}set{_OrigSys_=value;}}string _OrigSys_; | |
public string CannotCat {get{return _CannotCat_;}set{_CannotCat_=value;}}string _CannotCat_; | |
public string SARBLoanRef {get{return _SARBLoanRef_;}set{_SARBLoanRef_=value;}}string _SARBLoanRef_; | |
public string LocCtry {get{return _LocCtry_;}set{_LocCtry_=value;}}string _LocCtry_; | |
public string LocQualCde {get{return _LocQualCde_;}set{_LocQualCde_=value;}}string _LocQualCde_; | |
public string AccType {get{return _AccType_;}set{_AccType_=value;}}string _AccType_; | |
public string OrigAccNo {get{return _OrigAccNo_;}set{_OrigAccNo_=value;}}string _OrigAccNo_; | |
public string RecAccNo {get{return _RecAccNo_;}set{_RecAccNo_=value;}}string _RecAccNo_; | |
public string PymntType {get{return _PymntType_;}set{_PymntType_=value;}}string _PymntType_; | |
public string ReasonCde {get{return _ReasonCde_;}set{_ReasonCde_=value;}}string _ReasonCde_; | |
public string ZZReason {get{return _ZZReason_;}set{_ZZReason_=value;}}string _ZZReason_; | |
public string InterestOnLoan {get{return _InterestOnLoan_;}set{_InterestOnLoan_=value;}}string _InterestOnLoan_; | |
public string OrigAccNoCfcCategory {get{return _OrigAccNoCfcCategory_;}set{_OrigAccNoCfcCategory_=value;}}string _OrigAccNoCfcCategory_; | |
public string RecAccNoCfcCategory {get{return _RecAccNoCfcCategory_;}set{_RecAccNoCfcCategory_=value;}}string _RecAccNoCfcCategory_; | |
public string BopCatOverrideInd {get{return _BopCatOverrideInd_;}set{_BopCatOverrideInd_=value;}}string _BopCatOverrideInd_; | |
public string BopCatOverrideReason {get{return _BopCatOverrideReason_;}set{_BopCatOverrideReason_=value;}}string _BopCatOverrideReason_; | |
public string CustomsClientNumber {get{return _CustomsClientNumber_;}set{_CustomsClientNumber_=value;}}string _CustomsClientNumber_; | |
public string ValueDate {get{return _ValueDate_;}set{_ValueDate_=value;}}string _ValueDate_; | |
} | |
[Serializable()] | |
public class AmountsSelectAllDataTable : DataTable | |
{ | |
public const int cAmtSeqNo = 0; | |
public const int cBopDataSeqNo = 1; | |
public const int cRandAmt = 2; | |
public const int cAmt = 3; | |
public const int cExConNo = 4; | |
public const int cImpConNo = 5; | |
public const int cSARBAuthNo = 6; | |
public const int cCatCde = 7; | |
public const int cCatQual = 8; | |
public const int cOrigRef = 9; | |
public const int cCannotCat = 10; | |
public const int cSARBLoanRef = 11; | |
public const int cLocCtry = 12; | |
public const int cLocQualCde = 13; | |
public const int cAccType = 14; | |
public const int cOrigAccNo = 15; | |
public const int cRecAccNo = 16; | |
public const int cPymntType = 17; | |
public const int cReasonCde = 18; | |
public const int cZZReason = 19; | |
public const int cInterestOnLoan = 20; | |
public const int cOrigAccNoCfcCategory = 21; | |
public const int cRecAccNoCfcCategory = 22; | |
public const int cBopCatOverrideInd = 23; | |
public const int cBopCatOverrideReason = 24; | |
public const int cCustomsClientNumber = 25; | |
public static string ToString(int ordinal) | |
{ | |
switch (ordinal) | |
{ | |
case cAmtSeqNo: return "AmtSeqNo"; | |
case cBopDataSeqNo: return "BopDataSeqNo"; | |
case cRandAmt: return "RandAmt"; | |
case cAmt: return "Amt"; | |
case cExConNo: return "ExConNo"; | |
case cImpConNo: return "ImpConNo"; | |
case cSARBAuthNo: return "SARBAuthNo"; | |
case cCatCde: return "CatCde"; | |
case cCatQual: return "CatQual"; | |
case cOrigRef: return "OrigRef"; | |
case cCannotCat: return "CannotCat"; | |
case cSARBLoanRef: return "SARBLoanRef"; | |
case cLocCtry: return "LocCtry"; | |
case cLocQualCde: return "LocQualCde"; | |
case cAccType: return "AccType"; | |
case cOrigAccNo: return "OrigAccNo"; | |
case cRecAccNo: return "RecAccNo"; | |
case cPymntType: return "PymntType"; | |
case cReasonCde: return "ReasonCde"; | |
case cZZReason: return "ZZReason"; | |
case cInterestOnLoan: return "InterestOnLoan"; | |
case cOrigAccNoCfcCategory: return "OrigAccNoCfcCategory"; | |
case cRecAccNoCfcCategory: return "RecAccNoCfcCategory"; | |
case cBopCatOverrideInd: return "BopCatOverrideInd"; | |
case cBopCatOverrideReason: return "BopCatOverrideReason"; | |
case cCustomsClientNumber: return "CustomsClientNumber"; | |
} | |
return "<["+ordinal+"]>"; | |
} | |
public AmountsSelectAllDataTable(ArrayList list) | |
: base("AmountsSelectAll") | |
{ | |
Columns.Add(new DataColumn("AmtSeqNo", typeof(Int32))); | |
Columns.Add(new DataColumn("BopDataSeqNo", typeof(Int32))); | |
Columns.Add(new DataColumn("RandAmt", typeof(Double))); | |
Columns.Add(new DataColumn("Amt", typeof(Double))); | |
Columns.Add(new DataColumn("ExConNo", typeof(String))); | |
Columns.Add(new DataColumn("ImpConNo", typeof(String))); | |
Columns.Add(new DataColumn("SARBAuthNo", typeof(String))); | |
Columns.Add(new DataColumn("CatCde", typeof(String))); | |
Columns.Add(new DataColumn("CatQual", typeof(String))); | |
Columns.Add(new DataColumn("OrigRef", typeof(String))); | |
Columns.Add(new DataColumn("CannotCat", typeof(String))); | |
Columns.Add(new DataColumn("SARBLoanRef", typeof(String))); | |
Columns.Add(new DataColumn("LocCtry", typeof(String))); | |
Columns.Add(new DataColumn("LocQualCde", typeof(String))); | |
Columns.Add(new DataColumn("AccType", typeof(String))); | |
Columns.Add(new DataColumn("OrigAccNo", typeof(String))); | |
Columns.Add(new DataColumn("RecAccNo", typeof(String))); | |
Columns.Add(new DataColumn("PymntType", typeof(String))); | |
Columns.Add(new DataColumn("ReasonCde", typeof(String))); | |
Columns.Add(new DataColumn("ZZReason", typeof(String))); | |
Columns.Add(new DataColumn("InterestOnLoan", typeof(Int32))); | |
Columns.Add(new DataColumn("OrigAccNoCfcCategory", typeof(String))); | |
Columns.Add(new DataColumn("RecAccNoCfcCategory", typeof(String))); | |
Columns.Add(new DataColumn("BopCatOverrideInd", typeof(String))); | |
Columns.Add(new DataColumn("BopCatOverrideReason", typeof(String))); | |
Columns.Add(new DataColumn("CustomsClientNumber", typeof(String))); | |
foreach (AmountsRec rec in list) | |
{ | |
DataRow row = NewRow(); | |
row[cAmtSeqNo] = rec.AmtSeqNo; | |
row[cBopDataSeqNo] = rec.BopDataSeqNo; | |
row[cRandAmt] = rec.RandAmt; | |
row[cAmt] = rec.Amt; | |
row[cExConNo] = rec.ExConNo; | |
row[cImpConNo] = rec.ImpConNo; | |
row[cSARBAuthNo] = rec.SARBAuthNo; | |
row[cCatCde] = rec.CatCde; | |
row[cCatQual] = rec.CatQual; | |
row[cOrigRef] = rec.OrigRef; | |
row[cCannotCat] = rec.CannotCat; | |
row[cSARBLoanRef] = rec.SARBLoanRef; | |
row[cLocCtry] = rec.LocCtry; | |
row[cLocQualCde] = rec.LocQualCde; | |
row[cAccType] = rec.AccType; | |
row[cOrigAccNo] = rec.OrigAccNo; | |
row[cRecAccNo] = rec.RecAccNo; | |
row[cPymntType] = rec.PymntType; | |
row[cReasonCde] = rec.ReasonCde; | |
row[cZZReason] = rec.ZZReason; | |
row[cInterestOnLoan] = rec.InterestOnLoan; | |
row[cOrigAccNoCfcCategory] = rec.OrigAccNoCfcCategory; | |
row[cRecAccNoCfcCategory] = rec.RecAccNoCfcCategory; | |
row[cBopCatOverrideInd] = rec.BopCatOverrideInd; | |
row[cBopCatOverrideReason] = rec.BopCatOverrideReason; | |
row[cCustomsClientNumber] = rec.CustomsClientNumber; | |
Rows.Add(row); | |
} | |
} | |
public AmountsRec this[int i] | |
{ | |
get | |
{ | |
DataRow row = Rows[i]; | |
AmountsRec rec = new AmountsRec(); | |
rec.AmtSeqNo = (int)row[cAmtSeqNo]; | |
rec.BopDataSeqNo = (int)row[cBopDataSeqNo]; | |
rec.RandAmt = (double)row[cRandAmt]; | |
rec.Amt = (double)row[cAmt]; | |
rec.ExConNo = (string)row[cExConNo]; | |
rec.ImpConNo = (string)row[cImpConNo]; | |
rec.SARBAuthNo = (string)row[cSARBAuthNo]; | |
rec.CatCde = (string)row[cCatCde]; | |
rec.CatQual = (string)row[cCatQual]; | |
rec.OrigRef = (string)row[cOrigRef]; | |
rec.CannotCat = (string)row[cCannotCat]; | |
rec.SARBLoanRef = (string)row[cSARBLoanRef]; | |
rec.LocCtry = (string)row[cLocCtry]; | |
rec.LocQualCde = (string)row[cLocQualCde]; | |
rec.AccType = (string)row[cAccType]; | |
rec.OrigAccNo = (string)row[cOrigAccNo]; | |
rec.RecAccNo = (string)row[cRecAccNo]; | |
rec.PymntType = (string)row[cPymntType]; | |
rec.ReasonCde = (string)row[cReasonCde]; | |
rec.ZZReason = (string)row[cZZReason]; | |
rec.InterestOnLoan = (int)row[cInterestOnLoan]; | |
rec.OrigAccNoCfcCategory = (string)row[cOrigAccNoCfcCategory]; | |
rec.RecAccNoCfcCategory = (string)row[cRecAccNoCfcCategory]; | |
rec.BopCatOverrideInd = (string)row[cBopCatOverrideInd]; | |
rec.BopCatOverrideReason = (string)row[cBopCatOverrideReason]; | |
rec.CustomsClientNumber = (string)row[cCustomsClientNumber]; | |
return rec; | |
} | |
set | |
{ | |
DataRow row = Rows[i]; | |
row[cAmtSeqNo] = value.AmtSeqNo; | |
row[cBopDataSeqNo] = value.BopDataSeqNo; | |
row[cRandAmt] = value.RandAmt; | |
row[cAmt] = value.Amt; | |
row[cExConNo] = value.ExConNo; | |
row[cImpConNo] = value.ImpConNo; | |
row[cSARBAuthNo] = value.SARBAuthNo; | |
row[cCatCde] = value.CatCde; | |
row[cCatQual] = value.CatQual; | |
row[cOrigRef] = value.OrigRef; | |
row[cCannotCat] = value.CannotCat; | |
row[cSARBLoanRef] = value.SARBLoanRef; | |
row[cLocCtry] = value.LocCtry; | |
row[cLocQualCde] = value.LocQualCde; | |
row[cAccType] = value.AccType; | |
row[cOrigAccNo] = value.OrigAccNo; | |
row[cRecAccNo] = value.RecAccNo; | |
row[cPymntType] = value.PymntType; | |
row[cReasonCde] = value.ReasonCde; | |
row[cZZReason] = value.ZZReason; | |
row[cInterestOnLoan] = value.InterestOnLoan; | |
row[cOrigAccNoCfcCategory] = value.OrigAccNoCfcCategory; | |
row[cRecAccNoCfcCategory] = value.RecAccNoCfcCategory; | |
row[cBopCatOverrideInd] = value.BopCatOverrideInd; | |
row[cBopCatOverrideReason] = value.BopCatOverrideReason; | |
row[cCustomsClientNumber] = value.CustomsClientNumber; | |
} | |
} | |
} | |
[Serializable()] | |
public class Amounts | |
{ | |
private AmountsRec rec; | |
public AmountsRec Rec {get {return rec;} set {rec = value;} } | |
private ArrayList recList; | |
public ArrayList RecList { get { return recList; } } | |
public int Count { get { return recList.Count; } } | |
public AmountsRec this[int i] | |
{ | |
get | |
{ | |
if (i >= 0 && i < recList.Count) | |
return (AmountsRec) recList[i]; | |
throw new DBPortalException("Amounts index out of range"); | |
} | |
set | |
{ | |
if (i < recList.Count) | |
recList.RemoveAt(i); | |
recList.Insert(i, value); | |
} | |
} | |
public void Clear() | |
{ | |
recList = new ArrayList(); | |
rec = new AmountsRec(); | |
} | |
public Amounts() | |
{ | |
Clear(); | |
} | |
private Cursor selectAllCursor; | |
private string insertCommand | |
{ | |
get {return | |
"insert into Amounts ( " | |
+ "AmtSeqNo " | |
+ ",BopDataSeqNo " | |
+ ",RandAmt " | |
+ ",Amt " | |
+ ",ExConNo " | |
+ ",ImpConNo " | |
+ ",SARBAuthNo " | |
+ ",CatCde " | |
+ ",CatQual " | |
+ ",OrigRef " | |
+ ",CannotCat " | |
+ ",SARBLoanRef " | |
+ ",LocCtry " | |
+ ",LocQualCde " | |
+ ",AccType " | |
+ ",OrigAccNo " | |
+ ",RecAccNo " | |
+ ",PymntType " | |
+ ",ReasonCde " | |
+ ",ZZReason " | |
+ ",InterestOnLoan " | |
+ ",OrigAccNoCfcCategory " | |
+ ",RecAccNoCfcCategory " | |
+ ",BopCatOverrideInd " | |
+ ",BopCatOverrideReason " | |
+ ",CustomsClientNumber " | |
+ ") values ( " | |
+ "AmountsSeq.NEXTVAL " | |
+ ", " | |
+ "{1} " | |
+ ", " | |
+ "{2} " | |
+ ", " | |
+ "{3} " | |
+ ", " | |
+ "{4} " | |
+ ", " | |
+ "{5} " | |
+ ", " | |
+ "{6} " | |
+ ", " | |
+ "{7} " | |
+ ", " | |
+ "{8} " | |
+ ", " | |
+ "{9} " | |
+ ", " | |
+ "{10} " | |
+ ", " | |
+ "{11} " | |
+ ", " | |
+ "{12} " | |
+ ", " | |
+ "{13} " | |
+ ", " | |
+ "{14} " | |
+ ", " | |
+ "{15} " | |
+ ", " | |
+ "{16} " | |
+ ", " | |
+ "{17} " | |
+ ", " | |
+ "{18} " | |
+ ", " | |
+ "{19} " | |
+ ", " | |
+ "{20} " | |
+ ", " | |
+ "{21} " | |
+ ", " | |
+ "{22} " | |
+ ", " | |
+ "{23} " | |
+ ", " | |
+ "{24} " | |
+ ", " | |
+ "{25} " | |
+ ") returning " | |
+ "AmtSeqNo " | |
+ "into " | |
+ "{0} " | |
;} | |
} | |
public void Insert(Connect connect) | |
{ | |
using (Cursor insertCursor = new Cursor(connect)) | |
{ | |
// format command to change {n} to ?, @Pn or :Pn placeholders depending on Vendor | |
insertCursor.Format(insertCommand, 26); | |
insertCursor.Parameter(0, rec.AmtSeqNo, true); | |
insertCursor.Parameter(1, rec.BopDataSeqNo, false); | |
insertCursor.Parameter(2, rec.RandAmt, false); | |
insertCursor.Parameter(3, rec.Amt, false); | |
insertCursor.Parameter(4, rec.ExConNo, false); | |
insertCursor.Parameter(5, rec.ImpConNo, false); | |
insertCursor.Parameter(6, rec.SARBAuthNo, false); | |
insertCursor.Parameter(7, rec.CatCde, false); | |
insertCursor.Parameter(8, rec.CatQual, false); | |
insertCursor.Parameter(9, rec.OrigRef, false); | |
insertCursor.Parameter(10, rec.CannotCat, false); | |
insertCursor.Parameter(11, rec.SARBLoanRef, false); | |
insertCursor.Parameter(12, rec.LocCtry, false); | |
insertCursor.Parameter(13, rec.LocQualCde, false); | |
insertCursor.Parameter(14, rec.AccType, false); | |
insertCursor.Parameter(15, rec.OrigAccNo, false); | |
insertCursor.Parameter(16, rec.RecAccNo, false); | |
insertCursor.Parameter(17, rec.PymntType, false); | |
insertCursor.Parameter(18, rec.ReasonCde, false); | |
insertCursor.Parameter(19, rec.ZZReason, false); | |
insertCursor.Parameter(20, rec.InterestOnLoan, false); | |
insertCursor.Parameter(21, rec.OrigAccNoCfcCategory, false); | |
insertCursor.Parameter(22, rec.RecAccNoCfcCategory, false); | |
insertCursor.Parameter(23, rec.BopCatOverrideInd, false); | |
insertCursor.Parameter(24, rec.BopCatOverrideReason, false); | |
insertCursor.Parameter(25, rec.CustomsClientNumber, false); | |
insertCursor.Exec(); | |
rec.AmtSeqNo = (int)insertCursor[0]; | |
} | |
} | |
private string updateCommand | |
{ | |
get {return | |
"update Amounts set " | |
+ "BopDataSeqNo = " | |
+ "{1} " | |
+ ", RandAmt = " | |
+ "{2} " | |
+ ", Amt = " | |
+ "{3} " | |
+ ", ExConNo = " | |
+ "{4} " | |
+ ", ImpConNo = " | |
+ "{5} " | |
+ ", SARBAuthNo = " | |
+ "{6} " | |
+ ", CatCde = " | |
+ "{7} " | |
+ ", CatQual = " | |
+ "{8} " | |
+ ", OrigRef = " | |
+ "{9} " | |
+ ", CannotCat = " | |
+ "{10} " | |
+ ", SARBLoanRef = " | |
+ "{11} " | |
+ ", LocCtry = " | |
+ "{12} " | |
+ ", LocQualCde = " | |
+ "{13} " | |
+ ", AccType = " | |
+ "{14} " | |
+ ", OrigAccNo = " | |
+ "{15} " | |
+ ", RecAccNo = " | |
+ "{16} " | |
+ ", PymntType = " | |
+ "{17} " | |
+ ", ReasonCde = " | |
+ "{18} " | |
+ ", ZZReason = " | |
+ "{19} " | |
+ ", InterestOnLoan = " | |
+ "{20} " | |
+ ", OrigAccNoCfcCategory = " | |
+ "{21} " | |
+ ", RecAccNoCfcCategory = " | |
+ "{22} " | |
+ ", BopCatOverrideInd = " | |
+ "{23} " | |
+ ", BopCatOverrideReason = " | |
+ "{24} " | |
+ ", CustomsClientNumber = " | |
+ "{25} " | |
+ "where AmtSeqNo = " | |
+ "{0} " | |
;} | |
} | |
public void Update(Connect connect) | |
{ | |
Cursor updateCursor = new Cursor(connect); | |
// format command to change {n} to ?, @Pn or :Pn placeholders depending on Vendor | |
updateCursor.Format(updateCommand, 26); | |
updateCursor.Parameter(0, rec.AmtSeqNo, false); | |
updateCursor.Parameter(1, rec.BopDataSeqNo, false); | |
updateCursor.Parameter(2, rec.RandAmt, false); | |
updateCursor.Parameter(3, rec.Amt, false); | |
updateCursor.Parameter(4, rec.ExConNo, false); | |
updateCursor.Parameter(5, rec.ImpConNo, false); | |
updateCursor.Parameter(6, rec.SARBAuthNo, false); | |
updateCursor.Parameter(7, rec.CatCde, false); | |
updateCursor.Parameter(8, rec.CatQual, false); | |
updateCursor.Parameter(9, rec.OrigRef, false); | |
updateCursor.Parameter(10, rec.CannotCat, false); | |
updateCursor.Parameter(11, rec.SARBLoanRef, false); | |
updateCursor.Parameter(12, rec.LocCtry, false); | |
updateCursor.Parameter(13, rec.LocQualCde, false); | |
updateCursor.Parameter(14, rec.AccType, false); | |
updateCursor.Parameter(15, rec.OrigAccNo, false); | |
updateCursor.Parameter(16, rec.RecAccNo, false); | |
updateCursor.Parameter(17, rec.PymntType, false); | |
updateCursor.Parameter(18, rec.ReasonCde, false); | |
updateCursor.Parameter(19, rec.ZZReason, false); | |
updateCursor.Parameter(20, rec.InterestOnLoan, false); | |
updateCursor.Parameter(21, rec.OrigAccNoCfcCategory, false); | |
updateCursor.Parameter(22, rec.RecAccNoCfcCategory, false); | |
updateCursor.Parameter(23, rec.BopCatOverrideInd, false); | |
updateCursor.Parameter(24, rec.BopCatOverrideReason, false); | |
updateCursor.Parameter(25, rec.CustomsClientNumber, false); | |
updateCursor.Exec(); | |
} | |
private string selectOneCommand | |
{ | |
get {return | |
"select " | |
+ "BopDataSeqNo " | |
+ ", RandAmt " | |
+ ", Amt " | |
+ ", ExConNo " | |
+ ", ImpConNo " | |
+ ", SARBAuthNo " | |
+ ", CatCde " | |
+ ", CatQual " | |
+ ", OrigRef " | |
+ ", CannotCat " | |
+ ", SARBLoanRef " | |
+ ", LocCtry " | |
+ ", LocQualCde " | |
+ ", AccType " | |
+ ", OrigAccNo " | |
+ ", RecAccNo " | |
+ ", PymntType " | |
+ ", ReasonCde " | |
+ ", ZZReason " | |
+ ", InterestOnLoan " | |
+ ", OrigAccNoCfcCategory " | |
+ ", RecAccNoCfcCategory " | |
+ ", BopCatOverrideInd " | |
+ ", BopCatOverrideReason " | |
+ ", CustomsClientNumber " | |
+ "from Amounts " | |
+ "where AmtSeqNo = " | |
+ "{0} " | |
;} | |
} | |
public bool SelectOne(Connect connect) | |
{ | |
Cursor selectOneCursor = new Cursor(connect); | |
// format command to change {n} to ?, @Pn or :Pn placeholders depending on Vendor | |
selectOneCursor.Format(selectOneCommand, 1); | |
selectOneCursor.Parameter(0, rec.AmtSeqNo, false); | |
selectOneCursor.Run(); | |
bool result = (selectOneCursor.HasReader() && selectOneCursor.Read()); | |
if (result == true) | |
{ | |
rec.BopDataSeqNo = (int)selectOneCursor.GetInt(0); | |
rec.RandAmt = (double)selectOneCursor.GetDouble(1); | |
rec.Amt = (double)selectOneCursor.GetDouble(2); | |
rec.ExConNo = (string)selectOneCursor.GetString(3); | |
rec.ImpConNo = (string)selectOneCursor.GetString(4); | |
rec.SARBAuthNo = (string)selectOneCursor.GetString(5); | |
rec.CatCde = (string)selectOneCursor.GetString(6); | |
rec.CatQual = (string)selectOneCursor.GetString(7); | |
rec.OrigRef = (string)selectOneCursor.GetString(8); | |
rec.CannotCat = (string)selectOneCursor.GetString(9); | |
rec.SARBLoanRef = (string)selectOneCursor.GetString(10); | |
rec.LocCtry = (string)selectOneCursor.GetString(11); | |
rec.LocQualCde = (string)selectOneCursor.GetString(12); | |
rec.AccType = (string)selectOneCursor.GetString(13); | |
rec.OrigAccNo = (string)selectOneCursor.GetString(14); | |
rec.RecAccNo = (string)selectOneCursor.GetString(15); | |
rec.PymntType = (string)selectOneCursor.GetString(16); | |
rec.ReasonCde = (string)selectOneCursor.GetString(17); | |
rec.ZZReason = (string)selectOneCursor.GetString(18); | |
rec.InterestOnLoan = (int)selectOneCursor.GetInt(19); | |
rec.OrigAccNoCfcCategory = (string)selectOneCursor.GetString(20); | |
rec.RecAccNoCfcCategory = (string)selectOneCursor.GetString(21); | |
rec.BopCatOverrideInd = (string)selectOneCursor.GetString(22); | |
rec.BopCatOverrideReason = (string)selectOneCursor.GetString(23); | |
rec.CustomsClientNumber = (string)selectOneCursor.GetString(24); | |
} | |
if (selectOneCursor.HasReader()) | |
selectOneCursor.Close(); | |
return result; | |
} | |
private string selectAllCommand | |
{ | |
get {return | |
"select " | |
+ "AmtSeqNo " | |
+ ", BopDataSeqNo " | |
+ ", RandAmt " | |
+ ", Amt " | |
+ ", ExConNo " | |
+ ", ImpConNo " | |
+ ", SARBAuthNo " | |
+ ", CatCde " | |
+ ", CatQual " | |
+ ", OrigRef " | |
+ ", CannotCat " | |
+ ", SARBLoanRef " | |
+ ", LocCtry " | |
+ ", LocQualCde " | |
+ ", AccType " | |
+ ", OrigAccNo " | |
+ ", RecAccNo " | |
+ ", PymntType " | |
+ ", ReasonCde " | |
+ ", ZZReason " | |
+ ", InterestOnLoan " | |
+ ", OrigAccNoCfcCategory " | |
+ ", RecAccNoCfcCategory " | |
+ ", BopCatOverrideInd " | |
+ ", BopCatOverrideReason " | |
+ ", CustomsClientNumber " | |
+ "from Amounts " | |
;} | |
} | |
public void SelectAll(Connect connect) | |
{ | |
selectAllCursor = new Cursor(connect); | |
// format command to change {n} to ?, @Pn or :Pn placeholders depending on Vendor | |
selectAllCursor.Format(selectAllCommand, 0); | |
selectAllCursor.Run(); | |
} | |
public bool SelectAllFetch() | |
{ | |
bool result = (selectAllCursor.HasReader() && selectAllCursor.Read()); | |
if (result == true) | |
{ | |
rec.AmtSeqNo = (int)selectAllCursor.GetInt(0); | |
rec.BopDataSeqNo = (int)selectAllCursor.GetInt(1); | |
rec.RandAmt = (double)selectAllCursor.GetDouble(2); | |
rec.Amt = (double)selectAllCursor.GetDouble(3); | |
rec.ExConNo = (string)selectAllCursor.GetString(4); | |
rec.ImpConNo = (string)selectAllCursor.GetString(5); | |
rec.SARBAuthNo = (string)selectAllCursor.GetString(6); | |
rec.CatCde = (string)selectAllCursor.GetString(7); | |
rec.CatQual = (string)selectAllCursor.GetString(8); | |
rec.OrigRef = (string)selectAllCursor.GetString(9); | |
rec.CannotCat = (string)selectAllCursor.GetString(10); | |
rec.SARBLoanRef = (string)selectAllCursor.GetString(11); | |
rec.LocCtry = (string)selectAllCursor.GetString(12); | |
rec.LocQualCde = (string)selectAllCursor.GetString(13); | |
rec.AccType = (string)selectAllCursor.GetString(14); | |
rec.OrigAccNo = (string)selectAllCursor.GetString(15); | |
rec.RecAccNo = (string)selectAllCursor.GetString(16); | |
rec.PymntType = (string)selectAllCursor.GetString(17); | |
rec.ReasonCde = (string)selectAllCursor.GetString(18); | |
rec.ZZReason = (string)selectAllCursor.GetString(19); | |
rec.InterestOnLoan = (int)selectAllCursor.GetInt(20); | |
rec.OrigAccNoCfcCategory = (string)selectAllCursor.GetString(21); | |
rec.RecAccNoCfcCategory = (string)selectAllCursor.GetString(22); | |
rec.BopCatOverrideInd = (string)selectAllCursor.GetString(23); | |
rec.BopCatOverrideReason = (string)selectAllCursor.GetString(24); | |
rec.CustomsClientNumber = (string)selectAllCursor.GetString(25); | |
} | |
else if (selectAllCursor.HasReader()) | |
selectAllCursor.Close(); | |
return result; | |
} | |
public void SelectAllLoad(Connect connect) | |
{ | |
if (recList.Count > 0) | |
Clear(); | |
SelectAll(connect); | |
while (SelectAllFetch()) | |
{ | |
recList.Add(rec); | |
rec = new AmountsRec(); | |
} | |
} | |
public AmountsSelectAllDataTable SelectAllDataTable() | |
{ | |
AmountsSelectAllDataTable result = new AmountsSelectAllDataTable(recList); | |
return result; | |
} | |
public AmountsSelectAllDataTable SelectAllDataTable(Connect connect) | |
{ | |
SelectAllLoad(connect); | |
return SelectAllDataTable(); | |
} | |
} | |
[Serializable()] | |
public class AmountsDeleteOne | |
{ | |
private AmountsDeleteOneRec rec; | |
public AmountsDeleteOneRec Rec {get {return rec;} set {rec = value;} } | |
public void Clear() | |
{ | |
rec = new AmountsDeleteOneRec(); | |
} | |
public AmountsDeleteOne() | |
{ | |
Clear(); | |
} | |
private string deleteOneCommand | |
{ | |
get {return | |
"delete from Amounts " | |
+ "where AmtSeqNo = " | |
+ "{0} " | |
;} | |
} | |
public void DeleteOne(Connect connect) | |
{ | |
Cursor deleteOneCursor = new Cursor(connect); | |
// format command to change {n} to ?, @Pn or :Pn placeholders depending on Vendor | |
deleteOneCursor.Format(deleteOneCommand, 1); | |
deleteOneCursor.Parameter(0, rec.AmtSeqNo, false); | |
deleteOneCursor.Exec(); | |
} | |
} | |
[Serializable()] | |
public class AmountsExists | |
{ | |
private AmountsExistsRec rec; | |
public AmountsExistsRec Rec {get {return rec;} set {rec = value;} } | |
public void Clear() | |
{ | |
rec = new AmountsExistsRec(); | |
} | |
public AmountsExists() | |
{ | |
Clear(); | |
} | |
private string existsCommand | |
{ | |
get {return | |
"select count(*) from Amounts " | |
+ "where AmtSeqNo = " | |
+ "{0} " | |
;} | |
} | |
public bool Exists(Connect connect) | |
{ | |
Cursor existsCursor = new Cursor(connect); | |
// format command to change {n} to ?, @Pn or :Pn placeholders depending on Vendor | |
existsCursor.Format(existsCommand, 1); | |
existsCursor.Parameter(0, rec.AmtSeqNo, false); | |
existsCursor.Run(); | |
bool result = (existsCursor.HasReader() && existsCursor.Read()); | |
if (result == true) | |
{ | |
rec.Count = (int)existsCursor.GetInt(0); | |
} | |
if (existsCursor.HasReader()) | |
existsCursor.Close(); | |
return result; | |
} | |
} | |
[Serializable()] | |
public class AmountsUnusedAmountsDataTable : DataTable | |
{ | |
public const int cBopDataSeqNo = 0; | |
public const int cAmtSeqNo = 1; | |
public const int cAmt = 2; | |
public const int cRandAmt = 3; | |
public const int cCatCde = 4; | |
public const int cUsedList = 5; | |
public static string ToString(int ordinal) | |
{ | |
switch (ordinal) | |
{ | |
case cBopDataSeqNo: return "BopDataSeqNo"; | |
case cAmtSeqNo: return "AmtSeqNo"; | |
case cAmt: return "Amt"; | |
case cRandAmt: return "RandAmt"; | |
case cCatCde: return "CatCde"; | |
case cUsedList: return "UsedList"; | |
} | |
return "<["+ordinal+"]>"; | |
} | |
public AmountsUnusedAmountsDataTable(ArrayList list) | |
: base("AmountsUnusedAmounts") | |
{ | |
Columns.Add(new DataColumn("BopDataSeqNo", typeof(Int32))); | |
Columns.Add(new DataColumn("AmtSeqNo", typeof(Int32))); | |
Columns.Add(new DataColumn("Amt", typeof(Double))); | |
Columns.Add(new DataColumn("RandAmt", typeof(Double))); | |
Columns.Add(new DataColumn("CatCde", typeof(String))); | |
Columns.Add(new DataColumn("UsedList", typeof(String))); | |
foreach (AmountsUnusedAmountsRec rec in list) | |
{ | |
DataRow row = NewRow(); | |
row[cBopDataSeqNo] = rec.BopDataSeqNo; | |
row[cAmtSeqNo] = rec.AmtSeqNo; | |
row[cAmt] = rec.Amt; | |
row[cRandAmt] = rec.RandAmt; | |
row[cCatCde] = rec.CatCde; | |
row[cUsedList] = rec.UsedList; | |
Rows.Add(row); | |
} | |
} | |
public AmountsUnusedAmountsRec this[int i] | |
{ | |
get | |
{ | |
DataRow row = Rows[i]; | |
AmountsUnusedAmountsRec rec = new AmountsUnusedAmountsRec(); | |
rec.BopDataSeqNo = (int)row[cBopDataSeqNo]; | |
rec.AmtSeqNo = (int)row[cAmtSeqNo]; | |
rec.Amt = (double)row[cAmt]; | |
rec.RandAmt = (double)row[cRandAmt]; | |
rec.CatCde = (string)row[cCatCde]; | |
rec.UsedList = (string)row[cUsedList]; | |
return rec; | |
} | |
set | |
{ | |
DataRow row = Rows[i]; | |
row[cBopDataSeqNo] = value.BopDataSeqNo; | |
row[cAmtSeqNo] = value.AmtSeqNo; | |
row[cAmt] = value.Amt; | |
row[cRandAmt] = value.RandAmt; | |
row[cCatCde] = value.CatCde; | |
row[cUsedList] = value.UsedList; | |
} | |
} | |
} | |
[Serializable()] | |
public class AmountsUnusedAmounts | |
{ | |
private AmountsUnusedAmountsRec rec; | |
public AmountsUnusedAmountsRec Rec {get {return rec;} set {rec = value;} } | |
private ArrayList recList; | |
public ArrayList RecList { get { return recList; } } | |
public int Count { get { return recList.Count; } } | |
public AmountsUnusedAmountsRec this[int i] | |
{ | |
get | |
{ | |
if (i >= 0 && i < recList.Count) | |
return (AmountsUnusedAmountsRec) recList[i]; | |
throw new DBPortalException("AmountsUnusedAmounts index out of range"); | |
} | |
set | |
{ | |
if (i < recList.Count) | |
recList.RemoveAt(i); | |
recList.Insert(i, value); | |
} | |
} | |
public void Clear() | |
{ | |
recList = new ArrayList(); | |
rec = new AmountsUnusedAmountsRec(); | |
} | |
public AmountsUnusedAmounts() | |
{ | |
Clear(); | |
} | |
private string unusedAmountsCommand | |
{ | |
get {return | |
"Select AmtSeqNo, " | |
+ "Amt, " | |
+ "RandAmt, " | |
+ "CatCde " | |
+ "From Amounts " | |
+ "Where BopDataSeqNo = " | |
+ "{0} " | |
+ "And not AmtSeqNo in " + rec.UsedList + " " | |
;} | |
} | |
private Cursor unusedAmountsCursor; | |
public void UnusedAmounts(Connect connect) | |
{ | |
unusedAmountsCursor = new Cursor(connect); | |
// format command to change {n} to ?, @Pn or :Pn placeholders depending on Vendor | |
unusedAmountsCursor.Format(unusedAmountsCommand, 1); | |
unusedAmountsCursor.Parameter(0, rec.BopDataSeqNo, false); | |
unusedAmountsCursor.Run(); | |
} | |
public bool UnusedAmountsFetch() | |
{ | |
bool result = (unusedAmountsCursor.HasReader() && unusedAmountsCursor.Read()); | |
if (result == true) | |
{ | |
rec.AmtSeqNo = (int)unusedAmountsCursor.GetInt(0); | |
rec.Amt = (double)unusedAmountsCursor.GetDouble(1); | |
rec.RandAmt = (double)unusedAmountsCursor.GetDouble(2); | |
rec.CatCde = (string)unusedAmountsCursor.GetString(3); | |
} | |
else if (unusedAmountsCursor.HasReader()) | |
unusedAmountsCursor.Close(); | |
return result; | |
} | |
public void UnusedAmountsLoad(Connect connect) | |
{ | |
if (recList.Count > 0) | |
Clear(); | |
UnusedAmounts(connect); | |
while (UnusedAmountsFetch()) | |
{ | |
recList.Add(rec); | |
rec = new AmountsUnusedAmountsRec(); | |
} | |
} | |
public AmountsUnusedAmountsDataTable UnusedAmountsDataTable() | |
{ | |
AmountsUnusedAmountsDataTable result = new AmountsUnusedAmountsDataTable(recList); | |
return result; | |
} | |
public AmountsUnusedAmountsDataTable UnusedAmountsDataTable(Connect connect) | |
{ | |
UnusedAmountsLoad(connect); | |
return UnusedAmountsDataTable(); | |
} | |
} | |
[Serializable()] | |
public class AmountsCountByBopDataSeqNo | |
{ | |
private AmountsCountByBopDataSeqNoRec rec; | |
public AmountsCountByBopDataSeqNoRec Rec {get {return rec;} set {rec = value;} } | |
public void Clear() | |
{ | |
rec = new AmountsCountByBopDataSeqNoRec(); | |
} | |
public AmountsCountByBopDataSeqNo() | |
{ | |
Clear(); | |
} | |
private string countByBopDataSeqNoCommand | |
{ | |
get {return | |
"SELECT " | |
+ "count ( * ) " | |
+ "FROM " | |
+ "Amounts " | |
+ "Where " | |
+ "BopDataSeqNo = " | |
+ "{0} " | |
;} | |
} | |
public bool CountByBopDataSeqNo(Connect connect) | |
{ | |
Cursor countByBopDataSeqNoCursor = new Cursor(connect); | |
// format command to change {n} to ?, @Pn or :Pn placeholders depending on Vendor | |
countByBopDataSeqNoCursor.Format(countByBopDataSeqNoCommand, 1); | |
countByBopDataSeqNoCursor.Parameter(0, rec.BopDataSeqNo, false); | |
countByBopDataSeqNoCursor.Run(); | |
bool result = (countByBopDataSeqNoCursor.HasReader() && countByBopDataSeqNoCursor.Read()); | |
if (result == true) | |
{ | |
rec.AmtCount = (int)countByBopDataSeqNoCursor.GetInt(0); | |
} | |
if (countByBopDataSeqNoCursor.HasReader()) | |
countByBopDataSeqNoCursor.Close(); | |
return result; | |
} | |
} | |
[Serializable()] | |
public class AmountsGetByBopDataSeqNoDataTable : DataTable | |
{ | |
public const int cBopDataSeqNo = 0; | |
public const int cAmtSeqNo = 1; | |
public static string ToString(int ordinal) | |
{ | |
switch (ordinal) | |
{ | |
case cBopDataSeqNo: return "BopDataSeqNo"; | |
case cAmtSeqNo: return "AmtSeqNo"; | |
} | |
return "<["+ordinal+"]>"; | |
} | |
public AmountsGetByBopDataSeqNoDataTable(ArrayList list) | |
: base("AmountsGetByBopDataSeqNo") | |
{ | |
Columns.Add(new DataColumn("BopDataSeqNo", typeof(Int32))); | |
Columns.Add(new DataColumn("AmtSeqNo", typeof(Int32))); | |
foreach (AmountsGetByBopDataSeqNoRec rec in list) | |
{ | |
DataRow row = NewRow(); | |
row[cBopDataSeqNo] = rec.BopDataSeqNo; | |
row[cAmtSeqNo] = rec.AmtSeqNo; | |
Rows.Add(row); | |
} | |
} | |
public AmountsGetByBopDataSeqNoRec this[int i] | |
{ | |
get | |
{ | |
DataRow row = Rows[i]; | |
AmountsGetByBopDataSeqNoRec rec = new AmountsGetByBopDataSeqNoRec(); | |
rec.BopDataSeqNo = (int)row[cBopDataSeqNo]; | |
rec.AmtSeqNo = (int)row[cAmtSeqNo]; | |
return rec; | |
} | |
set | |
{ | |
DataRow row = Rows[i]; | |
row[cBopDataSeqNo] = value.BopDataSeqNo; | |
row[cAmtSeqNo] = value.AmtSeqNo; | |
} | |
} | |
} | |
[Serializable()] | |
public class AmountsGetByBopDataSeqNo | |
{ | |
private AmountsGetByBopDataSeqNoRec rec; | |
public AmountsGetByBopDataSeqNoRec Rec {get {return rec;} set {rec = value;} } | |
private ArrayList recList; | |
public ArrayList RecList { get { return recList; } } | |
public int Count { get { return recList.Count; } } | |
public AmountsGetByBopDataSeqNoRec this[int i] | |
{ | |
get | |
{ | |
if (i >= 0 && i < recList.Count) | |
return (AmountsGetByBopDataSeqNoRec) recList[i]; | |
throw new DBPortalException("AmountsGetByBopDataSeqNo index out of range"); | |
} | |
set | |
{ | |
if (i < recList.Count) | |
recList.RemoveAt(i); | |
recList.Insert(i, value); | |
} | |
} | |
public void Clear() | |
{ | |
recList = new ArrayList(); | |
rec = new AmountsGetByBopDataSeqNoRec(); | |
} | |
public AmountsGetByBopDataSeqNo() | |
{ | |
Clear(); | |
} | |
private string getByBopDataSeqNoCommand | |
{ | |
get {return | |
"SELECT " | |
+ "AmtSeqNo " | |
+ "FROM " | |
+ "Amounts " | |
+ "Where " | |
+ "BopDataSeqNo = " | |
+ "{0} " | |
;} | |
} | |
private Cursor getByBopDataSeqNoCursor; | |
public void GetByBopDataSeqNo(Connect connect) | |
{ | |
getByBopDataSeqNoCursor = new Cursor(connect); | |
// format command to change {n} to ?, @Pn or :Pn placeholders depending on Vendor | |
getByBopDataSeqNoCursor.Format(getByBopDataSeqNoCommand, 1); | |
getByBopDataSeqNoCursor.Parameter(0, rec.BopDataSeqNo, false); | |
getByBopDataSeqNoCursor.Run(); | |
} | |
public bool GetByBopDataSeqNoFetch() | |
{ | |
bool result = (getByBopDataSeqNoCursor.HasReader() && getByBopDataSeqNoCursor.Read()); | |
if (result == true) | |
{ | |
rec.AmtSeqNo = (int)getByBopDataSeqNoCursor.GetInt(0); | |
} | |
else if (getByBopDataSeqNoCursor.HasReader()) | |
getByBopDataSeqNoCursor.Close(); | |
return result; | |
} | |
public void GetByBopDataSeqNoLoad(Connect connect) | |
{ | |
if (recList.Count > 0) | |
Clear(); | |
GetByBopDataSeqNo(connect); | |
while (GetByBopDataSeqNoFetch()) | |
{ | |
recList.Add(rec); | |
rec = new AmountsGetByBopDataSeqNoRec(); | |
} | |
} | |
public AmountsGetByBopDataSeqNoDataTable GetByBopDataSeqNoDataTable() | |
{ | |
AmountsGetByBopDataSeqNoDataTable result = new AmountsGetByBopDataSeqNoDataTable(recList); | |
return result; | |
} | |
public AmountsGetByBopDataSeqNoDataTable GetByBopDataSeqNoDataTable(Connect connect) | |
{ | |
GetByBopDataSeqNoLoad(connect); | |
return GetByBopDataSeqNoDataTable(); | |
} | |
} | |
[Serializable()] | |
public class AmountsDeleteByBopDataSeqNo | |
{ | |
private AmountsDeleteByBopDataSeqNoRec rec; | |
public AmountsDeleteByBopDataSeqNoRec Rec {get {return rec;} set {rec = value;} } | |
public void Clear() | |
{ | |
rec = new AmountsDeleteByBopDataSeqNoRec(); | |
} | |
public AmountsDeleteByBopDataSeqNo() | |
{ | |
Clear(); | |
} | |
private string deleteByBopDataSeqNoCommand | |
{ | |
get {return | |
"DELETE " | |
+ "FROM " | |
+ "Amounts " | |
+ "Where " | |
+ "BopDataSeqNo = " | |
+ "{0} " | |
;} | |
} | |
public void DeleteByBopDataSeqNo(Connect connect) | |
{ | |
Cursor deleteByBopDataSeqNoCursor = new Cursor(connect); | |
// format command to change {n} to ?, @Pn or :Pn placeholders depending on Vendor | |
deleteByBopDataSeqNoCursor.Format(deleteByBopDataSeqNoCommand, 1); | |
deleteByBopDataSeqNoCursor.Parameter(0, rec.BopDataSeqNo, false); | |
deleteByBopDataSeqNoCursor.Exec(); | |
} | |
} | |
[Serializable()] | |
public class AmountsIsReportable | |
{ | |
private AmountsIsReportableRec rec; | |
public AmountsIsReportableRec Rec {get {return rec;} set {rec = value;} } | |
public void Clear() | |
{ | |
rec = new AmountsIsReportableRec(); | |
} | |
public AmountsIsReportable() | |
{ | |
Clear(); | |
} | |
private string isReportableCommand | |
{ | |
get {return | |
"SELECT count( * ) " | |
+ "FROM Amounts " | |
+ "WHERE BopDataSeqNo = " | |
+ "{0} " | |
+ "AND CatQual = " | |
+ "{1} " | |
;} | |
} | |
public bool IsReportable(Connect connect) | |
{ | |
Cursor isReportableCursor = new Cursor(connect); | |
// format command to change {n} to ?, @Pn or :Pn placeholders depending on Vendor | |
isReportableCursor.Format(isReportableCommand, 2); | |
isReportableCursor.Parameter(0, rec.BopDataSeqNo, false); | |
isReportableCursor.Parameter(1, rec.ReportableCatQual, false); | |
isReportableCursor.Run(); | |
bool result = (isReportableCursor.HasReader() && isReportableCursor.Read()); | |
if (result == true) | |
{ | |
rec.QualCount = (int)isReportableCursor.GetInt(0); | |
} | |
if (isReportableCursor.HasReader()) | |
isReportableCursor.Close(); | |
return result; | |
} | |
} | |
[Serializable()] | |
public class AmountsBopDexGetXmlReportDetailsDataTable : DataTable | |
{ | |
public const int cBopDataSeqNo = 0; | |
public const int cAmtSeqNo = 1; | |
public const int cRandAmt = 2; | |
public const int cAmt = 3; | |
public const int cExConNo = 4; | |
public const int cImpConNo = 5; | |
public const int cSARBAuthNo = 6; | |
public const int cCatCde = 7; | |
public const int cCatQual = 8; | |
public const int cOrigRef = 9; | |
public const int cCannotCat = 10; | |
public const int cSARBLoanRef = 11; | |
public const int cLocCtry = 12; | |
public const int cLocQualCde = 13; | |
public const int cLQDescription = 14; | |
public const int cAccType = 15; | |
public const int cAccTypDescription = 16; | |
public const int cOrigAccNo = 17; | |
public const int cRecAccNo = 18; | |
public const int cPymntType = 19; | |
public const int cPTDescription = 20; | |
public const int cReasonCde = 21; | |
public const int cZZReason = 22; | |
public const int cCustomsClientNumber = 23; | |
public static string ToString(int ordinal) | |
{ | |
switch (ordinal) | |
{ | |
case cBopDataSeqNo: return "BopDataSeqNo"; | |
case cAmtSeqNo: return "AmtSeqNo"; | |
case cRandAmt: return "RandAmt"; | |
case cAmt: return "Amt"; | |
case cExConNo: return "ExConNo"; | |
case cImpConNo: return "ImpConNo"; | |
case cSARBAuthNo: return "SARBAuthNo"; | |
case cCatCde: return "CatCde"; | |
case cCatQual: return "CatQual"; | |
case cOrigRef: return "OrigRef"; | |
case cCannotCat: return "CannotCat"; | |
case cSARBLoanRef: return "SARBLoanRef"; | |
case cLocCtry: return "LocCtry"; | |
case cLocQualCde: return "LocQualCde"; | |
case cLQDescription: return "LQDescription"; | |
case cAccType: return "AccType"; | |
case cAccTypDescription: return "AccTypDescription"; | |
case cOrigAccNo: return "OrigAccNo"; | |
case cRecAccNo: return "RecAccNo"; | |
case cPymntType: return "PymntType"; | |
case cPTDescription: return "PTDescription"; | |
case cReasonCde: return "ReasonCde"; | |
case cZZReason: return "ZZReason"; | |
case cCustomsClientNumber: return "CustomsClientNumber"; | |
} | |
return "<["+ordinal+"]>"; | |
} | |
public AmountsBopDexGetXmlReportDetailsDataTable(ArrayList list) | |
: base("AmountsBopDexGetXmlReportDetails") | |
{ | |
Columns.Add(new DataColumn("BopDataSeqNo", typeof(Int32))); | |
Columns.Add(new DataColumn("AmtSeqNo", typeof(Int32))); | |
Columns.Add(new DataColumn("RandAmt", typeof(Double))); | |
Columns.Add(new DataColumn("Amt", typeof(Double))); | |
Columns.Add(new DataColumn("ExConNo", typeof(String))); | |
Columns.Add(new DataColumn("ImpConNo", typeof(String))); | |
Columns.Add(new DataColumn("SARBAuthNo", typeof(String))); | |
Columns.Add(new DataColumn("CatCde", typeof(String))); | |
Columns.Add(new DataColumn("CatQual", typeof(String))); | |
Columns.Add(new DataColumn("OrigRef", typeof(String))); | |
Columns.Add(new DataColumn("CannotCat", typeof(String))); | |
Columns.Add(new DataColumn("SARBLoanRef", typeof(String))); | |
Columns.Add(new DataColumn("LocCtry", typeof(String))); | |
Columns.Add(new DataColumn("LocQualCde", typeof(String))); | |
Columns.Add(new DataColumn("LQDescription", typeof(String))); | |
Columns.Add(new DataColumn("AccType", typeof(String))); | |
Columns.Add(new DataColumn("AccTypDescription", typeof(String))); | |
Columns.Add(new DataColumn("OrigAccNo", typeof(String))); | |
Columns.Add(new DataColumn("RecAccNo", typeof(String))); | |
Columns.Add(new DataColumn("PymntType", typeof(String))); | |
Columns.Add(new DataColumn("PTDescription", typeof(String))); | |
Columns.Add(new DataColumn("ReasonCde", typeof(String))); | |
Columns.Add(new DataColumn("ZZReason", typeof(String))); | |
Columns.Add(new DataColumn("CustomsClientNumber", typeof(String))); | |
foreach (AmountsBopDexGetXmlReportDetailsRec rec in list) | |
{ | |
DataRow row = NewRow(); | |
row[cBopDataSeqNo] = rec.BopDataSeqNo; | |
row[cAmtSeqNo] = rec.AmtSeqNo; | |
row[cRandAmt] = rec.RandAmt; | |
row[cAmt] = rec.Amt; | |
row[cExConNo] = rec.ExConNo; | |
row[cImpConNo] = rec.ImpConNo; | |
row[cSARBAuthNo] = rec.SARBAuthNo; | |
row[cCatCde] = rec.CatCde; | |
row[cCatQual] = rec.CatQual; | |
row[cOrigRef] = rec.OrigRef; | |
row[cCannotCat] = rec.CannotCat; | |
row[cSARBLoanRef] = rec.SARBLoanRef; | |
row[cLocCtry] = rec.LocCtry; | |
row[cLocQualCde] = rec.LocQualCde; | |
row[cLQDescription] = rec.LQDescription; | |
row[cAccType] = rec.AccType; | |
row[cAccTypDescription] = rec.AccTypDescription; | |
row[cOrigAccNo] = rec.OrigAccNo; | |
row[cRecAccNo] = rec.RecAccNo; | |
row[cPymntType] = rec.PymntType; | |
row[cPTDescription] = rec.PTDescription; | |
row[cReasonCde] = rec.ReasonCde; | |
row[cZZReason] = rec.ZZReason; | |
row[cCustomsClientNumber] = rec.CustomsClientNumber; | |
Rows.Add(row); | |
} | |
} | |
public AmountsBopDexGetXmlReportDetailsRec this[int i] | |
{ | |
get | |
{ | |
DataRow row = Rows[i]; | |
AmountsBopDexGetXmlReportDetailsRec rec = new AmountsBopDexGetXmlReportDetailsRec(); | |
rec.BopDataSeqNo = (int)row[cBopDataSeqNo]; | |
rec.AmtSeqNo = (int)row[cAmtSeqNo]; | |
rec.RandAmt = (double)row[cRandAmt]; | |
rec.Amt = (double)row[cAmt]; | |
rec.ExConNo = (string)row[cExConNo]; | |
rec.ImpConNo = (string)row[cImpConNo]; | |
rec.SARBAuthNo = (string)row[cSARBAuthNo]; | |
rec.CatCde = (string)row[cCatCde]; | |
rec.CatQual = (string)row[cCatQual]; | |
rec.OrigRef = (string)row[cOrigRef]; | |
rec.CannotCat = (string)row[cCannotCat]; | |
rec.SARBLoanRef = (string)row[cSARBLoanRef]; | |
rec.LocCtry = (string)row[cLocCtry]; | |
rec.LocQualCde = (string)row[cLocQualCde]; | |
rec.LQDescription = (string)row[cLQDescription]; | |
rec.AccType = (string)row[cAccType]; | |
rec.AccTypDescription = (string)row[cAccTypDescription]; | |
rec.OrigAccNo = (string)row[cOrigAccNo]; | |
rec.RecAccNo = (string)row[cRecAccNo]; | |
rec.PymntType = (string)row[cPymntType]; | |
rec.PTDescription = (string)row[cPTDescription]; | |
rec.ReasonCde = (string)row[cReasonCde]; | |
rec.ZZReason = (string)row[cZZReason]; | |
rec.CustomsClientNumber = (string)row[cCustomsClientNumber]; | |
return rec; | |
} | |
set | |
{ | |
DataRow row = Rows[i]; | |
row[cBopDataSeqNo] = value.BopDataSeqNo; | |
row[cAmtSeqNo] = value.AmtSeqNo; | |
row[cRandAmt] = value.RandAmt; | |
row[cAmt] = value.Amt; | |
row[cExConNo] = value.ExConNo; | |
row[cImpConNo] = value.ImpConNo; | |
row[cSARBAuthNo] = value.SARBAuthNo; | |
row[cCatCde] = value.CatCde; | |
row[cCatQual] = value.CatQual; | |
row[cOrigRef] = value.OrigRef; | |
row[cCannotCat] = value.CannotCat; | |
row[cSARBLoanRef] = value.SARBLoanRef; | |
row[cLocCtry] = value.LocCtry; | |
row[cLocQualCde] = value.LocQualCde; | |
row[cLQDescription] = value.LQDescription; | |
row[cAccType] = value.AccType; | |
row[cAccTypDescription] = value.AccTypDescription; | |
row[cOrigAccNo] = value.OrigAccNo; | |
row[cRecAccNo] = value.RecAccNo; | |
row[cPymntType] = value.PymntType; | |
row[cPTDescription] = value.PTDescription; | |
row[cReasonCde] = value.ReasonCde; | |
row[cZZReason] = value.ZZReason; | |
row[cCustomsClientNumber] = value.CustomsClientNumber; | |
} | |
} | |
} | |
[Serializable()] | |
public class AmountsBopDexGetXmlReportDetails | |
{ | |
private AmountsBopDexGetXmlReportDetailsRec rec; | |
public AmountsBopDexGetXmlReportDetailsRec Rec {get {return rec;} set {rec = value;} } | |
private ArrayList recList; | |
public ArrayList RecList { get { return recList; } } | |
public int Count { get { return recList.Count; } } | |
public AmountsBopDexGetXmlReportDetailsRec this[int i] | |
{ | |
get | |
{ | |
if (i >= 0 && i < recList.Count) | |
return (AmountsBopDexGetXmlReportDetailsRec) recList[i]; | |
throw new DBPortalException("AmountsBopDexGetXmlReportDetails index out of range"); | |
} | |
set | |
{ | |
if (i < recList.Count) | |
recList.RemoveAt(i); | |
recList.Insert(i, value); | |
} | |
} | |
public void Clear() | |
{ | |
recList = new ArrayList(); | |
rec = new AmountsBopDexGetXmlReportDetailsRec(); | |
} | |
public AmountsBopDexGetXmlReportDetails() | |
{ | |
Clear(); | |
} | |
private string bopDexGetXmlReportDetailsCommand | |
{ | |
get {return | |
"SELECT " | |
+ "amt.AmtSeqNo, " | |
+ "amt.BopDataSeqNo, " | |
+ "amt.RandAmt, " | |
+ "amt.Amt, " | |
+ "amt.ExConNo, " | |
+ "amt.ImpConNo, " | |
+ "amt.SARBAuthNo, " | |
+ "amt.CatCde, " | |
+ "amt.CatQual, " | |
+ "amt.OrigRef, " | |
+ "amt.CannotCat, " | |
+ "amt.SARBLoanRef, " | |
+ "amt.LocCtry, " | |
+ "amt.LocQualCde, lq.LQDescription, " | |
+ "amt.AccType, ac.Description, " | |
+ "amt.OrigAccNo, " | |
+ "amt.RecAccNo, " | |
+ "amt.PymntType, pt.Description, " | |
+ "amt.ReasonCde, " | |
+ "amt.ZZReason, " | |
+ "amt.CustomsClientNumber " | |
+ "FROM " | |
+ "Amounts amt, AccType ac, LocQual lq, PaymentType pt " | |
+ "WHERE " | |
+ "BopDataSeqNo = " | |
+ "{0} " | |
+ "AND " | |
+ "amt.acctype = ac.acctype " | |
+ "AND " | |
+ "amt.LocQualCde = lq.LocQualCde " | |
+ "AND " | |
+ "pt.PymntType = amt.PymntType " | |
;} | |
} | |
private Cursor bopDexGetXmlReportDetailsCursor; | |
public void BopDexGetXmlReportDetails(Connect connect) | |
{ | |
bopDexGetXmlReportDetailsCursor = new Cursor(connect); | |
// format command to change {n} to ?, @Pn or :Pn placeholders depending on Vendor | |
bopDexGetXmlReportDetailsCursor.Format(bopDexGetXmlReportDetailsCommand, 1); | |
bopDexGetXmlReportDetailsCursor.Parameter(0, rec.BopDataSeqNo, true); | |
bopDexGetXmlReportDetailsCursor.Run(); | |
rec.BopDataSeqNo = (int) bopDexGetXmlReportDetailsCursor[0]; | |
} | |
public bool BopDexGetXmlReportDetailsFetch() | |
{ | |
bool result = (bopDexGetXmlReportDetailsCursor.HasReader() && bopDexGetXmlReportDetailsCursor.Read()); | |
if (result == true) | |
{ | |
rec.BopDataSeqNo = (int)bopDexGetXmlReportDetailsCursor.GetInt(0); | |
rec.AmtSeqNo = (int)bopDexGetXmlReportDetailsCursor.GetInt(1); | |
rec.RandAmt = (double)bopDexGetXmlReportDetailsCursor.GetDouble(2); | |
rec.Amt = (double)bopDexGetXmlReportDetailsCursor.GetDouble(3); | |
rec.ExConNo = (string)bopDexGetXmlReportDetailsCursor.GetString(4); | |
rec.ImpConNo = (string)bopDexGetXmlReportDetailsCursor.GetString(5); | |
rec.SARBAuthNo = (string)bopDexGetXmlReportDetailsCursor.GetString(6); | |
rec.CatCde = (string)bopDexGetXmlReportDetailsCursor.GetString(7); | |
rec.CatQual = (string)bopDexGetXmlReportDetailsCursor.GetString(8); | |
rec.OrigRef = (string)bopDexGetXmlReportDetailsCursor.GetString(9); | |
rec.CannotCat = (string)bopDexGetXmlReportDetailsCursor.GetString(10); | |
rec.SARBLoanRef = (string)bopDexGetXmlReportDetailsCursor.GetString(11); | |
rec.LocCtry = (string)bopDexGetXmlReportDetailsCursor.GetString(12); | |
rec.LocQualCde = (string)bopDexGetXmlReportDetailsCursor.GetString(13); | |
rec.LQDescription = (string)bopDexGetXmlReportDetailsCursor.GetString(14); | |
rec.AccType = (string)bopDexGetXmlReportDetailsCursor.GetString(15); | |
rec.AccTypDescription = (string)bopDexGetXmlReportDetailsCursor.GetString(16); | |
rec.OrigAccNo = (string)bopDexGetXmlReportDetailsCursor.GetString(17); | |
rec.RecAccNo = (string)bopDexGetXmlReportDetailsCursor.GetString(18); | |
rec.PymntType = (string)bopDexGetXmlReportDetailsCursor.GetString(19); | |
rec.PTDescription = (string)bopDexGetXmlReportDetailsCursor.GetString(20); | |
rec.ReasonCde = (string)bopDexGetXmlReportDetailsCursor.GetString(21); | |
rec.ZZReason = (string)bopDexGetXmlReportDetailsCursor.GetString(22); | |
rec.CustomsClientNumber = (string)bopDexGetXmlReportDetailsCursor.GetString(23); | |
} | |
else if (bopDexGetXmlReportDetailsCursor.HasReader()) | |
bopDexGetXmlReportDetailsCursor.Close(); | |
return result; | |
} | |
public void BopDexGetXmlReportDetailsLoad(Connect connect) | |
{ | |
if (recList.Count > 0) | |
Clear(); | |
BopDexGetXmlReportDetails(connect); | |
while (BopDexGetXmlReportDetailsFetch()) | |
{ | |
recList.Add(rec); | |
rec = new AmountsBopDexGetXmlReportDetailsRec(); | |
} | |
} | |
public AmountsBopDexGetXmlReportDetailsDataTable BopDexGetXmlReportDetailsDataTable() | |
{ | |
AmountsBopDexGetXmlReportDetailsDataTable result = new AmountsBopDexGetXmlReportDetailsDataTable(recList); | |
return result; | |
} | |
public AmountsBopDexGetXmlReportDetailsDataTable BopDexGetXmlReportDetailsDataTable(Connect connect) | |
{ | |
BopDexGetXmlReportDetailsLoad(connect); | |
return BopDexGetXmlReportDetailsDataTable(); | |
} | |
} | |
[Serializable()] | |
public class AmountsGetBopdata2TransactionTotal | |
{ | |
private AmountsGetBopdata2TransactionTotalRec rec; | |
public AmountsGetBopdata2TransactionTotalRec Rec {get {return rec;} set {rec = value;} } | |
public void Clear() | |
{ | |
rec = new AmountsGetBopdata2TransactionTotalRec(); | |
} | |
public AmountsGetBopdata2TransactionTotal() | |
{ | |
Clear(); | |
} | |
private string getBopdata2TransactionTotalCommand | |
{ | |
get {return | |
"SELECT " | |
+ "sum(Amt) " | |
+ "FROM " | |
+ "amounts " | |
+ "WHERE " | |
+ "BopDataSeqNo = " | |
+ "{0} " | |
;} | |
} | |
public bool GetBopdata2TransactionTotal(Connect connect) | |
{ | |
Cursor getBopdata2TransactionTotalCursor = new Cursor(connect); | |
// format command to change {n} to ?, @Pn or :Pn placeholders depending on Vendor | |
getBopdata2TransactionTotalCursor.Format(getBopdata2TransactionTotalCommand, 1); | |
getBopdata2TransactionTotalCursor.Parameter(0, rec.BopDataSeqNo, false); | |
getBopdata2TransactionTotalCursor.Run(); | |
bool result = (getBopdata2TransactionTotalCursor.HasReader() && getBopdata2TransactionTotalCursor.Read()); | |
if (result == true) | |
{ | |
rec.AmtTotal = (double)getBopdata2TransactionTotalCursor.GetDouble(0); | |
} | |
if (getBopdata2TransactionTotalCursor.HasReader()) | |
getBopdata2TransactionTotalCursor.Close(); | |
return result; | |
} | |
} | |
[Serializable()] | |
public class AmountsGetSingleAmountsRecDataTable : DataTable | |
{ | |
public const int cBopDataSeqNo = 0; | |
public const int cAmtSeqNo = 1; | |
public const int cRandAmt = 2; | |
public const int cAmt = 3; | |
public const int cExConNo = 4; | |
public const int cImpConNo = 5; | |
public const int cSARBAuthNo = 6; | |
public const int cCatCde = 7; | |
public const int cCatQual = 8; | |
public const int cOrigRef = 9; | |
public const int cCannotCat = 10; | |
public const int cSARBLoanRef = 11; | |
public const int cLocCtry = 12; | |
public const int cLocQualCde = 13; | |
public const int cAccType = 14; | |
public const int cOrigAccNo = 15; | |
public const int cRecAccNo = 16; | |
public const int cPymntType = 17; | |
public const int cReasonCde = 18; | |
public const int cZZReason = 19; | |
public const int cInterestOnLoan = 20; | |
public const int cCustomsClientNumber = 21; | |
public static string ToString(int ordinal) | |
{ | |
switch (ordinal) | |
{ | |
case cBopDataSeqNo: return "BopDataSeqNo"; | |
case cAmtSeqNo: return "AmtSeqNo"; | |
case cRandAmt: return "RandAmt"; | |
case cAmt: return "Amt"; | |
case cExConNo: return "ExConNo"; | |
case cImpConNo: return "ImpConNo"; | |
case cSARBAuthNo: return "SARBAuthNo"; | |
case cCatCde: return "CatCde"; | |
case cCatQual: return "CatQual"; | |
case cOrigRef: return "OrigRef"; | |
case cCannotCat: return "CannotCat"; | |
case cSARBLoanRef: return "SARBLoanRef"; | |
case cLocCtry: return "LocCtry"; | |
case cLocQualCde: return "LocQualCde"; | |
case cAccType: return "AccType"; | |
case cOrigAccNo: return "OrigAccNo"; | |
case cRecAccNo: return "RecAccNo"; | |
case cPymntType: return "PymntType"; | |
case cReasonCde: return "ReasonCde"; | |
case cZZReason: return "ZZReason"; | |
case cInterestOnLoan: return "InterestOnLoan"; | |
case cCustomsClientNumber: return "CustomsClientNumber"; | |
} | |
return "<["+ordinal+"]>"; | |
} | |
public AmountsGetSingleAmountsRecDataTable(ArrayList list) | |
: base("AmountsGetSingleAmountsRec") | |
{ | |
Columns.Add(new DataColumn("BopDataSeqNo", typeof(Int32))); | |
Columns.Add(new DataColumn("AmtSeqNo", typeof(Int32))); | |
Columns.Add(new DataColumn("RandAmt", typeof(Double))); | |
Columns.Add(new DataColumn("Amt", typeof(Double))); | |
Columns.Add(new DataColumn("ExConNo", typeof(String))); | |
Columns.Add(new DataColumn("ImpConNo", typeof(String))); | |
Columns.Add(new DataColumn("SARBAuthNo", typeof(String))); | |
Columns.Add(new DataColumn("CatCde", typeof(String))); | |
Columns.Add(new DataColumn("CatQual", typeof(String))); | |
Columns.Add(new DataColumn("OrigRef", typeof(String))); | |
Columns.Add(new DataColumn("CannotCat", typeof(String))); | |
Columns.Add(new DataColumn("SARBLoanRef", typeof(String))); | |
Columns.Add(new DataColumn("LocCtry", typeof(String))); | |
Columns.Add(new DataColumn("LocQualCde", typeof(String))); | |
Columns.Add(new DataColumn("AccType", typeof(String))); | |
Columns.Add(new DataColumn("OrigAccNo", typeof(String))); | |
Columns.Add(new DataColumn("RecAccNo", typeof(String))); | |
Columns.Add(new DataColumn("PymntType", typeof(String))); | |
Columns.Add(new DataColumn("ReasonCde", typeof(String))); | |
Columns.Add(new DataColumn("ZZReason", typeof(String))); | |
Columns.Add(new DataColumn("InterestOnLoan", typeof(Int32))); | |
Columns.Add(new DataColumn("CustomsClientNumber", typeof(String))); | |
foreach (AmountsGetSingleAmountsRecRec rec in list) | |
{ | |
DataRow row = NewRow(); | |
row[cBopDataSeqNo] = rec.BopDataSeqNo; | |
row[cAmtSeqNo] = rec.AmtSeqNo; | |
row[cRandAmt] = rec.RandAmt; | |
row[cAmt] = rec.Amt; | |
row[cExConNo] = rec.ExConNo; | |
row[cImpConNo] = rec.ImpConNo; | |
row[cSARBAuthNo] = rec.SARBAuthNo; | |
row[cCatCde] = rec.CatCde; | |
row[cCatQual] = rec.CatQual; | |
row[cOrigRef] = rec.OrigRef; | |
row[cCannotCat] = rec.CannotCat; | |
row[cSARBLoanRef] = rec.SARBLoanRef; | |
row[cLocCtry] = rec.LocCtry; | |
row[cLocQualCde] = rec.LocQualCde; | |
row[cAccType] = rec.AccType; | |
row[cOrigAccNo] = rec.OrigAccNo; | |
row[cRecAccNo] = rec.RecAccNo; | |
row[cPymntType] = rec.PymntType; | |
row[cReasonCde] = rec.ReasonCde; | |
row[cZZReason] = rec.ZZReason; | |
row[cInterestOnLoan] = rec.InterestOnLoan; | |
row[cCustomsClientNumber] = rec.CustomsClientNumber; | |
Rows.Add(row); | |
} | |
} | |
public AmountsGetSingleAmountsRecRec this[int i] | |
{ | |
get | |
{ | |
DataRow row = Rows[i]; | |
AmountsGetSingleAmountsRecRec rec = new AmountsGetSingleAmountsRecRec(); | |
rec.BopDataSeqNo = (int)row[cBopDataSeqNo]; | |
rec.AmtSeqNo = (int)row[cAmtSeqNo]; | |
rec.RandAmt = (double)row[cRandAmt]; | |
rec.Amt = (double)row[cAmt]; | |
rec.ExConNo = (string)row[cExConNo]; | |
rec.ImpConNo = (string)row[cImpConNo]; | |
rec.SARBAuthNo = (string)row[cSARBAuthNo]; | |
rec.CatCde = (string)row[cCatCde]; | |
rec.CatQual = (string)row[cCatQual]; | |
rec.OrigRef = (string)row[cOrigRef]; | |
rec.CannotCat = (string)row[cCannotCat]; | |
rec.SARBLoanRef = (string)row[cSARBLoanRef]; | |
rec.LocCtry = (string)row[cLocCtry]; | |
rec.LocQualCde = (string)row[cLocQualCde]; | |
rec.AccType = (string)row[cAccType]; | |
rec.OrigAccNo = (string)row[cOrigAccNo]; | |
rec.RecAccNo = (string)row[cRecAccNo]; | |
rec.PymntType = (string)row[cPymntType]; | |
rec.ReasonCde = (string)row[cReasonCde]; | |
rec.ZZReason = (string)row[cZZReason]; | |
rec.InterestOnLoan = (int)row[cInterestOnLoan]; | |
rec.CustomsClientNumber = (string)row[cCustomsClientNumber]; | |
return rec; | |
} | |
set | |
{ | |
DataRow row = Rows[i]; | |
row[cBopDataSeqNo] = value.BopDataSeqNo; | |
row[cAmtSeqNo] = value.AmtSeqNo; | |
row[cRandAmt] = value.RandAmt; | |
row[cAmt] = value.Amt; | |
row[cExConNo] = value.ExConNo; | |
row[cImpConNo] = value.ImpConNo; | |
row[cSARBAuthNo] = value.SARBAuthNo; | |
row[cCatCde] = value.CatCde; | |
row[cCatQual] = value.CatQual; | |
row[cOrigRef] = value.OrigRef; | |
row[cCannotCat] = value.CannotCat; | |
row[cSARBLoanRef] = value.SARBLoanRef; | |
row[cLocCtry] = value.LocCtry; | |
row[cLocQualCde] = value.LocQualCde; | |
row[cAccType] = value.AccType; | |
row[cOrigAccNo] = value.OrigAccNo; | |
row[cRecAccNo] = value.RecAccNo; | |
row[cPymntType] = value.PymntType; | |
row[cReasonCde] = value.ReasonCde; | |
row[cZZReason] = value.ZZReason; | |
row[cInterestOnLoan] = value.InterestOnLoan; | |
row[cCustomsClientNumber] = value.CustomsClientNumber; | |
} | |
} | |
} | |
[Serializable()] | |
public class AmountsGetSingleAmountsRec | |
{ | |
private AmountsGetSingleAmountsRecRec rec; | |
public AmountsGetSingleAmountsRecRec Rec {get {return rec;} set {rec = value;} } | |
private ArrayList recList; | |
public ArrayList RecList { get { return recList; } } | |
public int Count { get { return recList.Count; } } | |
public AmountsGetSingleAmountsRecRec this[int i] | |
{ | |
get | |
{ | |
if (i >= 0 && i < recList.Count) | |
return (AmountsGetSingleAmountsRecRec) recList[i]; | |
throw new DBPortalException("AmountsGetSingleAmountsRec index out of range"); | |
} | |
set | |
{ | |
if (i < recList.Count) | |
recList.RemoveAt(i); | |
recList.Insert(i, value); | |
} | |
} | |
public void Clear() | |
{ | |
recList = new ArrayList(); | |
rec = new AmountsGetSingleAmountsRecRec(); | |
} | |
public AmountsGetSingleAmountsRec() | |
{ | |
Clear(); | |
} | |
private string getSingleAmountsRecCommand | |
{ | |
get {return | |
"SELECT " | |
+ "AmtSeqNo, " | |
+ "BopDataSeqNo, " | |
+ "RandAmt, " | |
+ "Amt, " | |
+ "ExConNo, " | |
+ "ImpConNo, " | |
+ "SARBAuthNo, " | |
+ "CatCde, " | |
+ "CatQual, " | |
+ "OrigRef, " | |
+ "CannotCat, " | |
+ "SARBLoanRef, " | |
+ "LocCtry, " | |
+ "LocQualCde, " | |
+ "AccType, " | |
+ "OrigAccNo, " | |
+ "RecAccNo, " | |
+ "PymntType, " | |
+ "ReasonCde, " | |
+ "ZZReason, " | |
+ "InterestOnLoan, " | |
+ "CustomsClientNumber " | |
+ "FROM " | |
+ "amounts " | |
+ "WHERE " | |
+ "BopDataSeqNo = " | |
+ "{0} " | |
+ "AND " | |
+ "rownum < 2 " | |
;} | |
} | |
private Cursor getSingleAmountsRecCursor; | |
public void GetSingleAmountsRec(Connect connect) | |
{ | |
getSingleAmountsRecCursor = new Cursor(connect); | |
// format command to change {n} to ?, @Pn or :Pn placeholders depending on Vendor | |
getSingleAmountsRecCursor.Format(getSingleAmountsRecCommand, 1); | |
getSingleAmountsRecCursor.Parameter(0, rec.BopDataSeqNo, true); | |
getSingleAmountsRecCursor.Run(); | |
rec.BopDataSeqNo = (int) getSingleAmountsRecCursor[0]; | |
} | |
public bool GetSingleAmountsRecFetch() | |
{ | |
bool result = (getSingleAmountsRecCursor.HasReader() && getSingleAmountsRecCursor.Read()); | |
if (result == true) | |
{ | |
rec.BopDataSeqNo = (int)getSingleAmountsRecCursor.GetInt(0); | |
rec.AmtSeqNo = (int)getSingleAmountsRecCursor.GetInt(1); | |
rec.RandAmt = (double)getSingleAmountsRecCursor.GetDouble(2); | |
rec.Amt = (double)getSingleAmountsRecCursor.GetDouble(3); | |
rec.ExConNo = (string)getSingleAmountsRecCursor.GetString(4); | |
rec.ImpConNo = (string)getSingleAmountsRecCursor.GetString(5); | |
rec.SARBAuthNo = (string)getSingleAmountsRecCursor.GetString(6); | |
rec.CatCde = (string)getSingleAmountsRecCursor.GetString(7); | |
rec.CatQual = (string)getSingleAmountsRecCursor.GetString(8); | |
rec.OrigRef = (string)getSingleAmountsRecCursor.GetString(9); | |
rec.CannotCat = (string)getSingleAmountsRecCursor.GetString(10); | |
rec.SARBLoanRef = (string)getSingleAmountsRecCursor.GetString(11); | |
rec.LocCtry = (string)getSingleAmountsRecCursor.GetString(12); | |
rec.LocQualCde = (string)getSingleAmountsRecCursor.GetString(13); | |
rec.AccType = (string)getSingleAmountsRecCursor.GetString(14); | |
rec.OrigAccNo = (string)getSingleAmountsRecCursor.GetString(15); | |
rec.RecAccNo = (string)getSingleAmountsRecCursor.GetString(16); | |
rec.PymntType = (string)getSingleAmountsRecCursor.GetString(17); | |
rec.ReasonCde = (string)getSingleAmountsRecCursor.GetString(18); | |
rec.ZZReason = (string)getSingleAmountsRecCursor.GetString(19); | |
rec.InterestOnLoan = (int)getSingleAmountsRecCursor.GetInt(20); | |
rec.CustomsClientNumber = (string)getSingleAmountsRecCursor.GetString(21); | |
} | |
else if (getSingleAmountsRecCursor.HasReader()) | |
getSingleAmountsRecCursor.Close(); | |
return result; | |
} | |
public void GetSingleAmountsRecLoad(Connect connect) | |
{ | |
if (recList.Count > 0) | |
Clear(); | |
GetSingleAmountsRec(connect); | |
while (GetSingleAmountsRecFetch()) | |
{ | |
recList.Add(rec); | |
rec = new AmountsGetSingleAmountsRecRec(); | |
} | |
} | |
public AmountsGetSingleAmountsRecDataTable GetSingleAmountsRecDataTable() | |
{ | |
AmountsGetSingleAmountsRecDataTable result = new AmountsGetSingleAmountsRecDataTable(recList); | |
return result; | |
} | |
public AmountsGetSingleAmountsRecDataTable GetSingleAmountsRecDataTable(Connect connect) | |
{ | |
GetSingleAmountsRecLoad(connect); | |
return GetSingleAmountsRecDataTable(); | |
} | |
} | |
[Serializable()] | |
public class AmountsGetAmountsDataTable : DataTable | |
{ | |
public const int cRunDateFrom = 0; | |
public const int cRunDateTo = 1; | |
public const int cAmtSeqNo = 2; | |
public const int cBopDataSeqNo = 3; | |
public const int cRandAmt = 4; | |
public const int cAmt = 5; | |
public const int cExConNo = 6; | |
public const int cImpConNo = 7; | |
public const int cSARBAuthNo = 8; | |
public const int cCatCde = 9; | |
public const int cCatQual = 10; | |
public const int cOrigRef = 11; | |
public const int cStatus = 12; | |
public const int cOrigSys = 13; | |
public const int cCannotCat = 14; | |
public const int cSARBLoanRef = 15; | |
public const int cLocCtry = 16; | |
public const int cLocQualCde = 17; | |
public const int cAccType = 18; | |
public const int cOrigAccNo = 19; | |
public const int cRecAccNo = 20; | |
public const int cPymntType = 21; | |
public const int cReasonCde = 22; | |
public const int cZZReason = 23; | |
public const int cInterestOnLoan = 24; | |
public const int cCustomsClientNumber = 25; | |
public const int cValueDate = 26; | |
public static string ToString(int ordinal) | |
{ | |
switch (ordinal) | |
{ | |
case cRunDateFrom: return "RunDateFrom"; | |
case cRunDateTo: return "RunDateTo"; | |
case cAmtSeqNo: return "AmtSeqNo"; | |
case cBopDataSeqNo: return "BopDataSeqNo"; | |
case cRandAmt: return "RandAmt"; | |
case cAmt: return "Amt"; | |
case cExConNo: return "ExConNo"; | |
case cImpConNo: return "ImpConNo"; | |
case cSARBAuthNo: return "SARBAuthNo"; | |
case cCatCde: return "CatCde"; | |
case cCatQual: return "CatQual"; | |
case cOrigRef: return "OrigRef"; | |
case cStatus: return "Status"; | |
case cOrigSys: return "OrigSys"; | |
case cCannotCat: return "CannotCat"; | |
case cSARBLoanRef: return "SARBLoanRef"; | |
case cLocCtry: return "LocCtry"; | |
case cLocQualCde: return "LocQualCde"; | |
case cAccType: return "AccType"; | |
case cOrigAccNo: return "OrigAccNo"; | |
case cRecAccNo: return "RecAccNo"; | |
case cPymntType: return "PymntType"; | |
case cReasonCde: return "ReasonCde"; | |
case cZZReason: return "ZZReason"; | |
case cInterestOnLoan: return "InterestOnLoan"; | |
case cCustomsClientNumber: return "CustomsClientNumber"; | |
case cValueDate: return "ValueDate"; | |
} | |
return "<["+ordinal+"]>"; | |
} | |
public AmountsGetAmountsDataTable(ArrayList list) | |
: base("AmountsGetAmounts") | |
{ | |
Columns.Add(new DataColumn("RunDateFrom", typeof(String))); | |
Columns.Add(new DataColumn("RunDateTo", typeof(String))); | |
Columns.Add(new DataColumn("AmtSeqNo", typeof(String))); | |
Columns.Add(new DataColumn("BopDataSeqNo", typeof(String))); | |
Columns.Add(new DataColumn("RandAmt", typeof(String))); | |
Columns.Add(new DataColumn("Amt", typeof(String))); | |
Columns.Add(new DataColumn("ExConNo", typeof(String))); | |
Columns.Add(new DataColumn("ImpConNo", typeof(String))); | |
Columns.Add(new DataColumn("SARBAuthNo", typeof(String))); | |
Columns.Add(new DataColumn("CatCde", typeof(String))); | |
Columns.Add(new DataColumn("CatQual", typeof(String))); | |
Columns.Add(new DataColumn("OrigRef", typeof(String))); | |
Columns.Add(new DataColumn("Status", typeof(String))); | |
Columns.Add(new DataColumn("OrigSys", typeof(String))); | |
Columns.Add(new DataColumn("CannotCat", typeof(String))); | |
Columns.Add(new DataColumn("SARBLoanRef", typeof(String))); | |
Columns.Add(new DataColumn("LocCtry", typeof(String))); | |
Columns.Add(new DataColumn("LocQualCde", typeof(String))); | |
Columns.Add(new DataColumn("AccType", typeof(String))); | |
Columns.Add(new DataColumn("OrigAccNo", typeof(String))); | |
Columns.Add(new DataColumn("RecAccNo", typeof(String))); | |
Columns.Add(new DataColumn("PymntType", typeof(String))); | |
Columns.Add(new DataColumn("ReasonCde", typeof(String))); | |
Columns.Add(new DataColumn("ZZReason", typeof(String))); | |
Columns.Add(new DataColumn("InterestOnLoan", typeof(String))); | |
Columns.Add(new DataColumn("CustomsClientNumber", typeof(String))); | |
Columns.Add(new DataColumn("ValueDate", typeof(String))); | |
foreach (AmountsGetAmountsRec rec in list) | |
{ | |
DataRow row = NewRow(); | |
row[cRunDateFrom] = rec.RunDateFrom; | |
row[cRunDateTo] = rec.RunDateTo; | |
row[cAmtSeqNo] = rec.AmtSeqNo; | |
row[cBopDataSeqNo] = rec.BopDataSeqNo; | |
row[cRandAmt] = rec.RandAmt; | |
row[cAmt] = rec.Amt; | |
row[cExConNo] = rec.ExConNo; | |
row[cImpConNo] = rec.ImpConNo; | |
row[cSARBAuthNo] = rec.SARBAuthNo; | |
row[cCatCde] = rec.CatCde; | |
row[cCatQual] = rec.CatQual; | |
row[cOrigRef] = rec.OrigRef; | |
row[cStatus] = rec.Status; | |
row[cOrigSys] = rec.OrigSys; | |
row[cCannotCat] = rec.CannotCat; | |
row[cSARBLoanRef] = rec.SARBLoanRef; | |
row[cLocCtry] = rec.LocCtry; | |
row[cLocQualCde] = rec.LocQualCde; | |
row[cAccType] = rec.AccType; | |
row[cOrigAccNo] = rec.OrigAccNo; | |
row[cRecAccNo] = rec.RecAccNo; | |
row[cPymntType] = rec.PymntType; | |
row[cReasonCde] = rec.ReasonCde; | |
row[cZZReason] = rec.ZZReason; | |
row[cInterestOnLoan] = rec.InterestOnLoan; | |
row[cCustomsClientNumber] = rec.CustomsClientNumber; | |
row[cValueDate] = rec.ValueDate; | |
Rows.Add(row); | |
} | |
} | |
public AmountsGetAmountsRec this[int i] | |
{ | |
get | |
{ | |
DataRow row = Rows[i]; | |
AmountsGetAmountsRec rec = new AmountsGetAmountsRec(); | |
rec.RunDateFrom = (string)row[cRunDateFrom]; | |
rec.RunDateTo = (string)row[cRunDateTo]; | |
rec.AmtSeqNo = (string)row[cAmtSeqNo]; | |
rec.BopDataSeqNo = (string)row[cBopDataSeqNo]; | |
rec.RandAmt = (string)row[cRandAmt]; | |
rec.Amt = (string)row[cAmt]; | |
rec.ExConNo = (string)row[cExConNo]; | |
rec.ImpConNo = (string)row[cImpConNo]; | |
rec.SARBAuthNo = (string)row[cSARBAuthNo]; | |
rec.CatCde = (string)row[cCatCde]; | |
rec.CatQual = (string)row[cCatQual]; | |
rec.OrigRef = (string)row[cOrigRef]; | |
rec.Status = (string)row[cStatus]; | |
rec.OrigSys = (string)row[cOrigSys]; | |
rec.CannotCat = (string)row[cCannotCat]; | |
rec.SARBLoanRef = (string)row[cSARBLoanRef]; | |
rec.LocCtry = (string)row[cLocCtry]; | |
rec.LocQualCde = (string)row[cLocQualCde]; | |
rec.AccType = (string)row[cAccType]; | |
rec.OrigAccNo = (string)row[cOrigAccNo]; | |
rec.RecAccNo = (string)row[cRecAccNo]; | |
rec.PymntType = (string)row[cPymntType]; | |
rec.ReasonCde = (string)row[cReasonCde]; | |
rec.ZZReason = (string)row[cZZReason]; | |
rec.InterestOnLoan = (string)row[cInterestOnLoan]; | |
rec.CustomsClientNumber = (string)row[cCustomsClientNumber]; | |
rec.ValueDate = (string)row[cValueDate]; | |
return rec; | |
} | |
set | |
{ | |
DataRow row = Rows[i]; | |
row[cRunDateFrom] = value.RunDateFrom; | |
row[cRunDateTo] = value.RunDateTo; | |
row[cAmtSeqNo] = value.AmtSeqNo; | |
row[cBopDataSeqNo] = value.BopDataSeqNo; | |
row[cRandAmt] = value.RandAmt; | |
row[cAmt] = value.Amt; | |
row[cExConNo] = value.ExConNo; | |
row[cImpConNo] = value.ImpConNo; | |
row[cSARBAuthNo] = value.SARBAuthNo; | |
row[cCatCde] = value.CatCde; | |
row[cCatQual] = value.CatQual; | |
row[cOrigRef] = value.OrigRef; | |
row[cStatus] = value.Status; | |
row[cOrigSys] = value.OrigSys; | |
row[cCannotCat] = value.CannotCat; | |
row[cSARBLoanRef] = value.SARBLoanRef; | |
row[cLocCtry] = value.LocCtry; | |
row[cLocQualCde] = value.LocQualCde; | |
row[cAccType] = value.AccType; | |
row[cOrigAccNo] = value.OrigAccNo; | |
row[cRecAccNo] = value.RecAccNo; | |
row[cPymntType] = value.PymntType; | |
row[cReasonCde] = value.ReasonCde; | |
row[cZZReason] = value.ZZReason; | |
row[cInterestOnLoan] = value.InterestOnLoan; | |
row[cCustomsClientNumber] = value.CustomsClientNumber; | |
row[cValueDate] = value.ValueDate; | |
} | |
} | |
} | |
[Serializable()] | |
public class AmountsGetAmounts | |
{ | |
private AmountsGetAmountsRec rec; | |
public AmountsGetAmountsRec Rec {get {return rec;} set {rec = value;} } | |
private ArrayList recList; | |
public ArrayList RecList { get { return recList; } } | |
public int Count { get { return recList.Count; } } | |
public AmountsGetAmountsRec this[int i] | |
{ | |
get | |
{ | |
return (AmountsGetAmountsRec) recList[i]; | |
} | |
set | |
{ | |
if (i < recList.Count) | |
recList.RemoveAt(i); | |
recList.Insert(i, value); | |
} | |
} | |
public void Clear() | |
{ | |
recList = new ArrayList(); | |
rec = new AmountsGetAmountsRec(); | |
} | |
public AmountsGetAmounts() | |
{ | |
Clear(); | |
} | |
private string getAmountsCommand | |
{ | |
get {return | |
"SELECT a.AmtSeqNo, TO_CHAR(a.BopDataSeqNo), TO_CHAR((a.RandAmt*100)), TO_CHAR((a.Amt*100)), " | |
+ "NVL(a.ExConNo,'^'), NVL(a.ImpConNo,'^'), NVL(a.SARBAuthNo,'^'), a.CatCde, " | |
+ "NVL(a.CatQual,'^'), NVL(a.OrigRef,'^'), b.Status, b.OrigSys, NVL(a.CannotCat,'^'), " | |
+ "NVL(a.SARBLoanRef,'^'), a.LocCtry, a.LocQualCde, a.AccType, NVL(a.OrigAccNo,'^'), " | |
+ "NVL(a.RecAccNo,'^'), NVL(a.PymntType,'^'), a.ReasonCde, NVL(a.ZZReason,'^'), " | |
+ "NVL2(a.InterestOnLoan,TO_CHAR(a.InterestOnLoan),'^'), " | |
+ "NVL(a.CustomsClientNumber,'^'), " | |
+ "NVL2(b.ValueDate,TO_CHAR(b.ValueDate, 'YYYYMMDD'),'^') " | |
+ "FROM amounts a, bopdata2 b " | |
+ "WHERE a.BopDataSeqNo = b.BopDataSeqNo " | |
+ "AND b.Status IN('CNF', 'ZZB', 'NOF', 'SNE', 'CNC', 'CNE') " | |
+ "AND (b.TmStamp >= TO_DATE( " | |
+ "{0} " | |
+ ", 'YYYYMMDDHH24MISS') " | |
+ "AND b.TmStamp <= TO_DATE( " | |
+ "{1} " | |
+ ", 'YYYYMMDDHH24MISS')) " | |
+ "ORDER BY a.BopDataSeqNo; " | |
;} | |
} | |
private Cursor getAmountsCursor; | |
public void GetAmounts(Connect connect) | |
{ | |
getAmountsCursor = new Cursor(connect); | |
// format command to change {n} to ?, @Pn or :Pn placeholders depending on Vendor | |
getAmountsCursor.Format(getAmountsCommand, 2); | |
getAmountsCursor.Parameter(0, rec.RunDateFrom, false); | |
getAmountsCursor.Parameter(1, rec.RunDateTo, false); | |
getAmountsCursor.Run(); | |
} | |
public bool GetAmountsFetch() | |
{ | |
bool result = (getAmountsCursor.HasReader() && getAmountsCursor.Read()); | |
if (result == true) | |
{ | |
rec.AmtSeqNo = (string)getAmountsCursor.GetString(0); | |
rec.BopDataSeqNo = (string)getAmountsCursor.GetString(1); | |
rec.RandAmt = (string)getAmountsCursor.GetString(2); | |
rec.Amt = (string)getAmountsCursor.GetString(3); | |
rec.ExConNo = (string)getAmountsCursor.GetString(4); | |
rec.ImpConNo = (string)getAmountsCursor.GetString(5); | |
rec.SARBAuthNo = (string)getAmountsCursor.GetString(6); | |
rec.CatCde = (string)getAmountsCursor.GetString(7); | |
rec.CatQual = (string)getAmountsCursor.GetString(8); | |
rec.OrigRef = (string)getAmountsCursor.GetString(9); | |
rec.Status = (string)getAmountsCursor.GetString(10); | |
rec.OrigSys = (string)getAmountsCursor.GetString(11); | |
rec.CannotCat = (string)getAmountsCursor.GetString(12); | |
rec.SARBLoanRef = (string)getAmountsCursor.GetString(13); | |
rec.LocCtry = (string)getAmountsCursor.GetString(14); | |
rec.LocQualCde = (string)getAmountsCursor.GetString(15); | |
rec.AccType = (string)getAmountsCursor.GetString(16); | |
rec.OrigAccNo = (string)getAmountsCursor.GetString(17); | |
rec.RecAccNo = (string)getAmountsCursor.GetString(18); | |
rec.PymntType = (string)getAmountsCursor.GetString(19); | |
rec.ReasonCde = (string)getAmountsCursor.GetString(20); | |
rec.ZZReason = (string)getAmountsCursor.GetString(21); | |
rec.InterestOnLoan = (string)getAmountsCursor.GetString(22); | |
rec.CustomsClientNumber = (string)getAmountsCursor.GetString(23); | |
rec.ValueDate = (string)getAmountsCursor.GetString(24); | |
} | |
else if (getAmountsCursor.HasReader()) | |
getAmountsCursor.Close(); | |
return result; | |
} | |
public void GetAmountsLoad(Connect connect) | |
{ | |
if (recList.Count > 0) | |
Clear(); | |
GetAmounts(connect); | |
while (GetAmountsFetch()) | |
{ | |
recList.Add(rec); | |
rec = new AmountsGetAmountsRec(); | |
} | |
} | |
public AmountsGetAmountsDataTable GetAmountsDataTable() | |
{ | |
AmountsGetAmountsDataTable result = new AmountsGetAmountsDataTable(recList); | |
return result; | |
} | |
public AmountsGetAmountsDataTable GetAmountsDataTable(Connect connect) | |
{ | |
GetAmountsLoad(connect); | |
return GetAmountsDataTable(); | |
} | |
} | |
[Serializable()] | |
public class AmountsGetAmountsCFCDataTable : DataTable | |
{ | |
public const int cRunDateFrom = 0; | |
public const int cRunDateTo = 1; | |
public const int cAmtSeqNo = 2; | |
public const int cBopDataSeqNo = 3; | |
public const int cRandAmt = 4; | |
public const int cAmt = 5; | |
public const int cExConNo = 6; | |
public const int cImpConNo = 7; | |
public const int cSARBAuthNo = 8; | |
public const int cCatCde = 9; | |
public const int cCatQual = 10; | |
public const int cOrigRef = 11; | |
public const int cStatus = 12; | |
public const int cOrigSys = 13; | |
public const int cCannotCat = 14; | |
public const int cSARBLoanRef = 15; | |
public const int cLocCtry = 16; | |
public const int cLocQualCde = 17; | |
public const int cAccType = 18; | |
public const int cOrigAccNo = 19; | |
public const int cRecAccNo = 20; | |
public const int cPymntType = 21; | |
public const int cReasonCde = 22; | |
public const int cZZReason = 23; | |
public const int cInterestOnLoan = 24; | |
public const int cOrigAccNoCfcCategory = 25; | |
public const int cRecAccNoCfcCategory = 26; | |
public const int cBopCatOverrideInd = 27; | |
public const int cBopCatOverrideReason = 28; | |
public const int cCustomsClientNumber = 29; | |
public const int cValueDate = 30; | |
public static string ToString(int ordinal) | |
{ | |
switch (ordinal) | |
{ | |
case cRunDateFrom: return "RunDateFrom"; | |
case cRunDateTo: return "RunDateTo"; | |
case cAmtSeqNo: return "AmtSeqNo"; | |
case cBopDataSeqNo: return "BopDataSeqNo"; | |
case cRandAmt: return "RandAmt"; | |
case cAmt: return "Amt"; | |
case cExConNo: return "ExConNo"; | |
case cImpConNo: return "ImpConNo"; | |
case cSARBAuthNo: return "SARBAuthNo"; | |
case cCatCde: return "CatCde"; | |
case cCatQual: return "CatQual"; | |
case cOrigRef: return "OrigRef"; | |
case cStatus: return "Status"; | |
case cOrigSys: return "OrigSys"; | |
case cCannotCat: return "CannotCat"; | |
case cSARBLoanRef: return "SARBLoanRef"; | |
case cLocCtry: return "LocCtry"; | |
case cLocQualCde: return "LocQualCde"; | |
case cAccType: return "AccType"; | |
case cOrigAccNo: return "OrigAccNo"; | |
case cRecAccNo: return "RecAccNo"; | |
case cPymntType: return "PymntType"; | |
case cReasonCde: return "ReasonCde"; | |
case cZZReason: return "ZZReason"; | |
case cInterestOnLoan: return "InterestOnLoan"; | |
case cOrigAccNoCfcCategory: return "OrigAccNoCfcCategory"; | |
case cRecAccNoCfcCategory: return "RecAccNoCfcCategory"; | |
case cBopCatOverrideInd: return "BopCatOverrideInd"; | |
case cBopCatOverrideReason: return "BopCatOverrideReason"; | |
case cCustomsClientNumber: return "CustomsClientNumber"; | |
case cValueDate: return "ValueDate"; | |
} | |
return "<["+ordinal+"]>"; | |
} | |
public AmountsGetAmountsCFCDataTable(ArrayList list) | |
: base("AmountsGetAmountsCFC") | |
{ | |
Columns.Add(new DataColumn("RunDateFrom", typeof(String))); | |
Columns.Add(new DataColumn("RunDateTo", typeof(String))); | |
Columns.Add(new DataColumn("AmtSeqNo", typeof(String))); | |
Columns.Add(new DataColumn("BopDataSeqNo", typeof(String))); | |
Columns.Add(new DataColumn("RandAmt", typeof(String))); | |
Columns.Add(new DataColumn("Amt", typeof(String))); | |
Columns.Add(new DataColumn("ExConNo", typeof(String))); | |
Columns.Add(new DataColumn("ImpConNo", typeof(String))); | |
Columns.Add(new DataColumn("SARBAuthNo", typeof(String))); | |
Columns.Add(new DataColumn("CatCde", typeof(String))); | |
Columns.Add(new DataColumn("CatQual", typeof(String))); | |
Columns.Add(new DataColumn("OrigRef", typeof(String))); | |
Columns.Add(new DataColumn("Status", typeof(String))); | |
Columns.Add(new DataColumn("OrigSys", typeof(String))); | |
Columns.Add(new DataColumn("CannotCat", typeof(String))); | |
Columns.Add(new DataColumn("SARBLoanRef", typeof(String))); | |
Columns.Add(new DataColumn("LocCtry", typeof(String))); | |
Columns.Add(new DataColumn("LocQualCde", typeof(String))); | |
Columns.Add(new DataColumn("AccType", typeof(String))); | |
Columns.Add(new DataColumn("OrigAccNo", typeof(String))); | |
Columns.Add(new DataColumn("RecAccNo", typeof(String))); | |
Columns.Add(new DataColumn("PymntType", typeof(String))); | |
Columns.Add(new DataColumn("ReasonCde", typeof(String))); | |
Columns.Add(new DataColumn("ZZReason", typeof(String))); | |
Columns.Add(new DataColumn("InterestOnLoan", typeof(String))); | |
Columns.Add(new DataColumn("OrigAccNoCfcCategory", typeof(String))); | |
Columns.Add(new DataColumn("RecAccNoCfcCategory", typeof(String))); | |
Columns.Add(new DataColumn("BopCatOverrideInd", typeof(String))); | |
Columns.Add(new DataColumn("BopCatOverrideReason", typeof(String))); | |
Columns.Add(new DataColumn("CustomsClientNumber", typeof(String))); | |
Columns.Add(new DataColumn("ValueDate", typeof(String))); | |
foreach (AmountsGetAmountsCFCRec rec in list) | |
{ | |
DataRow row = NewRow(); | |
row[cRunDateFrom] = rec.RunDateFrom; | |
row[cRunDateTo] = rec.RunDateTo; | |
row[cAmtSeqNo] = rec.AmtSeqNo; | |
row[cBopDataSeqNo] = rec.BopDataSeqNo; | |
row[cRandAmt] = rec.RandAmt; | |
row[cAmt] = rec.Amt; | |
row[cExConNo] = rec.ExConNo; | |
row[cImpConNo] = rec.ImpConNo; | |
row[cSARBAuthNo] = rec.SARBAuthNo; | |
row[cCatCde] = rec.CatCde; | |
row[cCatQual] = rec.CatQual; | |
row[cOrigRef] = rec.OrigRef; | |
row[cStatus] = rec.Status; | |
row[cOrigSys] = rec.OrigSys; | |
row[cCannotCat] = rec.CannotCat; | |
row[cSARBLoanRef] = rec.SARBLoanRef; | |
row[cLocCtry] = rec.LocCtry; | |
row[cLocQualCde] = rec.LocQualCde; | |
row[cAccType] = rec.AccType; | |
row[cOrigAccNo] = rec.OrigAccNo; | |
row[cRecAccNo] = rec.RecAccNo; | |
row[cPymntType] = rec.PymntType; | |
row[cReasonCde] = rec.ReasonCde; | |
row[cZZReason] = rec.ZZReason; | |
row[cInterestOnLoan] = rec.InterestOnLoan; | |
row[cOrigAccNoCfcCategory] = rec.OrigAccNoCfcCategory; | |
row[cRecAccNoCfcCategory] = rec.RecAccNoCfcCategory; | |
row[cBopCatOverrideInd] = rec.BopCatOverrideInd; | |
row[cBopCatOverrideReason] = rec.BopCatOverrideReason; | |
row[cCustomsClientNumber] = rec.CustomsClientNumber; | |
row[cValueDate] = rec.ValueDate; | |
Rows.Add(row); | |
} | |
} | |
public AmountsGetAmountsCFCRec this[int i] | |
{ | |
get | |
{ | |
DataRow row = Rows[i]; | |
AmountsGetAmountsCFCRec rec = new AmountsGetAmountsCFCRec(); | |
rec.RunDateFrom = (string)row[cRunDateFrom]; | |
rec.RunDateTo = (string)row[cRunDateTo]; | |
rec.AmtSeqNo = (string)row[cAmtSeqNo]; | |
rec.BopDataSeqNo = (string)row[cBopDataSeqNo]; | |
rec.RandAmt = (string)row[cRandAmt]; | |
rec.Amt = (string)row[cAmt]; | |
rec.ExConNo = (string)row[cExConNo]; | |
rec.ImpConNo = (string)row[cImpConNo]; | |
rec.SARBAuthNo = (string)row[cSARBAuthNo]; | |
rec.CatCde = (string)row[cCatCde]; | |
rec.CatQual = (string)row[cCatQual]; | |
rec.OrigRef = (string)row[cOrigRef]; | |
rec.Status = (string)row[cStatus]; | |
rec.OrigSys = (string)row[cOrigSys]; | |
rec.CannotCat = (string)row[cCannotCat]; | |
rec.SARBLoanRef = (string)row[cSARBLoanRef]; | |
rec.LocCtry = (string)row[cLocCtry]; | |
rec.LocQualCde = (string)row[cLocQualCde]; | |
rec.AccType = (string)row[cAccType]; | |
rec.OrigAccNo = (string)row[cOrigAccNo]; | |
rec.RecAccNo = (string)row[cRecAccNo]; | |
rec.PymntType = (string)row[cPymntType]; | |
rec.ReasonCde = (string)row[cReasonCde]; | |
rec.ZZReason = (string)row[cZZReason]; | |
rec.InterestOnLoan = (string)row[cInterestOnLoan]; | |
rec.OrigAccNoCfcCategory = (string)row[cOrigAccNoCfcCategory]; | |
rec.RecAccNoCfcCategory = (string)row[cRecAccNoCfcCategory]; | |
rec.BopCatOverrideInd = (string)row[cBopCatOverrideInd]; | |
rec.BopCatOverrideReason = (string)row[cBopCatOverrideReason]; | |
rec.CustomsClientNumber = (string)row[cCustomsClientNumber]; | |
rec.ValueDate = (string)row[cValueDate]; | |
return rec; | |
} | |
set | |
{ | |
DataRow row = Rows[i]; | |
row[cRunDateFrom] = value.RunDateFrom; | |
row[cRunDateTo] = value.RunDateTo; | |
row[cAmtSeqNo] = value.AmtSeqNo; | |
row[cBopDataSeqNo] = value.BopDataSeqNo; | |
row[cRandAmt] = value.RandAmt; | |
row[cAmt] = value.Amt; | |
row[cExConNo] = value.ExConNo; | |
row[cImpConNo] = value.ImpConNo; | |
row[cSARBAuthNo] = value.SARBAuthNo; | |
row[cCatCde] = value.CatCde; | |
row[cCatQual] = value.CatQual; | |
row[cOrigRef] = value.OrigRef; | |
row[cStatus] = value.Status; | |
row[cOrigSys] = value.OrigSys; | |
row[cCannotCat] = value.CannotCat; | |
row[cSARBLoanRef] = value.SARBLoanRef; | |
row[cLocCtry] = value.LocCtry; | |
row[cLocQualCde] = value.LocQualCde; | |
row[cAccType] = value.AccType; | |
row[cOrigAccNo] = value.OrigAccNo; | |
row[cRecAccNo] = value.RecAccNo; | |
row[cPymntType] = value.PymntType; | |
row[cReasonCde] = value.ReasonCde; | |
row[cZZReason] = value.ZZReason; | |
row[cInterestOnLoan] = value.InterestOnLoan; | |
row[cOrigAccNoCfcCategory] = value.OrigAccNoCfcCategory; | |
row[cRecAccNoCfcCategory] = value.RecAccNoCfcCategory; | |
row[cBopCatOverrideInd] = value.BopCatOverrideInd; | |
row[cBopCatOverrideReason] = value.BopCatOverrideReason; | |
row[cCustomsClientNumber] = value.CustomsClientNumber; | |
row[cValueDate] = value.ValueDate; | |
} | |
} | |
} | |
[Serializable()] | |
public class AmountsGetAmountsCFC | |
{ | |
private AmountsGetAmountsCFCRec rec; | |
public AmountsGetAmountsCFCRec Rec {get {return rec;} set {rec = value;} } | |
private ArrayList recList; | |
public ArrayList RecList { get { return recList; } } | |
public int Count { get { return recList.Count; } } | |
public AmountsGetAmountsCFCRec this[int i] | |
{ | |
get | |
{ | |
if (i >= 0 && i < recList.Count) | |
return (AmountsGetAmountsCFCRec) recList[i]; | |
throw new DBPortalException("AmountsGetAmountsCFC index out of range"); | |
} | |
set | |
{ | |
if (i < recList.Count) | |
recList.RemoveAt(i); | |
recList.Insert(i, value); | |
} | |
} | |
public void Clear() | |
{ | |
recList = new ArrayList(); | |
rec = new AmountsGetAmountsCFCRec(); | |
} | |
public AmountsGetAmountsCFC() | |
{ | |
Clear(); | |
} | |
private string getAmountsCFCCommand | |
{ | |
get {return | |
"SELECT " | |
+ "a.AmtSeqNo, " | |
+ "TO_CHAR(a.BopDataSeqNo), " | |
+ "TO_CHAR((a.RandAmt*100)), " | |
+ "TO_CHAR((a.Amt*100)), " | |
+ "a.ExConNo, " | |
+ "a.ImpConNo, " | |
+ "a.SARBAuthNo, " | |
+ "a.CatCde, " | |
+ "a.CatQual, " | |
+ "a.OrigRef, " | |
+ "b.Status, " | |
+ "b.OrigSys, " | |
+ "a.CannotCat, " | |
+ "a.SARBLoanRef, " | |
+ "a.LocCtry, " | |
+ "a.LocQualCde, " | |
+ "a.AccType, " | |
+ "a.OrigAccNo, " | |
+ "a.RecAccNo, " | |
+ "a.PymntType, " | |
+ "a.ReasonCde, " | |
+ "a.ZZReason, " | |
+ "TO_CHAR(a.InterestOnLoan), " | |
+ "a.OrigAccNoCfcCategory, " | |
+ "a.RecAccNoCfcCategory, " | |
+ "a.BopCatOverrideInd, " | |
+ "a.BopCatOverrideReason, " | |
+ "a.CustomsClientNumber, " | |
+ "TO_CHAR(b.ValueDate, 'YYYYMMDD') " | |
+ "FROM " | |
+ "amounts a, " | |
+ "bopdata2 b " | |
+ "WHERE " | |
+ "a.BopDataSeqNo = b.BopDataSeqNo " | |
+ "AND b.Status IN('CNF', 'ZZB', 'NOF', 'SNE', 'CNC', 'CNE') " | |
+ "AND (b.TmStamp >= TO_DATE( " | |
+ "{0} " | |
+ ", 'YYYYMMDDHH24MISS') " | |
+ "AND b.TmStamp <= TO_DATE( " | |
+ "{1} " | |
+ ", 'YYYYMMDDHH24MISS')) " | |
+ "ORDER BY a.BopDataSeqNo; " | |
;} | |
} | |
private Cursor getAmountsCFCCursor; | |
public void GetAmountsCFC(Connect connect) | |
{ | |
getAmountsCFCCursor = new Cursor(connect); | |
// format command to change {n} to ?, @Pn or :Pn placeholders depending on Vendor | |
getAmountsCFCCursor.Format(getAmountsCFCCommand, 2); | |
getAmountsCFCCursor.Parameter(0, rec.RunDateFrom, false); | |
getAmountsCFCCursor.Parameter(1, rec.RunDateTo, false); | |
getAmountsCFCCursor.Run(); | |
} | |
public bool GetAmountsCFCFetch() | |
{ | |
bool result = (getAmountsCFCCursor.HasReader() && getAmountsCFCCursor.Read()); | |
if (result == true) | |
{ | |
rec.AmtSeqNo = (string)getAmountsCFCCursor.GetString(0); | |
rec.BopDataSeqNo = (string)getAmountsCFCCursor.GetString(1); | |
rec.RandAmt = (string)getAmountsCFCCursor.GetString(2); | |
rec.Amt = (string)getAmountsCFCCursor.GetString(3); | |
rec.ExConNo = (string)getAmountsCFCCursor.GetString(4); | |
rec.ImpConNo = (string)getAmountsCFCCursor.GetString(5); | |
rec.SARBAuthNo = (string)getAmountsCFCCursor.GetString(6); | |
rec.CatCde = (string)getAmountsCFCCursor.GetString(7); | |
rec.CatQual = (string)getAmountsCFCCursor.GetString(8); | |
rec.OrigRef = (string)getAmountsCFCCursor.GetString(9); | |
rec.Status = (string)getAmountsCFCCursor.GetString(10); | |
rec.OrigSys = (string)getAmountsCFCCursor.GetString(11); | |
rec.CannotCat = (string)getAmountsCFCCursor.GetString(12); | |
rec.SARBLoanRef = (string)getAmountsCFCCursor.GetString(13); | |
rec.LocCtry = (string)getAmountsCFCCursor.GetString(14); | |
rec.LocQualCde = (string)getAmountsCFCCursor.GetString(15); | |
rec.AccType = (string)getAmountsCFCCursor.GetString(16); | |
rec.OrigAccNo = (string)getAmountsCFCCursor.GetString(17); | |
rec.RecAccNo = (string)getAmountsCFCCursor.GetString(18); | |
rec.PymntType = (string)getAmountsCFCCursor.GetString(19); | |
rec.ReasonCde = (string)getAmountsCFCCursor.GetString(20); | |
rec.ZZReason = (string)getAmountsCFCCursor.GetString(21); | |
rec.InterestOnLoan = (string)getAmountsCFCCursor.GetString(22); | |
rec.OrigAccNoCfcCategory = (string)getAmountsCFCCursor.GetString(23); | |
rec.RecAccNoCfcCategory = (string)getAmountsCFCCursor.GetString(24); | |
rec.BopCatOverrideInd = (string)getAmountsCFCCursor.GetString(25); | |
rec.BopCatOverrideReason = (string)getAmountsCFCCursor.GetString(26); | |
rec.CustomsClientNumber = (string)getAmountsCFCCursor.GetString(27); | |
rec.ValueDate = (string)getAmountsCFCCursor.GetString(28); | |
} | |
else if (getAmountsCFCCursor.HasReader()) | |
getAmountsCFCCursor.Close(); | |
return result; | |
} | |
public void GetAmountsCFCLoad(Connect connect) | |
{ | |
if (recList.Count > 0) | |
Clear(); | |
GetAmountsCFC(connect); | |
while (GetAmountsCFCFetch()) | |
{ | |
recList.Add(rec); | |
rec = new AmountsGetAmountsCFCRec(); | |
} | |
} | |
public AmountsGetAmountsCFCDataTable GetAmountsCFCDataTable() | |
{ | |
AmountsGetAmountsCFCDataTable result = new AmountsGetAmountsCFCDataTable(recList); | |
return result; | |
} | |
public AmountsGetAmountsCFCDataTable GetAmountsCFCDataTable(Connect connect) | |
{ | |
GetAmountsCFCLoad(connect); | |
return GetAmountsCFCDataTable(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment