public async Task OnGetAsync(long?id) { Templets = await _templetService.GetListAsync(new SmsTempletSearch { IsDeleted = false }, null); if (id.HasValue) { Dto = await _service.GetByIdAsync(id.Value); if (Dto == null) { throw new KuDataNotFoundException(); } ViewData["Mode"] = "Edit"; } else { Dto = new SmsDto(); ViewData["Mode"] = "Add"; } }
public async Task <IActionResult> GetTempletList(int page, int rows, SmsTempletSearch where) { var data = await _templetService.GetListAsync(page, rows, where, null); return(PagerData(data.items, page, rows, data.count)); }