Пример #1
0
 public List <DonHangDTO> GetDonHang()
 {
     try
     {
         return(donhangDAO.GetDonHang());
     }
     catch (SqlException ex)
     {
         throw ex;
     }
 }
Пример #2
0
        public void testThemDonHang()
        {
            this.donhangDAO.Add(this.dh1);
            Assert.AreEqual(10, donhangDAO.GetDonHang().Count);
            Assert.AreEqual("1", donhangDAO.GetDonHang()[0].MaHDBan);
            Assert.AreEqual("1651010034", donhangDAO.GetDonHang()[0].MaNhanVien);

            this.donhangDAO.Add(this.dh2);
            Assert.AreEqual(11, donhangDAO.GetDonHang().Count);
            Assert.AreEqual("2", donhangDAO.GetDonHang()[1].MaHDBan);
            Assert.AreEqual("1651010144", donhangDAO.GetDonHang()[1].MaNhanVien);

            this.donhangDAO.Add(this.dh3);
            Assert.AreEqual(12, donhangDAO.GetDonHang().Count);
            Assert.AreEqual("3", donhangDAO.GetDonHang()[2].MaHDBan);
            Assert.AreEqual("1651010034", donhangDAO.GetDonHang()[2].MaNhanVien);
        }