public ActionResult _Index_SmsReview() { ReviewModel rwModel = new ReviewModel(); rwModel = SmsList.GetReviewList(1, 1, 0, DateTime.Now.AddDays(-6), DateTime.Now); return(PartialView(rwModel.Data)); }
public ActionResult SmsReview(int pageIndex = 1, int pageSize = 15, string timePeriod = "7", string start = "", string end = "") { ViewBag.page = pageIndex; ReviewModel rModel = new ReviewModel(); DateTime st = DateTime.Now.AddDays(-6); DateTime ed = DateTime.Now; if (pageIndex != 1) { st = TempData["st"] == null ? st : Convert.ToDateTime(TempData["st"]); ed = TempData["ed"] == null ? st : Convert.ToDateTime(TempData["ed"]); } else { switch (timePeriod) { case "7": st = DateTime.Now.AddDays(-6); break; case "15": st = DateTime.Now.AddDays(-14); break; case "30": st = DateTime.Now.AddDays(-29); break; case "other": ed = Convert.ToDateTime(end); st = Convert.ToDateTime(start); break; default: break; } TempData["st"] = st; TempData["ed"] = ed; } rModel = SmsList.GetReviewList(pageIndex, 0, 0, st, ed); ViewBag.AllPage = rModel.PageSize / 20 + 1; return(View(rModel.Data)); }