示例#1
0
        public async Task <JsonResult> Save(CompanyEditDto editModel)
        {
            CheckModelState();

            bool   status  = false;
            string message = "";


            try
            {
                await _companyAppService.CreateOrUpdateCompanyAsync(new CreateOrUpdateCompanyInput()
                {
                    CompanyEditDto = editModel
                });

                status = true;
            }
            catch (Exception e)
            {
                status  = false;
                message = e.Message;
            }


            return(Json(new { success = status, message = message }));
        }