Example #1
0
        private void btnStudents_Click(object sender, EventArgs e)
        {
            this.Hide();
            Form_Students nextForm = new Form_Students();

            nextForm.Show();
            nextForm.lblTotal.Text = "TOTAL ENTRY: " + nextForm.dgvStudents.Rows.Count.ToString();
        }
Example #2
0
 private void btnBack_Click(object sender, EventArgs e)
 {
     if (btnBack.Text == "BACK")
     {
         Reset();
         Form_Students nextForm = new Form_Students();
         nextForm.Show();
         nextForm.lblTotal.Text = "TOTAL ENTRY: " + nextForm.dgvStudents.Rows.Count.ToString();
         this.Close();
     }
     else if (btnBack.Text == "CANCEL")
     {
         DialogResult result = MessageBox.Show("Are you sure you want to cancel ?", "ATTENTION", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
         if (result == DialogResult.Yes)
         {
             this.Hide();
             Reset();
             Form_Students nextForm = new Form_Students();
             nextForm.Show();
             nextForm.lblTotal.Text = "TOTAL ENTRY: " + nextForm.dgvStudents.Rows.Count.ToString();
         }
     }
 }