public ActionResult SearchCoolBrotherByBranchStat(SearchCoolBrotherByBranchModel searchModel) { var currentDateTime = DateTime.Now; var currentStartMonth = currentDateTime.AddDays(1 - currentDateTime.Day).Date; //本月月初 var currentEndMonth = currentStartMonth.AddMonths(1).AddDays(-1).Date.AddDays(1).AddSeconds(-1); //本月月末 searchModel.BegDate = searchModel.BegDate ?? currentStartMonth; searchModel.EndDate = searchModel.EndDate ?? currentEndMonth; return PartialView("_CoolBrotherByBranchStatList", CBReportBLL.GetCoolBrotherByBranch(searchModel.BranchId, searchModel.BegDate.Value, searchModel.EndDate.Value)); }
public ActionResult CoolBrotherByBranchStat(SearchCoolBrotherByBranchModel searchModel) { return View("CoolBrotherByBranchStat", new SearchCoolBrotherByBranchModel() { BegDate = DateTime.Now.Date.AddMonths(-1),EndDate = DateTime.Now.Date }); }