Ejemplo n.º 1
0
 public void Test_AddKhachHang_Suscess()
 {
     khBUS        = new KhachHangBUS();
     kh           = new KhachHang();
     kh.HoKH      = "XXXXX";
     kh.TenKH     = "YYYYYOOOO";
     kh.GioiTinh  = "Nu";
     kh.DiaChi    = "123";
     kh.DienThoai = "321";
     khBUS.AddKHBUS(kh);
     // Sau khi add thi co them X+1 nguoi
     Assert.AreEqual(29, khBUS.LoadKHBUS().Count);
 }
        public void Test_AddKhachHang_Suscess()
        {
            khBUS = new KhachHangBUS();
            Assert.AreEqual(10, khBUS.LoadKHBUS().Count);

            kh           = new KhachHang();
            kh.HoKH      = "Nguyễn Thị";
            kh.TenKH     = "th";
            kh.GioiTinh  = "Nu";
            kh.DiaChi    = "123";
            kh.DienThoai = "321";
            khBUS.AddKHBUS(kh);

            Assert.AreEqual(11, khBUS.LoadKHBUS().Count);
        }
Ejemplo n.º 3
0
        //Thêm KH
        private void AddKH()
        {
            KhachHang khToAdd = new KhachHang();

            khToAdd.HoKH  = txtHoKH.Text;
            khToAdd.TenKH = txtTenKH.Text;
            if (rdbNamKH.Checked == true)
            {
                khToAdd.GioiTinh = "Nam";
            }
            else
            {
                khToAdd.GioiTinh = "Nữ";
            }
            khToAdd.DiaChi    = txtDiaChiKH.Text;
            khToAdd.DienThoai = txtSdtKH.Text;

            khBUS.AddKHBUS(khToAdd);
        }