public void Test_RejectTurnover() { var turnover = new AutoRejectTurnover(); turnover.Init(); this.m_oDB.ForEachResult <TurnoverDbRow>( row => turnover.Add(row), "GetCustomerTurnoverForAutoDecision", new QueryParameter("@IsForApprove", false), new QueryParameter("@CustomerID", 18416), new QueryParameter("@Now", new DateTime(2015, 2, 2)) ); }
} // RejectionTurnover /// <summary> /// Calculates figures for 4 categories annual (max of annualized 1m 3m 6m and 1y), /// and quarter (max of 3 month not annualized): hmrc, yodlee, online, payment. /// Returns max of 4 categories for annual turnover and quarter turnover. /// </summary> /// <returns>Rejection turnover, annual and quarter.</returns> private RejectionTurnover GetTurnoverForRejection(DateTime now) { var turnover = new AutoRejectTurnover(); turnover.Init(); this.db.ForEachResult <TurnoverDbRow>( row => turnover.Add(row), "GetCustomerTurnoverForAutoDecision", new QueryParameter("@IsForApprove", false), new QueryParameter("@CustomerID", customerId), new QueryParameter("@Now", now) ); return(new RejectionTurnover(turnover[12], turnover[3])); } // GetTurnoverForRejection
public void TestAutoRejectTurnover() { var turnover = new AutoRejectTurnover(); turnover.Init(); this.m_oDB.ForEachResult <TurnoverDbRow>( row => turnover.Add(row), "GetCustomerTurnoverForAutoDecision", new QueryParameter("@IsForApprove", false), new QueryParameter("@CustomerID", 211), new QueryParameter("@Now", DateTime.UtcNow) ); this.m_oLog.Info("Turnover for year is {0}, for quarter is {1}.", turnover[12], turnover[3]); } // TestAutoRejectTurnover