//ویژه کردن رویداد 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> Details(int id) { var Event = await FEventServices.GetEventAsync(id); vmodel.Event = Event; return(View(vmodel)); }
public async Task <ActionResult <Event> > FindEventsItem(int id) { var eventItem = await Event.GetEventAsync(id); if (eventItem == null) { return(NotFound()); } return(eventItem); }
public async Task <IActionResult> EditEvent(int?Id) { if (Id == null) { return(NotFound()); } ViewModel.InformationViewModel Vmodel = new ViewModel.InformationViewModel(); Vmodel.Event = await FEventServices.GetEventAsync(Id); if (Vmodel.Event == null) { return(NotFound()); } return(View(Vmodel)); }
public async Task <IActionResult> DeleteExhibition(int Id) { if (Id == null) { return(NotFound()); } var Event = await FEventServices.GetEventAsync(Id); await FnotPublished.AddAsync(new WebEventoo_DomainClasses.Model.NotPublished() { DeleteDate = DateTime.Now.ToPersianDateString(), NameEvent = Event.CaptionEvent }); await FExhibitionServices.DeleteConfirmedAsync(Id); Message = "Delete Ok"; return(RedirectToAction("Index")); }