Beispiel #1
0
        public async Task OnGetAsync(long?id, EmUserMaterialGroupType type = EmUserMaterialGroupType.Picture)
        {
            if (id.HasValue)
            {
                Dto = await _service.GetByIdAsync(id.Value);

                if (Dto == null)
                {
                    throw new KuDataNotFoundException();
                }
                ViewData["Mode"] = "Edit";
            }
            else
            {
                Dto              = new UserMaterialGroupDto();
                Dto.Type         = type;
                ViewData["Mode"] = "Add";
            }
        }
Beispiel #2
0
 public void OnGet(EmUserMaterialGroupType type = EmUserMaterialGroupType.Picture)
 {
     Type = type;
 }