예제 #1
0
        public void FindByIDTest()
        {
            PurchaseBillDAL pdal = new PurchaseBillDAL();
            PurchaseBill    list = pdal.FindByID("201706010001");

            Assert.IsNotNull(list);
            Assert.IsNull(pdal.FindByID("2165321010"));
            Assert.AreEqual("201706010001", list.PurchaseID);
            Assert.AreEqual(Convert.ToDateTime("2018.10.1"), list.PurchaseDate);
            Assert.AreEqual("1", list.Clerk);
            Assert.AreEqual(3, list.DetailList.Count);

            //从明细列表中取出一行明细进行测试
            PurchaseDetail pDetail = list.DetailList[0];

            Assert.AreEqual("1", pDetail.PurchaseDetailID);
            Assert.AreEqual(Convert.ToDecimal(3), pDetail.PurchasePrice);
            Assert.AreEqual("10", pDetail.Quantity);
        }
예제 #2
0
 public PurchaseBill FindByID(string id)
 {
     return(pDAL.FindByID(id));
 }
예제 #3
0
 public PurchaseBill FindByID(string id)        //根据ID查询订单基本信息和订单明细
 {
     return(pd.FindByID(id));
 }