azad education azad education

The next-generation blog, news about technology.

India (HQ)

[email protected]

Loan Management project c# emi pay | loan increment | balance update | loan adjustment

azad education
Azad Education Dec 02, 2022 · 6 min read

Loan Management Project c# and SQL server

Hello, friends today I am sharing with you my experience coding with projects. In this software, we can manage all loan management accounts of clients can manage loan credit and debt with interest. this is part 4 of the loan management project.

Feature's of Loan Management Software.

  • Party Statement's
  • Pay EMI
  • Increase Loan Amount
  • Export Party Statement in PDF or Excel
  • More features you want to add to this project can be contacted and commented on by us.

Pay EMI Code:- for more information you must watch our tutorial on youtube.  Watch Now

private void saveData()
        {
            try
            {
                SqlConnection con = new SqlConnection(data.SqlConStr);
                con.Open();
                string queery = "INSERT INTO emis(acc_id,txnType,payType,amount,interest,total,date)" +
                    "VALUES (@acc_id,@txnType,@payType,@amount,@interest,@total,@date)";
                SqlCommand cmd = new SqlCommand(queery, con);
                cmd.Parameters.AddWithValue("@acc_id", data.AccountID);
                cmd.Parameters.AddWithValue("@txnType", "Emi Txn");
                cmd.Parameters.AddWithValue("@payType", payType.Text);
                cmd.Parameters.AddWithValue("@amount", txtPAmt.Text);
                cmd.Parameters.AddWithValue("@interest", txtIAmt.Text);
                cmd.Parameters.AddWithValue("@total", txtTotal.Text);
                cmd.Parameters.AddWithValue("@date", Convert.ToDateTime(dtEmi.Text));
                cmd.ExecuteNonQuery();


                SqlCommand cmd13 = new SqlCommand("update accunts set Balance -= '" + Convert.ToInt32(txtPAmt.Text) + "'where id = '" + data.AccountID + "'  ", con);
                cmd13.ExecuteNonQuery();

                MessageBox.Show("EMI Saved Successfully", "Loan Account", MessageBoxButtons.OK, MessageBoxIcon.Information);

                this.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

Loan Increment code:- 

private void saveData()
        {
            try
            {
                SqlConnection con = new SqlConnection(data.SqlConStr);
                con.Open();
                string queery = "INSERT INTO emis(acc_id,txnType,payType,amount,interest,total,date)" +
                    "VALUES (@acc_id,@txnType,@payType,@amount,@interest,@total,@date)";
                SqlCommand cmd = new SqlCommand(queery, con);
                cmd.Parameters.AddWithValue("@acc_id", data.AccountID);
                cmd.Parameters.AddWithValue("@txnType", "Loan Inc");
                cmd.Parameters.AddWithValue("@payType", payType.Text);
                cmd.Parameters.AddWithValue("@amount", txtPAmt.Text);
                cmd.Parameters.AddWithValue("@interest", 0);
                cmd.Parameters.AddWithValue("@total", txtTotal.Text);
                cmd.Parameters.AddWithValue("@date", Convert.ToDateTime(dtEmi.Text));
                cmd.ExecuteNonQuery();


                SqlCommand cmd13 = new SqlCommand("update accunts set Balance += '" + Convert.ToInt32(txtPAmt.Text) + "'where id = '" + data.AccountID + "'  ", con);
                cmd13.ExecuteNonQuery();

                MessageBox.Show("EMI Saved Successfully", "Loan Account", MessageBoxButtons.OK, MessageBoxIcon.Information);

                this.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

avatar

Azad Mohammed

An editor at AzadEducation
View Articles

I'am Azad, These blogs, tech skills and programing news, I am sharing with my exprience. I have 4+ year experiece in the web development. Also we are learning investing ideas. I believe in "big mind big dream", that will convert in smart mind. You can follow me on Linkedin profile.

Categories
C#
10
Java Script
8
SEO
4
Quick Hack Solution Tips
4

Subscribe to our mailing list!

We don't spam