Ejemplo n.º 1
0
        public void QueryDetailsTest()
        {
            // string ConnectionString = string.Empty; // TODO: 初始化为适当的值
            DBLendingInfoDetail      target     = new DBLendingInfoDetail(connstr); // TODO: 初始化为适当的值
            GoodsDetailQueryParam    queryParam = null;                             // TODO: 初始化为适当的值
            List <LendingInfoDetail> expected   = null;                             // TODO: 初始化为适当的值
            List <LendingInfoDetail> actual;

            queryParam                   = new GoodsDetailQueryParam();
            queryParam.nBianHao          = -1;
            queryParam.strTrainmanName   = "";
            queryParam.strTrainmanNumber = "";
            queryParam.nLendingType      = 1;
            queryParam.nReturnState      = 0;
            actual = target.QueryDetails(queryParam);
            //Assert.AreEqual(expected, actual);
            Assert.IsNotNull(actual);
            //Assert.Inconclusive("验证此测试方法的正确性。");
        }
Ejemplo n.º 2
0
        public Get_OutQueryDetails QueryDetails(string data)
        {
            Get_OutQueryDetails json = new Get_OutQueryDetails();

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