public void LoadPaymentHistory() { //clear list billingPartials.Clear(); //MessageBox.Show(REG_No); //pass value to list billingPartial.RegNo = REG_No; billingPartials = billingPartial.GetMonthlyDue(); //loop through load it to list view foreach (var item in billingPartials) { string Month_1 = "June "; string Month_2 = "July "; string Month_3 = "August "; string Month_4 = "September "; string Month_5 = "October "; string Month_6 = "November "; string Month_7 = "December "; string Month_8 = "January "; string Month_9 = "February "; string Month_10 = "March "; M1txt.Text = Month_1; M2txt.Text = Month_2; M3txt.Text = Month_3; M4txt.Text = Month_4; M5txt.Text = Month_5; M6txt.Text = Month_6; M7txt.Text = Month_7; M8txt.Text = Month_8; M9txt.Text = Month_9; M10txt.Text = Month_10; tp1txt.Text = item.P1; tp2txt.Text = item.P2; tp3txt.Text = item.P3; tp4txt.Text = item.P4; tp5txt.Text = item.P5; tp6txt.Text = item.P6; tp7txt.Text = item.P7; tp8txt.Text = item.P8; tp9txt.Text = item.P9; tp10txt.Text = item.P10; } }
/// <summary> /// Load Payments /// </summary> public void GetPerMonth() { //clear list billingPartials.Clear(); dgvPerMonth.Rows.Clear(); //pass value to list billingPartial.RegNo = RegNo; billingPartials = billingPartial.GetMonthlyDue(); //loop through load it to list view foreach (var item in billingPartials) { //Months will be concat as variables string Month_1 = "June "; string Month_2 = "July "; string Month_3 = "August "; string Month_4 = "September "; string Month_5 = "October "; string Month_6 = "November "; string Month_7 = "December "; string Month_8 = "January "; string Month_9 = "February "; string Month_10 = "March "; lblDPCheck.Text = item.DownPayment; EnStatus = item.EnStatus; if (item.EnStatus.Equals("Reservee")) { dgvPerMonth.Rows.Clear(); dgvPerMonth.Rows.Add("", " Down Payment", item.DownPayment); dgvPerMonth.Rows.Add(Month_1, "1st Payment", item.P1); dgvPerMonth.Rows.Add(Month_2, "2nd Payment", item.P2); dgvPerMonth.Rows.Add(Month_3, "3rd Payment", item.P3); dgvPerMonth.Rows.Add(Month_4, "4th Payment", item.P4); dgvPerMonth.Rows.Add(Month_5, "5th Payment", item.P5); dgvPerMonth.Rows.Add(Month_6, "6th Payment", item.P6); dgvPerMonth.Rows.Add(Month_7, "7th Payment", item.P7); dgvPerMonth.Rows.Add(Month_8, "8th Payment", item.P8); dgvPerMonth.Rows.Add(Month_9, "9th Payment", item.P9); dgvPerMonth.Rows.Add(Month_10, "10th Payment", item.P10); dgvPerMonth.Rows.Add("Balance", "Balance", item.Balance); lblAmountDues.Visible = true; lblPerMonthAdv.Visible = false; lblAmountDues.Text = item.Balance; } else { dgvPerMonth.Rows.Clear(); dgvPerMonth.Rows.Add("", " Down Payment", item.DownPayment); dgvPerMonth.Rows.Add(Month_1, "1st Payment", item.P1); dgvPerMonth.Rows.Add(Month_2, "2nd Payment", item.P2); dgvPerMonth.Rows.Add(Month_3, "3rd Payment", item.P3); dgvPerMonth.Rows.Add(Month_4, "4th Payment", item.P4); dgvPerMonth.Rows.Add(Month_5, "5th Payment", item.P5); dgvPerMonth.Rows.Add(Month_6, "6th Payment", item.P6); dgvPerMonth.Rows.Add(Month_7, "7th Payment", item.P7); dgvPerMonth.Rows.Add(Month_8, "8th Payment", item.P8); dgvPerMonth.Rows.Add(Month_9, "9th Payment", item.P9); dgvPerMonth.Rows.Add(Month_10, "10th Payment", item.P10); lblPerMonthAdv.Visible = true; // MessageBox.Show(lblPerMonthAdv.Text); lblAmountDues.Visible = false; } } }