예제 #1
0
        //[NoCache]
        ////[SessionExpire]
        //public ActionResult Details(int? id)
        //{
        //    TempData["TrendingTagsFooter"] = MatchBxCommon.GetTrendingTagsFooter();
        //    TempData["BidMessage"] = "";
        //    TempData["BidAmount"] = "";
        //    TempData["AXPRFeeAmt"] = "0.00";
        //    TempData["AXPRFeeTotAmt"] = "";
        //    TempData["BidAmountinDollar"] = "";
        //    TempData["JobBiddingId"] = "";
        //    Session["Expired"] = "N";
        //    Session["FromDetails"] = "Y";

        //    dynamic model = new ExpandoObject();
        //    int gigid = id.GetValueOrDefault();
        //    Session["GigId"] = gigid;
        //    if (gigid != 0)
        //    {
        //        objGigList = MatchBxCommon.GenerateBadge(objGigMod.GetGigPost(gigid));
        //        if (objGigList.Count() > 0)
        //        {
        //            objGigList.FirstOrDefault().GigSkillsMappingList = objGigMod.GetSkillsByGigId(gigid);
        //            objGigList.FirstOrDefault().GigTrendingTagsMappingList = objGigMod.GetTagsByGigId(gigid);
        //            objGig = objGigList.FirstOrDefault();
        //            // Session["JobPoster"] = objGig.UserId;

        //            Session["GigCategory"] = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(objGig..ToLower());
        //            Session["GigCategoryHeader"] = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(objGig.Category.ToLower());

        //            if (Session["GigCategoryId"].ToString() == "0")
        //            {
        //                Session["GigCategoryName"] = CultureInfo.CurrentCulture.TextInfo.ToTitleCase("ALL JOBS".ToLower());
        //            }
        //            else
        //            {
        //                Session["GigCategoryName"] = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(objGig.Category.ToLower());
        //            }
        //        }

        //    }
        //    return View("Details", objGig);
        //}

        public ActionResult Search()
        {
            TempData["TrendingTagsFooter"] = MatchBxCommon.GetTrendingTagsFooter();
            Gig               _Gig               = new Gig();
            GigModel          _GigModel          = new GigModel();
            TrendingTagsModel _TrendingTagsModel = new TrendingTagsModel();
            TrendingTags      _TrendingTags      = new TrendingTags();

            _Gig.TrendingTagsIdList = "0";
            _Gig.SkillsList         = "0";
            List <Gig> _GigList = _GigModel.GetGigDetails(_Gig).OrderByDescending(x => x.GigId).ToList <Gig>();

            _TotalRecord = _GigList.Count();
            if (_TotalRecord > _RecordDisplay)
            {
                _loadmore = 1;
            }
            else
            {
                _loadmore = 0;
            }

            _GigList.ForEach(x => x.Isloadmore = _loadmore);
            _GigList = _GigList.Take(_RecordDisplay).ToList();

            dynamic model = new ExpandoObject();

            model.Gig              = MatchBxCommon.GenerateBadgeForGig(_GigList).OrderByDescending(x => x.GigId).ToList <Gig>();
            model.TopJobSeekers    = _GigModel.GetTopJobSeekers(_Gig);
            model.VerifiedPartners = objJobMod.GetVerifiedPartners(objJob);
            model.TrendingTags     = _TrendingTagsModel.GetTrendingTagsForGig(_TrendingTags);
            model.messageSender    = 0;
            return(View("Search", model));
        }
예제 #2
0
        public ActionResult Search()
        {
            Gig               _Gig               = new Gig();
            GigModel          _GigModel          = new GigModel();
            TrendingTagsModel _TrendingTagsModel = new TrendingTagsModel();
            TrendingTags      _TrendingTags      = new TrendingTags();

            _Gig.TrendingTagsIdList = "0";
            _Gig.SkillsList         = "0";
            List <Gig> _GigList = _GigModel.GetGigDetails(_Gig);

            _TotalRecord = _GigList.Count();
            if (_TotalRecord > _RecordDisplay)
            {
                _loadmore = 1;
            }
            else
            {
                _loadmore = 0;
            }

            _GigList.ForEach(x => x.Isloadmore = _loadmore);
            _GigList = _GigList.Take(_RecordDisplay).ToList();

            dynamic model = new ExpandoObject();

            model.Gig           = MatchBxCommon.GenerateBadgeForGig(_GigList);
            model.TopJobSeekers = _GigModel.GetTopJobSeekers(_Gig);
            model.TrendingTags  = _TrendingTagsModel.GetTrendingTagsForGig(_TrendingTags);
            return(View("Search", model));
        }
예제 #3
0
        public JsonResult LoadMoreGigs(int id, string _searchtext, string trendingtagsid)
        {
            dynamic  model     = new ExpandoObject();
            Gig      _Gig      = new Gig();
            GigModel _GigModel = new GigModel();

            _Gig.TrendingTagsIdList = trendingtagsid;
            _Gig.SkillsList         = "0";
            List <Gig> _GigList   = new List <Gig>();
            List <Gig> objGigList = new List <Gig>();

            objGigList = MatchBxCommon.GenerateBadgeForGig(_GigModel.GetGigDetails(_Gig).OrderByDescending(x => x.GigId).Where(x => x.GigId < id).ToList());
            if (!string.IsNullOrEmpty(_searchtext))
            {
                _GigList = objGigList.Where(p => p.GigDescription != null && p.GigDescription.ToLower().Contains(_searchtext.ToLower().Trim()) || p.GigTitle != null && p.GigTitle.ToLower().Contains(_searchtext.ToLower().Trim()) || p.GigDurationString != null && p.GigDurationString.ToLower().Contains(_searchtext.ToLower()) || p.TrendingTagsIdList != null && p.TrendingTagsIdList.ToLower().Contains(_searchtext.ToLower())).ToList();

                _TotalRecord = _GigList.Count();
                if (_TotalRecord > _RecordDisplay)
                {
                    _loadmore = 1;
                }
                else
                {
                    _loadmore = 0;
                }
                _GigList.ForEach(x => x.Isloadmore = _loadmore);
                model.Gig = _GigList.Take(_RecordDisplay);
            }
            else
            {
                _GigList     = objGigList;
                _TotalRecord = _GigList.Count();
                if (_TotalRecord > _RecordDisplay)
                {
                    _loadmore = 1;
                }
                else
                {
                    _loadmore = 0;
                }
                _GigList.ForEach(x => x.Isloadmore = _loadmore);
                model.Gig = _GigList.Take(_RecordDisplay);
            }

            return(Json(model.Gig, JsonRequestBehavior.AllowGet));
        }