public void TestMaLoi05_InsertSuccess()
        {
            frmDM_MaLoi frm = new frmDM_MaLoi();

            frm.Oid   = 0;
            frm.isAdd = true;
            frmChiTiet_MaLoi frmChiTietMaLoi = new frmChiTiet_MaLoi(frm);

            frmChiTietMaLoi.SetInput("Ma Loi 1", "001", "Unit test MaLoi", 1);
            frmChiTietMaLoi.TestSave();
            List <DMMaLoiPairInfor> list = DMMaLoiDataProvider.Search(new DMMaLoiPairInfor {
                MaLoi = "001"
            });

            Assert.AreEqual(list.Count, 1);
        }
示例#2
0
 private void btTimKiem_Click(object sender, EventArgs e)
 {
     grcBase.DataSource = DMMaLoiDataProvider.Search(new DMMaLoiPairInfor {
         MaLoi = txtMaLoi.Text.Trim(), TenLoi = txtTenLoiSearch.Text.Trim()
     });
 }