Esempio n. 1
0
        public async Task OnGetAsync(int id = 0)
        {
            if (id != 0)
            {
                Agent           = (await _agent.GetModelAsync(m => m.Id == id)).data;
                Agent.LoginName = (await _admin.GetModelAsync(m => m.Guid == Agent.Admin_Guid)).data.LoginName;
            }
            else
            {
                Agent = new CmsAgent();
            }

            Levels = (await _level.GetListAsync()).data;
        }
Esempio n. 2
0
 public Task <ApiResult <string> > UpdateStatus([FromBody] CmsAgent parm) => agentService.UpdateStatusAsync(parm);
Esempio n. 3
0
 public async Task <IActionResult> Edit([FromBody] CmsAgent parm)
 {
     return(Ok(await agentService.UpdateAsync(parm)));
 }
Esempio n. 4
0
        public async Task <IActionResult> Add([FromBody] CmsAgent parm)
        {
            parm.Curr_Admin_Guid = await HttpContext.LoginUserId();

            return(Ok(await agentService.AddAsync(parm)));
        }