private void stNewYearBt_Click(object sender, EventArgs e) { Home_Admin_Withdraw_New h = new Home_Admin_Withdraw_New(); h.giveData(index1, index2, year.Text); this.Hide(); h.Show(); }
private void Home_Admin_AccountWithdraw_Withdraw_Load(object sender, EventArgs e) { Home_Admin_Withdraw_New home_add_new = new Home_Admin_Withdraw_New(); try { Account_BO account_BO = new Account_BO(); ArrayList list = new ArrayList(account_BO.readAccount()); userName.Text = list[index1 + 1].ToString(); year.Text = list[index2].ToString(); userID1.Text = list[index1].ToString(); stYearP.Text = list[index1 + 5].ToString(); stMonthP.Text = list[index1 + 6].ToString(); jan.Text = "DUE"; feb.Text = "DUE"; mar.Text = "DUE"; apr.Text = "DUE"; may.Text = "DUE"; june.Text = "DUE"; july.Text = "DUE"; augu.Text = "DUE"; sep.Text = "DUE"; oct.Text = "DUE"; nov.Text = "DUE"; dec.Text = "DUE"; if (index2 - index1 == 5) { if (list[index2 + 1].ToString() == "February") { jan.Text = "NILL"; } else if (list[index2 + 1].ToString() == "March") { jan.Text = "NILL"; feb.Text = "NILL"; } else if (list[index2 + 1].ToString() == "April") { jan.Text = "NILL"; feb.Text = "NILL"; mar.Text = "NILL"; } else if (list[index2 + 1].ToString() == "May") { jan.Text = "NILL"; feb.Text = "NILL"; mar.Text = "NILL"; apr.Text = "NILL"; } else if (list[index2 + 1].ToString() == "June") { jan.Text = "NILL"; feb.Text = "NILL"; mar.Text = "NILL"; apr.Text = "NILL"; may.Text = "NILL"; } else if (list[index2 + 1].ToString() == "July") { jan.Text = "NILL"; feb.Text = "NILL"; mar.Text = "NILL"; apr.Text = "NILL"; may.Text = "NILL"; june.Text = "NILL"; } else if (list[index2 + 1].ToString() == "August") { jan.Text = "NILL"; feb.Text = "NILL"; mar.Text = "NILL"; apr.Text = "NILL"; may.Text = "NILL"; june.Text = "NILL"; july.Text = "NILL"; } else if (list[index2 + 1].ToString() == "September") { jan.Text = "NILL"; feb.Text = "NILL"; mar.Text = "NILL"; apr.Text = "NILL"; may.Text = "NILL"; june.Text = "NILL"; july.Text = "NILL"; augu.Text = "NILL"; } else if (list[index2 + 1].ToString() == "October") { jan.Text = "NILL"; feb.Text = "NILL"; mar.Text = "NILL"; apr.Text = "NILL"; may.Text = "NILL"; june.Text = "NILL"; july.Text = "NILL"; augu.Text = "NILL"; sep.Text = "NILL"; } else if (list[index2 + 1].ToString() == "November") { jan.Text = "NILL"; feb.Text = "NILL"; mar.Text = "NILL"; apr.Text = "NILL"; may.Text = "NILL"; june.Text = "NILL"; july.Text = "NILL"; augu.Text = "NILL"; sep.Text = "NILL"; oct.Text = "NILL"; } else if (list[index2 + 1].ToString() == "December") { jan.Text = "NILL"; feb.Text = "NILL"; mar.Text = "NILL"; apr.Text = "NILL"; may.Text = "NILL"; june.Text = "NILL"; july.Text = "NILL"; augu.Text = "NILL"; sep.Text = "NILL"; oct.Text = "NILL"; nov.Text = "NILL"; } } for (int i = index2 + 1; list[i].ToString() != "*****"; i++) { if (list[i].ToString() == "January" || list[i].ToString() == "February" || list[i].ToString() == "March" || list[i].ToString() == "April" || list[i].ToString() == "May" || list[i].ToString() == "June" || list[i].ToString() == "July" || list[i].ToString() == "August" || list[i].ToString() == "September" || list[i].ToString() == "October" || list[i].ToString() == "November" || list[i].ToString() == "December") { if (list[i].ToString() == "January") { jan.Text = "PAID"; } if (list[i].ToString() == "February") { feb.Text = "PAID"; } if (list[i].ToString() == "March") { mar.Text = "PAID"; } if (list[i].ToString() == "April") { apr.Text = "PAID"; } if (list[i].ToString() == "May") { may.Text = "PAID"; } if (list[i].ToString() == "June") { june.Text = "PAID"; } if (list[i].ToString() == "July") { july.Text = "PAID"; } if (list[i].ToString() == "August") { augu.Text = "PAID"; } if (list[i].ToString() == "September") { sep.Text = "PAID"; } if (list[i].ToString() == "October") { oct.Text = "PAID"; } if (list[i].ToString() == "November") { nov.Text = "PAID"; } if (list[i].ToString() == "December") { dec.Text = "PAID"; } } else { break; } } } catch (Exception) { MessageBox.Show("Error !!!"); } }