Ejemplo n.º 1
0
        private void btnLoad_Click(object sender, EventArgs e)
        {
            try
            {
                ManagerInfo mi = new ManagerInfo();
                mi.MName = txtUser.Text;
                mi.MPwd  = txtPwd.Text;

                ManagerInfoBll miBll = new ManagerInfoBll();
                if (miBll.Load(mi))
                {
                    string   overdatestr = ConfigurationManager.ConnectionStrings["date"].ConnectionString;
                    DateTime overdate    = Convert.ToDateTime(overdatestr);
                    if (DateTime.Now.Date < overdate.Date)
                    {
                        Mainform mainform = new Mainform();
                        mainform.Tag = mi.MType;
                        mainform.Show();
                        this.Visible = false;
                    }
                    else
                    {
                        MessageBox.Show("系统文件缺失,请联系开发人员QQ:1517680389");
                    }
                }
                else
                {
                    MessageBox.Show("用户名或密码错误");
                }
            }
            catch
            {
                MessageBox.Show("数据库连接错误,请联系小雨QQ:1517680389");
            }
        }