示例#1
0
        public void QueryRecordTest()
        {
            // string ConnectionString = string.Empty; // TODO: 初始化为适当的值
            DBLendingInfo   target             = new DBLendingInfo(connstr); // TODO: 初始化为适当的值
            GoodsQueryParam GoodsQueryParamact = null;                       // TODO: 初始化为适当的值

            //定义参数

            GoodsQueryParamact = new GoodsQueryParam();
            GoodsQueryParamact.nLendingNumber    = -1;
            GoodsQueryParamact.nLendingType      = 0;
            GoodsQueryParamact.nReturnState      = 0;
            GoodsQueryParamact.strTrainmanName   = "张勇";
            GoodsQueryParamact.strTrainmanNumber = "2300679";
            GoodsQueryParamact.strWorkShopGUID   = "3b50bf66-dabb-48c0-8b6d-05db80591090";
            GoodsQueryParamact.dtBeginTime       = DateTime.Today.AddDays(-30);
            GoodsQueryParamact.dtEndTime         = DateTime.Today;
            List <LendingInfo> expected = null; // TODO: 初始化为适当的值
            List <LendingInfo> actual;

            actual = target.QueryRecord(GoodsQueryParamact);
            Assert.IsNotNull(actual);
            //Assert.AreEqual(expected, actual);
            // Assert.Inconclusive("验证此测试方法的正确性。");
        }
        public Get_OutQueryRecord QueryRecord(string data)
        {
            Get_OutQueryRecord json = new Get_OutQueryRecord();

            try
            {
                Get_InQueryRecord input = Newtonsoft.Json.JsonConvert.DeserializeObject <Get_InQueryRecord>(data);

                RlendingInfoList R  = new RlendingInfoList();
                DBLendingInfo    db = new DBLendingInfo(ConData.WebSiteConnectionString);

                R.lendingInfoList = db.QueryRecord(input.queryParam);
                json.data         = R;
                json.result       = "0";
                json.resultStr    = "返回成功";
            }
            catch (Exception ex)
            {
                json.result    = "1";
                json.resultStr = "提交失败:" + ex.Message;
            }
            return(json);
        }