private void btnnew_Click(object sender, EventArgs e) { savingform sf = new savingform(); sf.Show(); con.Open(); SqlCommand cd = new SqlCommand("SELECT TOP 1 RIGHT(AccountNo,1)+2 From savingform1 order by 1 desc", con); SqlDataAdapter da = new SqlDataAdapter(cd); object VALUE = cd.ExecuteScalar(); VALUE = "accno:" + VALUE; accno.Text = VALUE.ToString(); }
private void fileMenu_Click(object sender, EventArgs e) { savingform sf = new savingform(); sf.Show(); }