Beispiel #1
0
        private void courseAddButton_Click(object sender, EventArgs e)
        {
            addDeptObj = new AddDeptClass();

            addDeptObj.DeptID       = deptIdTextBox.Text;
            addDeptObj.DeptName     = deptNameTextBox.Text;
            addDeptObj.DeptFullName = deptFullNameTextBox.Text;



            if ((deptNameTextBox.Text == "") || (deptIdTextBox.Text == ""))
            {
                MessageBox.Show("Please Fill-Up all fields!!");
                this.Update();
            }
            else
            {
                gateways = new Gateway();
                if (gateways.InserIntoDeptInfoTable(addDeptObj) == 1)
                {
                    MessageBox.Show("Information Added Successfully!!!");
                    deptResetButton_Click(sender, e);
                }
                else
                {
                    MessageBox.Show("Already Added this department!!!");
                }
            }
        }