Ejemplo n.º 1
0
        private void addteacherBtn(object sender, EventArgs e)
        {
            string name     = nameTextBox.Text;
            string password = passwordTextBox.Text;
            string desig    = desigComboBox.Text;
            string age      = ageTextBox.Text;

            if (name.Equals(""))
            {
                MessageBox.Show("Please Enter Name");
            }

            else if (age.Equals(""))
            {
                MessageBox.Show("Please Enter Age");
            }
            else
            {
                bool a = TeacherController.AddATeacher(name, password, age);
                if (a)
                {
                    MessageBox.Show("Added");
                }
                else
                {
                    MessageBox.Show("Not Added");
                }
            }
        }
Ejemplo n.º 2
0
        private void addteacherBtnClk(object sender, EventArgs e)
        {
            string name        = nametextBox.Text;
            string password    = passwordtextBox.Text;
            string designation = desigtextBox.Text;
            string age         = agetextBox.Text;

            bool x = TeacherController.AddATeacher(name, password, designation, age);

            if (x)
            {
                MessageBox.Show("Added");
            }
            else
            {
                MessageBox.Show("Not Added");
            }
        }
Ejemplo n.º 3
0
        private void addteacherBtnClk(object sender, EventArgs e)
        {
            string name        = nametextBox.Text;
            string password    = passwordtextBox.Text;
            string designation = comboBox1.Text;
            string age         = agetextBox.Text;

            bool x = TeacherController.AddATeacher(name, password, designation, age);

            if (x)
            {
                MessageBox.Show("Teacher Added !");
                this.tc = this.tc + 1;
                string stc = this.tc.ToString();
                countTextBox.Text = stc;
            }
            else
            {
                MessageBox.Show("Not Added");
            }
        }