示例#1
0
        public void QueryGoodsNowTest()
        {
            // string ConnectionString = string.Empty; // TODO: 初始化为适当的值
            DBLendingInfoDetail target = new DBLendingInfoDetail(connstr); // TODO: 初始化为适当的值
            string WorkShopGUID        = string.Empty;                     // TODO: 初始化为适当的值

            WorkShopGUID = "3B50BF66-DABB-48C0-8B6D-05DB80591090";
            int GoodType = 0; // TODO: 初始化为适当的值
            int GoodID   = 0; // TODO: 初始化为适当的值

            GoodID = 532;
            int orderType = 0;                        // TODO: 初始化为适当的值
            List <LendingInfoDetail> expected = null; // TODO: 初始化为适当的值
            List <LendingInfoDetail> actual;

            actual = target.QueryGoodsNow(WorkShopGUID, GoodType, GoodID, orderType);
            //Assert.AreEqual(expected, actual);
            Assert.IsNotNull(actual);
            //Assert.Inconclusive("验证此测试方法的正确性。");
        }
        public Get_OutQueryGoodsNow QueryGoodsNow(string data)
        {
            Get_OutQueryGoodsNow json = new Get_OutQueryGoodsNow();

            try
            {
                Get_InQueryGoodsNow input = Newtonsoft.Json.JsonConvert.DeserializeObject <Get_InQueryGoodsNow>(data);
                DBLendingInfoDetail db    = new DBLendingInfoDetail(ConData.WebSiteConnectionString);
                LendingDetailList   l     = new LendingDetailList();
                l.lendingDetailList = db.QueryGoodsNow(input.WorkShopGUID, input.GoodType, input.GoodID, input.orderType);
                json.data           = l;
                json.result         = "0";
                json.resultStr      = "返回成功";
            }
            catch (Exception ex)
            {
                json.result    = "1";
                json.resultStr = "提交失败:" + ex.Message;
            }
            return(json);
        }