/// <summary> /// This WILL modify the current class's CurrentMonth and CurrentBalance /// Make payment to loan returns payment information /// Adds payment to Payments within this class /// </summary> /// <param name="amount"></param> /// <returns></returns> public Payment MakeSinglePayment(decimal amount) { Payment pmt = new Payment(Name, CurrentMonth, Apr, Balance, amount); Balance = pmt.NewBalance; CurrentMonth = CurrentMonth.AddMonths(1); Payments.Add(pmt); return(pmt); }
public static AutoMocker WithCurrentMonth(this AutoMocker mocker, DateTime?month = null) { var currentMonth = new CurrentMonth(mocker.Get <IMessenger>()); if (month != null) { currentMonth.CurrenMonth = month.Value; } mocker.Use <ICurrentMonth>(currentMonth); return(mocker); }
private void TextChangedYear(object sender, EventArgs e) { DateTime CurrentMonth; CurrentMonth = DateTime.Now; if (String.IsNullOrEmpty(TextYear.Text)) { TextYear.Text = CurrentMonth.ToString("yyyy"); } SelectIncome(); }
private void LoadSummaryFragment() { var fragment = (FragmentCommissionSummary)SupportFragmentManager.FindFragmentByTag(CommissionSummaryTag); if (fragment == null) { fragment = new FragmentCommissionSummary(); Bundle bundle = new Bundle(); bundle.PutString(FragmentCommissionSummary.CurrentMonthBundleKey, CurrentMonth.ToString(CultureInfo.CurrentCulture)); bundle.PutInt(FragmentCommissionSummary.MonthDeltaBundleKey, MonthDelta); fragment.Arguments = bundle; } LoadFragment(fragment, CommissionSummaryTag); this.SetScreenTitle(Resource.String.commissions); _isShowingDetails = false; }
void CreateTitle() { btnPrevious = new Button(Context); btnPrevious.Text = "<"; btnPrevious.Click += BtnPrevious_Click; lblCurrentMonth = new TextView(Context); lblCurrentMonth.Text = CurrentMonth.ToString("MMMMM yyyy"); lblCurrentMonth.SetBackgroundColor(Color.Blue); btnNext = new Button(Context); btnNext.Text = ">"; btnNext.Click += BtnNext_Click; AddView(btnPrevious); AddView(lblCurrentMonth); AddView(btnNext); }
static List <uspGetListOfSequenceNrGaps_Result> GetDuplicateTransactions(IfxConnection connection) { Log.LogInfoMessage($"[Enter] {System.Reflection.MethodBase.GetCurrentMethod().Name}"); var missing = new List <uspGetListOfSequenceNrGaps_Result>(); using (var dataContext = new DatabaseSyncDataContext()) { IfxCommand command = connection.CreateCommand(); Log.LogInfoMessage($"Querying duplicate transactions for month : {CurrentMonth.ToString("yyyy-MM-dd 00:00:00")}"); command.CommandText = $"select count(*),ln_id, tx_seq_nr " + $"from informix.p_trans " + $"where dt_concluded >= TO_DATE('{CurrentMonth.ToString("yyyy-MM-dd 00:00:00")}', '%Y-%m-%d %H:%M:%S') " + $"and dt_concluded < TO_DATE('{FollowingMonth.ToString("yyyy-MM-dd 00:00:00")}','%Y-%m-%d %H:%M:%S') " + $"Group by ln_id,tx_seq_nr "; Log.LogInfoMessage(command.CommandText); IfxDataReader dataReader = command.ExecuteReader(); List <string> s = new List <string>(); while (dataReader.Read()) { if (dataReader[0].ToString().Trim() == "1") { continue; } missing.Add(new uspGetListOfSequenceNrGaps_Result { Lane = dataReader[1].ToString().Trim(), Sequencenr = int.Parse(dataReader[2].ToString().Trim()) }); } } Log.LogInfoMessage($"Duplicate Transactions found : {missing.Count}"); Log.LogInfoMessage($"[Exit] {System.Reflection.MethodBase.GetCurrentMethod().Name}"); return(missing); }
private void buttonLeft_Click(object sender, EventArgs e) { CurrentMonth = CurrentMonth.AddMonths(-1); Display(); }
public override string ToString() { return(string.Format("{0} - {1}: {2:C} (New Balance {3:C})", CurrentMonth.ToString("MMMM yyyy"), LoanName, Amount, NewBalance)); }
void BtnNext_Click(object sender, EventArgs e) { CurrentMonth = CurrentMonth.AddMonths(1); CreateCalendar(); }
void BtnPrevious_Click(object sender, EventArgs e) { CurrentMonth = CurrentMonth.AddMonths(-1); CreateCalendar(); }