private void button3_Click(object sender, EventArgs e) { if (fbl.IsExistCSFaculty(this.loginUserName) || fbl.IsExistEEEFaculty(this.loginUserName) || fbl.IsExistBBAFaculty(this.loginUserName)) { this.Hide(); FacultyPage fp = new FacultyPage(loginUserName, department); //for faculty fp.Show(); } else { this.Hide(); FacultyList fl = new FacultyList(loginUserName, department); //for admin fl.Show(); } //if (loginUserName != null && loginUserName.Length == 8) //{ // this.Hide(); // FacultyList fl = new FacultyList(loginUserName, department); // fl.Show(); //} //else if (loginUserName != null && loginUserName.Length == 7) //{ // this.Hide(); // FacultyPage fp = new FacultyPage(loginUserName, department); // fp.Show(); //} }
private void button2_Click(object sender, EventArgs e) { this.Hide(); FacultyList fl = new FacultyList(loginUserName, department); fl.Show(); }
private void button2_Click(object sender, EventArgs e) { DialogResult result = MessageBox.Show("Are you sure to dlete this faculty?", "Confirmation", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question); if (result == DialogResult.Yes) { fbl.DeleteFaculty(label27.Text, department); this.Hide(); FacultyList fl = new FacultyList(loginUserName, department); fl.Show(); MessageBox.Show("Faculty deleted successfully."); } }
private void button1_Click(object sender, EventArgs e) { if (fbl.IsExistCSFaculty(textBox1.Text) || fbl.IsExistEEEFaculty(textBox1.Text) || fbl.IsExistBBAFaculty(textBox1.Text)) { MessageBox.Show("Faculty with same User Name already exist.\nPlease use another UserName."); } else if (textBox1.Text == "" || textBox2.Text == "" || textBox3.Text == "" || textBox8.Text == "" || textBox4.Text == "" || textBox5.Text == "" || textBox7.Text == "" || textBox6.Text == "" || comboBox1.SelectedIndex == 0 || textBox12.Text == "" || textBox11.Text == "" || textBox10.Text == "" || pictureBox1.Image == null) { MessageBox.Show("Please fill all the information correctly."); } else if (textBox1.Text.Length != 7) { MessageBox.Show("Please use 7 character for a User Name."); } else { string bloodGroup = comboBox1.Items[comboBox1.SelectedIndex].ToString(); string sex; if (radioButton1.Checked == true) { sex = "Male"; } else { sex = "Female"; } fbl.AddFaculty(textBox1.Text, textBox2.Text, textBox3.Text, textBox8.Text, textBox4.Text, textBox5.Text, textBox7.Text, textBox6.Text, sex, bloodGroup, textBox12.Text, textBox11.Text, textBox10.Text, pictureBox1.Image, department); this.Hide(); FacultyList fl = new FacultyList(loginUserName, department); fl.Show(); MessageBox.Show("Faculty added successfully."); } }