private void button1_Click(object sender, RoutedEventArgs e) { if (choose.Text == "Employee") { Add_Employee ee = new Add_Employee(); ee.Show(); } else if (choose.Text == "Player") { Add_Player p = new Add_Player(); p.Show(); } else if (choose.Text == "Club") { Add_Club c = new Add_Club(); c.Show(); } else if (choose.Text == "Team") { Add__Team t = new Add__Team(); t.Show(); } else if (choose.Text == "Championship") { Add_Championship cc = new Add_Championship(); cc.Show(); } this.Hide(); }
private void button1_Click(object sender, RoutedEventArgs e) { if (choose.Text == "") { MessageBox.Show("Please Choose An Option"); } else if (choose.Text == "Employee") { if (employeelogin.empid == true) { MessageBox.Show("You are not alowed to add employee"); } else { Add_Employee ee = new Add_Employee(); ee.Show(); this.Close(); } } else if (choose.Text == "Player") { Add_Player p = new Add_Player(); p.Show(); this.Close(); } else if (choose.Text == "Club") { Add_Club c = new Add_Club(); c.Show(); this.Close(); } else if (choose.Text == "Team") { Add__Team t = new Add__Team(); t.Show(); this.Close(); } else if (choose.Text == "Championship") { Add_Championship cc = new Add_Championship(); cc.Show(); this.Close(); } }