示例#1
0
        public async Task <IActionResult> UpdateModal(Guid locationUID)
        {
            string _UserIDString = __UserManager.GetUserId(User);

            if (Guid.TryParse(_UserIDString, out Guid userUID))
            {
                LocationResponse _Response = await __LocationManager.GetAsync(new UIDRequest { UID = locationUID });

                if (!_Response.Success)
                {
                    return(Json(new ErrorActionModel {
                        Message = _Response.ErrorMessage
                    }));
                }

                return(PartialView("_EditLocation", _Response.ToEditViewModel()));
            }

            return(RedirectToAction("Index", "Stock", new { Area = "Stock", errorMessage = $"{GlobalConstants.ERROR_ACTION_PREFIX} retrieve user details to modify {ENTITY_NAME}" }));
        }