public async Task <IActionResult> AddEvent(AddEventCVM _eventDetails) { _eventDetails.Event.UserID = CurrentUser.ID; var response = await mediator.Send(new AddEventCommand { EventDetails = _eventDetails.Event }); return(Json(true)); }
public async Task <IActionResult> BookingForm() { var _packageNames = await mediator.Send(new GetEventPackageQuery()); var _clientNames = await mediator.Send(new GetClientListQuery()); List <SelectListItem> _list = new List <SelectListItem>(); List <SelectListItem> _clientlist = new List <SelectListItem>(); foreach (var item in _packageNames) { _list.Add(new SelectListItem { Value = item.ID.ToString(), Text = item.Name }); } foreach (var item in _clientNames) { _clientlist.Add(new SelectListItem { Value = item.ID.ToString(), Text = item.Name, }); } _clientlist.Add(new SelectListItem { Text = "Add New Client", Value = "Add New Client" }); var _addEventList = new AddEventCVM(); _addEventList.PackageList = _list; _addEventList.ClientList = _clientlist; return(View(_addEventList)); }