Esempio n. 1
0
        //ویژه کردن رویداد

        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"));
        }
Esempio n. 2
0
        public async Task <IActionResult> Details(int id)
        {
            var Event = await FEventServices.GetEventAsync(id);

            vmodel.Event = Event;


            return(View(vmodel));
        }
Esempio n. 3
0
        public async Task <ActionResult <Event> > FindEventsItem(int id)
        {
            var eventItem = await Event.GetEventAsync(id);

            if (eventItem == null)
            {
                return(NotFound());
            }

            return(eventItem);
        }
Esempio n. 4
0
        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));
        }
Esempio n. 5
0
        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"));
        }