Esempio n. 1
0
        //int crn, string firstName, string surname, string phone, EmploymentStatus empStatus, decimal weeklyNetPay, decimal weeklyOutgoings, string cr
        private void newLoanToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Applicant applicant = null;
            List<Applicant> appList = null;
            BLLApplicantManager BLLMngr = new BLLApplicantManager();
           
            if (dgvMainFormApplicant.Visible == true)
            {

                applicant = GetSelectedApplicant();
               
            }
            else if (dgvMainFormLoans.Visible == true)
            {
                Loan newLoan = GetSelectedLoan();
                appList = BLLMngr.CallGetListOfApplicants();
                foreach (Applicant a in appList)
                {
                    if (a.CRN == newLoan.CRN)
                    {
                        applicant = a;
                    }
                }

            }

            if (applicant != null)
            {
                using (NewLoanDetails frmNewLoan = new NewLoanDetails(applicant))
                {
                    frmNewLoan.OnLoanAdded += LoanAdded;
                    frmNewLoan.ShowDialog();
                }
            }

        }
Esempio n. 2
0
 // button click takes user to next form
 private void btnNext_Click(object sender, EventArgs e)
 {
     using (NewLoanDetails frmNewApplicantLoan = new NewLoanDetails(NewApplicant))
     {
         frmNewApplicantLoan.OnLoanAdded += NewLoanAdded;
         frmNewApplicantLoan.ShowDialog();
         this.Close();
     }
 }