Beispiel #1
0
        public async Task <ActionResult> AssignVendorToEvent([FromBody] AssignVendorEvent _input)
        {
            List <VendorInvitation> _list = new List <VendorInvitation>();

            foreach (var item in _input.VIDetails)
            {
                VendorInvitation model = new VendorInvitation();
                model.VendorId       = item.UserId;
                model.EventDetailsId = item.EventDetailsId;
                model.StatusId       = 7;
                model.AdminComment   = "";
                model.VendorComment  = "";
                _list.Add(model);
            }
            var value = HttpContext.Session.GetString(SessionToken);

            if (string.IsNullOrEmpty(value))
            {
                string token = await getToken();

                HttpContext.Session.SetString(SessionToken, token);
                value = HttpContext.Session.GetString(SessionToken);
            }
            bool _out = await _event.AssingnVendorsToEvent(value, _list);

            if (_out == true)
            {
                return(Json(_input.EventId));
            }

            return(null);
        }
Beispiel #2
0
 public async Task <IActionResult> AssingnVendorsToEvent([FromBody] List <VendorInvitation> value)
 {
     return(Ok(await _event.AssingnVendorsToEvent(value)));
 }