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> PutEventItem(long id, Event item)
        {
            if (id != item.Id)
            {
                return(BadRequest());
            }
            await Event.UpdateAsync(item);

            return(NoContent());
        }
Esempio n. 3
0
        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)));
        }