private void Paydate_ValueChanged(object sender, EventArgs e) { DateTime paydate = Convert.ToDateTime(Paydate.Text); DateTime duedate1 = Convert.ToDateTime(duedate.Text); TimeSpan diff = paydate - duedate1; if (diff.TotalDays>30) { OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\finance.accdb"); con.Open(); string s = "select Duedate,Dueamount from Duedetails" + textBox1.Text + " where SNo='" + noofdue.Text + "'"; OleDbCommand cmd = new OleDbCommand(s, con); OleDbDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { double a = Convert.ToDouble(textBox4.Text); double b = a + 100; string c = Convert.ToString(b); //duedate.Text = dr.GetString(0); //c = dr.GetString(1); textBox4.Text = c.ToString(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)