Пример #1
0
        public void load_data()
        {
            stt = 1;
            string month = thang.Text.ToString();
            string year  = nam.Text.ToString();

            hdBus = new HoadonBUS();
            List <HoadonDTO> listHoadon = hdBus.selectByMonth(month, year);

            this.loadData_Vao_GridView(listHoadon);
        }
Пример #2
0
        public void Kiemtradoanhthu()
        {
            HoadonDTO hd = new HoadonDTO();

            hdbus = new HoadonBUS();
            List <HoadonDTO> listHoadon   = hdbus.selectByMonth("6", "2020");
            float            tongdoanhthu = 0;

            foreach (HoadonDTO hdls in listHoadon)
            {
                string ngkham;
                ngkham        = String.Format("{0:M/d/yyyy}", hdls.NgayHd);
                tongdoanhthu += float.Parse(hdbus.doanhthu(ngkham).ToString());
            }
            Assert.AreEqual(180000, tongdoanhthu);
        }