Exemplo n.º 1
0
        public void DoLogin()
        {
            String  code = SystemInfo.getConfig(SystemInfo.CASHIER_CODE).ToString();
            String  pwd  = view.pwdInput.Text;
            DataRow row  = service.CheckCashier(code, pwd);

            if (row != null)
            {
                view.Close();
            }
            else
            {
                view.messageLabel.Text = "密码错误";
            }
        }
Exemplo n.º 2
0
        public void DoLogin()
        {
            String  code = view.codeInput.Text;
            String  pwd  = view.pwdInput.Text;
            DataRow row  = service.CheckCashier(code, pwd);

            if (row != null)
            {
                SystemInfo.setConfig(SystemInfo.CASHIER_NAME, row["name"].ToString());
                SystemInfo.setConfig(SystemInfo.CASHIER_CODE, row["code"].ToString());
                MainForm main = new MainForm();
                main.Show();
                view.Hide();
            }
            else
            {
                view.infoLabel.Text = "工号或密码错误";
            }
        }