Ejemplo n.º 1
0
        public bool UpdatePost(ContentTypeClassificationUpdateGet ContentTypeClassification)
        {
            string usp = "usp_ContentTypeClassificationUpdatePost @ContentTypeClassificationId, @ObjectTypeClassificationStatusId, @UserId";

            _sqlDataAccess.SaveData <ContentTypeClassificationUpdateGet>(usp, ContentTypeClassification);
            return(true);
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Edit(ContentTypeClassificationUpdateGet ContentTypeClassification)
        {
            var token = HttpContext.Session.GetString("Token"); if (token == null)
            {
                return(RedirectToAction("Login", "FrontAuth"));
            }
            var ContentTypeClassificationUpdateGetWithErrorMessage = await _client.PostProtectedAsync <ContentTypeClassificationUpdateGetWithErrorMessages>($"{_configuration["APIUrl"]}api/ContentTypeClassification/Update", ContentTypeClassification, token);

            if (ContentTypeClassificationUpdateGetWithErrorMessage.ErrorMessages.Count > 0)
            {
                var AllStuff = await _loadViewBagModel.ViewBagLoad(this.ControllerContext.RouteData.Values["controller"].ToString(), this.ControllerContext.RouteData.Values["action"].ToString(), token, _hostingEnv.EnvironmentName, _configuration, false, 0, "");

                AllStuff.ErrorMessages = ContentTypeClassificationUpdateGetWithErrorMessage.ErrorMessages;
                ViewBag.AllStuff       = AllStuff;
                //ViewBag.Favorites = await _client.GetProtectedAsync<List<MVCFavoriteMenu>>($"{_configuration["APIUrl"]}api/MVCFavorite/Menu", token);
                //ViewBag.FavoriteGroupList = await _client.GetProtectedAsync<List<MVCFavoriteGroupList>>($"{_configuration["APIUrl"]}api/MVCFavorite/GroupList", token);
                //ViewBag.UITerms = await _client.GetProtectedAsync<List<UITermLanguageCustomizationList>>($"{_configuration["APIUrl"]}api/MVC/ContentTypeClassification/Edit", token);
                //ViewBag.Env = _hostingEnv.EnvironmentName;

                //ViewBag.ErrorMessages = ContentTypeClassificationUpdateGetWithErrorMessage.ErrorMessages;
                return(View(ContentTypeClassificationUpdateGetWithErrorMessage.ContentTypeClassification));
            }

            return(RedirectToAction("Index", new { id = ContentTypeClassification.ContentTypeId }));
        }