示例#1
0
        public async Task <IActionResult> EditCompanyInfo(GetCompanyInfoCommand cmd)
        {
            var result = await _mediator.Send(cmd, HttpContext.RequestAborted);

            var types = await _mediator.Send(new GetCompanyTypesCommand(), HttpContext.RequestAborted);

            ViewBag.types = types;

            return(View(result));
        }
示例#2
0
        public async Task <IActionResult> AddCompanyInfo(GetCompanyInfoCommand cmd)
        {
            var user = this.CurrentUser;

            cmd.CompanyId = user.CompanyId;
            var result = await _mediator.Send(cmd, HttpContext.RequestAborted);

            var types = await _mediator.Send(new GetCompanyTypesCommand(), HttpContext.RequestAborted);

            ViewBag.types = types;

            return(View(result));
        }