private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { addlib al = new addlib(); al.Show(); this.Hide(); }
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { if (textBox1.Text == "admin" && textBox2.Text == "admin") { DialogResult dialogResult = MessageBox.Show("Add Librarian", "Edit changes", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { addlib al = new addlib(); al.Show(); } else if (dialogResult == DialogResult.No) { } else { MessageBox.Show("Something Went Wrong!!!"); } } else { DialogResult dialogResult = MessageBox.Show("Add Books", "Edit changes", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { Addbook ab = new Addbook(); ab.Show(); } else if (dialogResult == DialogResult.No) { } else { MessageBox.Show("Something Went Wrong!!!"); } } }