//ویژه کردن رویداد public async Task <IActionResult> SpecialEvents(int?Id) { if (Id == null) { return(NotFound()); } ViewModel.InformationViewModel Vmodel = new ViewModel.InformationViewModel(); Vmodel.Event = await FEventServices.GetEventAsync(Id); Vmodel.Event.Statusevent = WebEventoo_DomainClasses.Model.Event.StatuseEvent.Special; await FEventServices.UpdateAsync(Vmodel.Event); return(RedirectToAction("Index")); }
public async Task <IActionResult> PutEventItem(long id, Event item) { if (id != item.Id) { return(BadRequest()); } await Event.UpdateAsync(item); return(NoContent()); }
public async Task <IActionResult> EditEvent(ViewModel.InformationViewModel vmodel) { if (ModelState.IsValid) { vmodel.Event.EventNow = DateTime.Now; vmodel.Event.StatuseChecked = true; vmodel.Event.StatuseEnter = true; await FEventServices.UpdateAsync(vmodel.Event); Message = "Ok Edit"; } return(RedirectToAction(nameof(Index))); }