Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            int          statusID     = Convert.ToInt32(lblStatusID.Text);
            AdminEchelon adminEchelon = new AdminEchelon(lblYearID.Text, lblYear.Text, statusID, lblStatus.Text);

            adminEchelon.Show();
            this.Close();
        }
Пример #2
0
        private void btnCreate_Click(object sender, EventArgs e)
        {
            if (txtNewEchelonName.Text == "")
            {
                MessageBox.Show("Please fill up the form!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }

            else
            {
                int statusID = Convert.ToInt32(lblStatusID.Text);

                myData.AddEchelon(txtNewEchelonName.Text, txtEchelonCode.Text); //Parameters to be pass to DataAccess class

                MessageBox.Show("Echelon Added!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);

                AdminEchelon adminEchelon = new AdminEchelon(lblYearID.Text, lblYear.Text, statusID, lblStatus.Text);
                adminEchelon.Show();
                this.Close();
            }
        }