Example #1
0
        public void TestLoaiSP05_InsertSuccess()
        {
            frmDM_LoaiSanPham frm = new frmDM_LoaiSanPham();

            frm.Oid   = 0;
            frm.isAdd = true;
            frmChiTiet_LoaiSanPham frmChiTiet = new frmChiTiet_LoaiSanPham(frm);

            frmChiTiet.SetInput("Test1", "13", "Unit test ma du an", 1, 1);
            frmChiTiet.TestSave();
            List <DMLoaiSanPhamInfo> list = DMLoaiSanPhamDataProvider.Search(new DMLoaiSanPhamInfo {
                MaLoaiSP = "13"
            });

            Assert.AreEqual(list.Count, 1);
        }
 private void btnTimKiem_Click(object sender, EventArgs e)
 {
     grcBase.DataSource = DMLoaiSanPhamDataProvider.Search(new DMLoaiSanPhamInfo {
         MaLoaiSP = txtTimKiemMa.Text.Trim(), TenLoaiSP = txtTimKiemTen.Text.Trim()
     });
 }