日期:2014-05-17 浏览次数:20901 次
frmMain main = new frmMain();
main.ShowDialog();
main.Tag = this.FindForm();
SqlDataReader dr;
dr = cmd.ExecuteReader();
dr.Read();
/* 无法判断 */
if ((bool)dr.GetValue(2) == true)
{
main.menuItem1.Visible = true;
main.menuItem2.Visible = true;
main.menuItem3.Visible = true;
main.menuItem4.Visible = false;
}
}
else
{
MessageBox.Show("用户不存在");
return;
}