//For Mutual Fund Transactions public BankTransaction(User user, BankTransactionType type, DateTime transactionDate, DateTime effectiveDate, TreeListNode channel, BankAccount account, String reference, String description, IList <Payment> payments) : base(user, type, reference, description) { //this.recordedBy = user; //this.type = type; this.Channel = channel; //this.account = account; //this.fund = fund; //this.reference = reference; //this.description = description; //this.effectiveDate = effectiveDate; //this.orderedDate = orderedDate; this.EffectiveDate = effectiveDate; this.transactionDate = transactionDate; //this.transactionTS = DateTime.Now; if (null != account) { this.Fee = new Money(account.CurrencyCode, 0m); } //this.payments = payments; //if (null != payments) //{ // foreach (TransactionPayment tp in this.Payments) // { // tp.Transaction = this; // } //} }
//For Provident Fund Transactions public BankTransaction(User user, BankTransactionType type, DateTime transactionDate, DateTime effectiveDate, DateTime settlementDate, BankAccount account, String reference, String description, IList <Payment> payments) : base(user, type, reference, description) { //this.recordedBy = user; //this.type = type; //this.transactionChannel = null; //this.account = account; //this.fund = fund; ////this.quantity.units = 0d; ////this.amount = (null == amount) ? null : new Money(amount); //this.reference = reference; //this.description = description; //this.effectiveDate = effectiveDate; //this.orderedDate = orderedDate; this.settlementDate = settlementDate; this.transactionDate = transactionDate; this.TransactionTS = DateTime.Now; //this.payments = payments; //if (null != payments) //{ // foreach (TransactionPayment tp in this.Payments) // { // tp.Transaction = this; // } //} }
//public virtual State GetState(string stateCategoryCode) //{ // foreach (State s in base.States) // { // if (s.Category == stateCategoryCode) return s; // } // throw new iSabayaException(Messages.TransactionTypeNoState(this.Code, stateCategory.ToString())); //} //public override State GetState(String stateCode) //{ // foreach (State s in base.States) // { // if (s.Code == stateCode) return s; // } // throw new iSabayaException("There is no state " + stateCode); //} public static new BankTransactionType FindByCode(Context context, String code) { ICriteria crit = context.PersistenceSession .CreateCriteria <BankTransactionType>() .Add(Expression.Eq("Code", code)); BankTransactionType tt = crit.UniqueResult <BankTransactionType>(); if (null == tt) { throw new iSabayaException("There is no transaction type '" + code + "'."); } return(tt); }
public virtual int CompareTo(BankTransactionType obj) { if (Object.ReferenceEquals(null, obj)) { return(1); } if (this.transactionTypeID > obj.transactionTypeID) { return(1); } if (this.transactionTypeID < obj.transactionTypeID) { return(-1); } return(0); }