private void button2_Click(object sender, RoutedEventArgs e)
        {
            LoansApprove window = new LoansApprove();

            window.Show();
            this.Hide();
        }
 private void button_Click(object sender, RoutedEventArgs e) //return
 {
     if (goback == "client")
     {
         ClientExtra window = new ClientExtra();
         window.Show();
         this.Hide();
     }
     else if (goback == "account")
     {
         AccountExtra window = new AccountExtra();
         window.Show();
         this.Hide();
     }
     else
     {
         if (editing.Approved)
         {
             Loans window = new Loans();
             window.Show();
             this.Hide();
         }
         else
         {
             LoansApprove window = new LoansApprove();
             window.Show();
             this.Hide();
         }
     }
 }
        private void buttond_Click(object sender, RoutedEventArgs e)
        {
            if (!refresh())
            {
                return;
            }

            MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show("Are you sure you want to delete this loan?", "Delete Confirmation", System.Windows.MessageBoxButton.YesNo);

            if (messageBoxResult == MessageBoxResult.Yes)
            {
                SqlCommand cmd = new SqlCommand("EXEC DeleteLoan " + editing.ID);
                cmd.Connection = cn;
                cmd.ExecuteNonQuery();

                LoansApprove window = new LoansApprove();
                window.Show();
                this.Hide();
            }
        }
        private void buttona_Click(object sender, RoutedEventArgs e)
        {
            if (!refresh())
            {
                return;
            }

            MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show("Are you sure you want to approve this loan?", "Approval Confirmation", System.Windows.MessageBoxButton.YesNo);

            if (messageBoxResult == MessageBoxResult.Yes)
            {
                SqlCommand cmd = new SqlCommand("UPDATE LOANS SET appr='yes' WHERE id=" + editing.ID.ToString());
                cmd.Connection = cn;
                cmd.ExecuteNonQuery();

                LoansApprove window = new LoansApprove();
                window.Show();
                this.Hide();
            }
        }