public RequestResult OutStockCount(int pageindex, int pagesize, string startdate = "", string enddate = "", string keyword = "") { RequestResult result = new RequestResult(); try { int StartTimestamp = startdate != "" ? CommonFunc.GetTimestamp(Convert.ToDateTime(startdate + " 00:00:00")) : 0; int EndTimestamp = enddate != "" ? CommonFunc.GetTimestamp(Convert.ToDateTime(enddate + " 23:59:59")) : 0; int totalCount = 0; List <OutStokeRecord> CountList = ScaleOutStoke.GetOutStockCount(MobileUser.UserName, pagesize, pageindex, StartTimestamp, EndTimestamp, keyword, out totalCount); for (int i = 0; i < CountList.Count; i++) { CountList[i].ProductImg = WeConfig.b_domain + CountList[i].ProductImg; } result.data = CountList; result.pages = pageindex; result.total = totalCount; result.message = "成功"; result.success = true; } catch (Exception ex) { result.message = "失败,error:" + ex.Message; result.success = false; } return(result); }