/// <summary> /// 依據LogTable加總點數 /// </summary> /// <param name="data"></param> /// <returns></returns> public int PointSum(string Appid) { List <InsurePointLog> beSearched = _pointRepo.SearchPointLog(Appid); int sum = 0; foreach (var pointResault in beSearched) { sum += pointResault.Point; } return(sum); }
public ActionResult SearchLog(string AppId) { List <InsurePointLog> resultList = _pointRepo.SearchPointLog(AppId); if (resultList.Count == 0) { return(Json(new { IsSuccess = false, Code = "0001", Message = "查無資料" })); } else { return(PartialView("_LogQueryResult", resultList)); } }