Exemplo n.º 1
0
        private void log()
        {
            employeeInfo employee = DataService.LoginEmployee(this.tex_User.Text, this.tex_pwd.Text);

            //MessageBox.Show(admin.Adminname);
            try
            {
                if (employee.Name != null)
                {
                    Form_main f = new Form_main();
                    f.Show();
                    this.Visible = false;
                }
                else
                {
                    MessageBox.Show("用户名密码错误!!");
                    this.tex_pwd.Text = "";
                }
            }
            catch
            {
                MessageBox.Show("系统发生不明错误,请联系管理员!!");
            }
        }
Exemplo n.º 2
0
        private void log()
        {
            AdminInfo admin = AdminServices.LoginAdmin(this.tex_User.Text, this.tex_pwd.Text);

            // MessageBox.Show(admin.Adminname);
            try
            {
                if (admin.Adminname != null)
                {
                    Form_main f = new Form_main(admin, this);
                    f.Show();
                    this.Visible = false;
                }
                else
                {
                    MessageBox.Show("用户名密码错误!!");
                    this.tex_pwd.Text = "";
                }
            }
            catch
            {
                MessageBox.Show("系统发生不明错误,请联系管理员!!");
            }
        }