private void NoADD_Click_1(object sender, EventArgs e) { this.Hide(); Home_Admin_AccountWithdraw_Withdraw h = new Home_Admin_AccountWithdraw_Withdraw(); h.Show(); }
private void GoWithdrawAccount_Click(object sender, EventArgs e) { Account_BO accountBO = new Account_BO(); ArrayList list = new ArrayList(accountBO.readAccount()); if (searchUserID.Text == "" || stYear.Text == "") { MessageBox.Show("Wrong!!! Enter the information fully"); } else { try { int flag = 0; int flag1 = 0; int i1 = 0, i2 = 0; for (int i = 0; i < list.Count; i++) { if (list[i].ToString() == searchUserID.Text) { flag = 1; i1 = i; break; } } for (int i = i1; list[i].ToString() != "*****"; i++) { if (list[i].ToString() == stYear.Text) { flag1 = 1; i2 = i; break; } } if (flag == 1 && flag1 == 1) { try { Home_Admin_AccountWithdraw_Withdraw home_Admin_AccountWithdraw_Withdraw = new Home_Admin_AccountWithdraw_Withdraw(); home_Admin_AccountWithdraw_Withdraw.giveIndex(i1); home_Admin_AccountWithdraw_Withdraw.giveYear(i2); this.Hide(); home_Admin_AccountWithdraw_Withdraw.Show(); } catch (Exception) { MessageBox.Show("Error!!!"); } } if (flag == 0) { MessageBox.Show("Sorry!!! This account number isn't Exist"); searchUserID.Clear(); } if (flag1 == 0) { MessageBox.Show("Sorry!!! This year isn't Exist"); stYear.ResetText(); } } catch (Exception) { MessageBox.Show("No User Exists"); } } }
private void GoWithdrawAccount_Click(object sender, EventArgs e) { Account_BO accountBO = new Account_BO(); ArrayList list = new ArrayList(accountBO.readAccount()); if (searchUserID.Text == "") { MessageBox.Show("Wrong!!! Enter the information fully"); } else { try { int flag = 0; int i1 = 0; for (int i = 0; i < list.Count; i++) { if (list[i].ToString() == searchUserID.Text) { flag = 1; i1 = i; break; } } /* for (int i = i1; list[i].ToString() != "*****"; i++) { if (list[i].ToString() == stYear.Text) { flag1 = 1; i2 = i; break; } }*/ if (flag == 1) { try { Home_Admin_AccountWithdraw_Withdraw home_Admin_AccountWithdraw_Withdraw = new Home_Admin_AccountWithdraw_Withdraw(); home_Admin_AccountWithdraw_Withdraw.giveIndex(i1); //home_Admin_AccountWithdraw_Withdraw.giveYear(i2); this.Hide(); home_Admin_AccountWithdraw_Withdraw.Show(); } catch (Exception) { MessageBox.Show("Error!!!"); } } if (flag == 0) { MessageBox.Show("Sorry!!! This account number isn't Exist"); searchUserID.Clear(); } /* if (flag1 == 0) { MessageBox.Show("Sorry!!! This year isn't Exist"); stYear.ResetText(); }*/ } catch (Exception) { MessageBox.Show("No User Exists"); } } }