Exemple #1
0
        //   [HttpPost]
        //   [IgnoreAntiforgeryToken]
        // [TypeFilter(typeof(AuthorizeAction), Arguments = new object[] { "Write" })]
        public IActionResult AddUpdate(RoleViewModel model)
        {
            // Inserts or Udates Data
            model.role.ID = model.role.Name;

            if (ModelState.IsValid)
            {
                return(Json(_interface.AddUpdate(model.role)));
            }
            else
            {
                resp.Message = Constants.ControllerMessage.All_Fields_Mandatory;
                return(Json(resp));
            }
        }