Esempio n. 1
0
        private void btnDangNhap_Click(object sender, EventArgs e)
        {
            string username = txtUsername.Text.Trim();
            string password = txtPassword.Text.Trim();
            string result   = client.DangNhapAppWinForm(username, password);

            if (result == "1")
            {
                MessageBox.Show("thanh cong");
            }
            else
            {
                MessageBox.Show("that bai");
            }
        }
Esempio n. 2
0
        private void btnDangNhap_Click(object sender, EventArgs e)
        {
            string username = txtUsername.Text.Trim();
            string password = txtPassword.Text.Trim();
            var    result   = client.DangNhapAppWinForm(username, password);

            if (result.ToString() != "0")
            {
                MessageBox.Show("thanh cong");
                acc = JsonConvert.DeserializeObject <user>(result);
                this.Hide();
                FormQuanTri f = new FormQuanTri();
                f.Show();
            }
            else
            {
                MessageBox.Show("that bai");
            }
        }