tem.Linq;Рusing System.Text;Рusing System.Windows.Forms;Рusing System.Data.SqlClient;Рnamespace sqlР{Р public partial class Menu : FormР {Р public Menu()Р {Р ponent();Р }Р private bool isLogined = false;//记录登录凭据Р private void tsmExit_Click(object sender, EventArgs e)Р {Р Application.Exit();//关闭所有应用程序Р }Р private void tsmDenglu_Click(object sender, EventArgs e)Р {Р Ad ad = new Ad();//实例化管理员登录窗体Р tssMsg.Text = ad.Text;//显示管理员登录窗体Р if (ad.ShowDialog() == DialogResult.OK)Р {Р if ((bool)ad.Tag)//如果登录成功Р {Р isLogined = true;Р tssMsg.Text = "恭喜您,成功登录系统!";Р isLogined = true;Р }Р elseР {Р isLogined = false;Р tssMsg.Text = "抱歉,必须先登录才能使用本系统!";Р }Р }Р }Р private void tsmSign_Click(object sender, EventArgs e)Р {Р Sjgn sign = new Sjgn();Р sign.MdiParent = this;Р sign.Show();Р tssMsg.Text = sign.Text;Р }