private void button2_Click(object sender, EventArgs e) { homepage c = new homepage(); c.Show(); Hide(); }
private void button1_Click(object sender, EventArgs e) { if (name.Text != "" & u_id.Text != "" & desig.Text != "" & sdate.Text != "" & edate.Text != "" & reason.Text != "") { count = count + 1; status.Text = "Pending"; com.Connection = con; com.CommandText = "insert into leave(ano,name,u_id,desig,sdate,edate,reason,status) values ('" + count + "','" + name.Text + "','" + u_id.Text + "','" + desig.Text + "','" + sdate.Text + "','" + edate.Text + "','" + reason.Text + "','" + status.Text + "')"; com.ExecuteNonQuery(); com.Dispose(); MessageBox.Show("YOUR LEAVE APPLICATION HAS BEEN SUBMITTED"); MessageBox.Show("Your Leave Application No is : " + (count)); homepage c = new homepage(); c.Show(); Hide(); } else { MessageBox.Show("Plzzz insert all entries "); } }