Beispiel #1
0
        public IActionResult Edit(ReminderModel reminderModel)
        {
            if (ModelState.IsValid)
            {
                var result = _business.Update(reminderModel);

                if (result)
                {
                    return(RedirectToAction("", new { Type = TypeMessage.Success, Message = Resource.ResourceManager.GetString("SuccessEditMessage") }));
                }
                else
                {
                    return(RedirectToAction("Edit", new { Type = TypeMessage.Error, Message = Resource.ResourceManager.GetString("ErrorGenericMessage") }));
                }
            }

            return(View(reminderModel));
        }
Beispiel #2
0
        public IActionResult Put([FromBody] ReminderModel reminderModel)
        {
            var result = _business.Update(reminderModel);

            if (result)
            {
                return(Ok(new { Type = TypeMessage.Success, Message = Resource.ResourceManager.GetString("SuccessEditMessage") }));
            }
            else
            {
                return(BadRequest(new { Type = TypeMessage.Error, Message = Resource.ResourceManager.GetString("ErrorGenericMessage") }));
            }
        }