Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            SqlConnection cn  = new SqlConnection(str);
            string        sql = "SELECT * FROM TaiKhoan where TaiKhoan='" + txtTaiKhoan.Text
                                + "'and MatKhau='" + txtMatKhau.Text + "'";

            cn.Open();
            SqlCommand    cmd    = new SqlCommand(sql, cn);
            SqlDataReader reader = cmd.ExecuteReader();

            if (reader.Read())
            {
                cn.Close();
                this.Hide();
                FrmMain f = new FrmMain();
                f.Show();
            }
            else
            {
                MessageBox.Show("Bạn Đăng Nhập không thành công!");
                txtMatKhau.Text  = "";
                txtTaiKhoan.Text = "";
                txtTaiKhoan.Focus();
            }
        }
Example #2
0
        //


        private void FrmChiTietThue_FormClosed(object sender, FormClosedEventArgs e)
        {
            FrmMain k = new FrmMain();

            k.Show();
        }
Example #3
0
        private void FrmNhanVien_FormClosed(object sender, FormClosedEventArgs e)
        {
            FrmMain f = new FrmMain();

            f.Show();
        }
Example #4
0
        private void FrmKhachHang_FormClosed(object sender, FormClosedEventArgs e)
        {
            FrmMain f = new FrmMain();

            f.Show();
        }