public async Task <ActionResult> GetVendorForSpecificEvent(string Token, int eventId)
        {
            VendorsLogic SponsorBusiness = new VendorsLogic();
            var          data            = await SponsorBusiness.GetVendorForSpecificEvent(eventId);

            return(Json(new
            {
                data = data.Select(x => new
                {
                    x.ID,
                    x.Name,
                    Thumbnail = imageToUrlConvertionHandler(x.Thumbnail),
                    //Helpers.ImageToBase64(MvcCustom.APiImagePath(x.Thumbnail)),
                    x.Status,
                    x.Description,
                    x.DocURL,
                    iconimage = imageToUrlConvertionHandler(x.VendorsEvents.FirstOrDefault(y => y.EventID == eventId)?.UserPackageType?.iconimage),
                    //Helpers.ImageToBase64(MvcCustom.APiImagePath(x.VendorsEvents.FirstOrDefault(y => y.EventID== eventId)?.UserPackageType?.iconimage)),
                    x.TwitterURL,
                    x.WebsiteURL,
                    VendorPackageType = x.VendorsEvents.FirstOrDefault(y => y.EventID == eventId)?.UserPackageType?.Name,
                    x.VendorsEvents.FirstOrDefault(y => y.EventID == eventId)?.BoothNo,
                })
            }, JsonRequestBehavior.AllowGet));
        }
        public async Task <ActionResult> VendorById(string Token, int id, int eventID)
        {
            VendorsLogic attendesBusiness = new VendorsLogic();
            EventLogic   eventLogic       = new EventLogic();
            var          x = await attendesBusiness.GetVendorById(id);

            var vendorEvent     = x.VendorsEvents.FirstOrDefault(y => y.EventID == eventID);
            var VendorQuestions = await eventLogic.VendorSurveyQuestions(CurrentUserSession.AttendesID.Value, id);

            var floorMapping = vendorEvent?.FloorMapLocation?.FloorRegionMappings.FirstOrDefault();

            return(Json(new
            {
                data = new
                {
                    x.ID,
                    x.Name,
                    x.Description,
                    x.DocURL,
                    Thumbnail = imageToUrlConvertionHandler(x.Thumbnail),
                    //Helpers.ImageToBase64(MvcCustom.APiImagePath(x.Thumbnail)),
                    x.Status,
                    x.TwitterURL,
                    x.WebsiteURL,
                    vendorEvent?.BoothNo,
                    vendorEvent?.StartTime,
                    VendorPackageType = x.VendorsEvents.FirstOrDefault(y => y.EventID == eventID)?.UserPackageType?.Name,
                    vendorEvent?.EndTime,
                    SurveyQuestions = VendorQuestions.Select(a => new QuestionsWithOptions
                    {
                        QID = a.QID,
                        QuestionText = a.QuestionText,
                        IsAtActiivtyLevel = a.IsAtActiivtyLevel,
                        QuestionResponseType = a.QuestionResponseType,
                        HideorShowQuestion = a.HideorShowQuestion,
                        options = a.options,
                        IsSubmitted = a.IsSubmitted,
                        IsAtVendorLevel = a.IsAtVendorLevel,
                        IsAtSponsorLevel = a.IsAtSponsorLevel
                    }),
                    Note = x.Notes.FirstOrDefault(y => y.UserID == CurrentUserSession.AttendesID.Value && y.EventID == eventID)?.Text,
                    FloorMap = floorMapping != null ? new
                    {
                        floorMapping?.FloorMapping?.ID,
                        FloorName = vendorEvent?.FloorMapLocation?.Location
                    } : null,
                    Activities = x.VendorActivities.Select(y => y.Activite).Select(y => new { y.ID, y.Name, y.StartTime, y.EndTime }),
                    Vendors = x.VendorActivities.SelectMany(y => y.Activite.BookMarks.Select(z => z.Attende))
                              .Where(y => y.IsSpeaker).Distinct(new AttendeeComparer()).
                              Select(y => new
                    {
                        y.FirstName,
                        y.Lastname,
                        y.TitleName,
                        Thubnail = compressedImageConvertionHandler(y.Thumbnail)
                    })
                }
            }, JsonRequestBehavior.AllowGet));
        }
        // GET: API/Vendors
        public async Task <ActionResult> Index(string Token, string term = "")
        {
            VendorsLogic VendorBusiness = new VendorsLogic();
            var          data           = await VendorBusiness.GetVendor(term);

            return(Json(new
            {
                data = (await VendorBusiness.GetVendor(term)).Select(x => new
                {
                    Description = x.Description,
                    DocURL = x.DocURL,
                    ID = x.ID,
                    Name = x.Name,
                    //Package = x.UserPackageType.Name,
                    Status = x.Status,
                    Thumbnail = imageToUrlConvertionHandler(x.Thumbnail),
                    //Helpers.ImageToBase64(MvcCustom.APiImagePath(x.Thumbnail)),
                    TwitterURL = x.TwitterURL,
                    WebsiteURL = x.WebsiteURL,
                })
            }, JsonRequestBehavior.AllowGet));
        }