Esempio n. 1
0
        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";
            }
        }
Esempio n. 2
0
        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));
        }