public List <AgentTranModel> TranList(AgentTranModel model) { List <AgentTranModel> _list = new List <AgentTranModel>(); if (model.ToDate != null) { model.ToDate = model.ToDate.Value.AddHours(23).AddMinutes(59); } var obj = ent.MRC_AgentTrans(model.FromDate, model.ToDate, model.ReportType).OrderBy(x => x.AgentCode); foreach (var item in obj) { AgentTranModel _model = new AgentTranModel { AgentCode = item.AgentCode, AgentName = item.AgentName, IsSuccess = item.IsSuccess, TranCount = item.TranCount, TranDate = item.TranDate }; _list.Add(_model); } return(_list); }
public ActionResult TranReport() { AgentTranModel _model = new AgentTranModel(); _model.ddlReportType = ser.ddlReportTypeList(); return(View(_model)); }
public ActionResult TranReport(AgentTranModel model) { AgentTranModel _model = new AgentTranModel(); model.ddlReportType = ser.ddlReportTypeList(); model.List = ser.TranList(model); return(View(model)); }
public IPagedList <AgentTranModel> PagedTranList(AgentTranModel model, int?page) { int currentPageIndex = page.HasValue ? page.Value : 1; return(TranList(model).ToPagedList(currentPageIndex, TrainGeneralRepository.DefaultPageSize)); }