Example #1
0
        //Them Tai Khoan
        private void AddUser()
        {
            TaiKhoan userToAdd = new TaiKhoan();

            userToAdd.TenTaiKhoan = txtTenDangNhap.Text;
            userToAdd.MatKhau     = txtMatKhau.Text;
            userToAdd.ChucVu      = cbChucVu.Text;
            userToAdd.MaNV        = int.Parse(cbMaNVien.Text);

            userBUS.AddUserBUS(userToAdd);
        }
Example #2
0
        public void Test_AddUser_Suscess()
        {
            userBUS = new TaiKhoanBUS();

            user             = new TaiKhoan();
            user.TenTaiKhoan = "Hoa";
            user.MatKhau     = "123";
            user.ChucVu      = "Nhân viên";
            user.MaNV        = 13;
            userBUS.AddUserBUS(user);

            Assert.AreEqual(8, userBUS.LoadUserBUS().Count);
        }