Ejemplo n.º 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));
        }
Ejemplo n.º 2
0
        public ActionResult Index(int?id)
        {
            if (Session["IsEmailAlready"] != null)
            {
                ViewBag.IsEmailAlready    = "Y";
                Session["IsEmailAlready"] = null;
            }
            else
            {
                //Session["IsEmailAlready"] = "N";
                ViewBag.IsEmailAlready    = "N";
                Session["IsEmailAlready"] = null;
            }
            dynamic model = new ExpandoObject();

            if (Session["FromDetails"] != null && Session["DynModel"] != null)
            {
                model = (dynamic)Session["DynModel"];
                model.TopJobPosters    = (List <Job>)Session["TopJobPosters"];
                model.VerifiedPartners = (List <Job>)Session["VerifiedPartners"];
                model.TrendingTags     = (List <TrendingTags>)Session["TrendingTags"];
                Session["FromDetails"] = null;
                Session["DynModel"]    = null;
            }
            else
            {
                if (id.GetValueOrDefault() == 0)
                {
                    objJob.TrendingTagsIdList = "0";
                }
                else
                {
                    objJob.TrendingTagsIdList = id.GetValueOrDefault().ToString();
                    ViewBag.CurrentTag        = id.GetValueOrDefault().ToString();
                }
                objJob.SkillsList = "0";
                List <Job> _JobList = new List <Job>();
                objJob.SortBy = "B";
                GetCategory();
                objJob.FromPage = category;
                //if (Session["UserId"] != null)
                //{
                //    objJob.FromPage = "J";
                //}
                //else
                //{
                //    objJob.FromPage = "B";
                //}

                _JobList = objJobMod.GetJobDetails(objJob).OrderByDescending(x => x.Rownumber).ToList();

                if (_JobList.Count == 1)
                {
                    ViewBag.MetaTag = HomeMetaTags(_JobList[0].JobTitle.ToString(), _JobList[0].JobDescription.ToString());
                }
                else if (_JobList.Count > 1)
                {
                    ViewBag.MetaTag = HomeMetaTags("Hire freelancers, pay in cryptocurrency", "Complete jobs to earn AXPR, or post a job and have great freelancers come to you");
                }

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


                _JobList.ForEach(x => x.Isloadmore = _loadmore);
                _JobList                 = _JobList.Take(_RecordDisplay).ToList();
                model.Job                = MatchBxCommon.GenerateBadge(_JobList);
                model.TopJobPosters      = objJobMod.GetTopJobPosters(objJob);
                model.VerifiedPartners   = objJobMod.GetVerifiedPartners(objJob);
                Session["TopJobPosters"] = model.TopJobPosters;
                //if (Session["UserId"] != null)
                //{
                //    objTrending.FromPage = "J";
                //}
                //else
                //{
                //    objTrending.FromPage = "B";
                //}
                // GetCategory();
                objTrending.FromPage       = category;
                model.TrendingTags         = objTrendingMod.GetTrendingTags(objTrending);
                Session["TrendingTags"]    = model.TrendingTags;
                Session["JobCategoryName"] = "";
                Session["JobCategoryId"]   = 0;
                //TempData["TrendingTagsFooter"] = MatchBxCommon.GetTrendingTagsFooter();
            }
            List <JobCategory> _JobcategoryList = new List <JobCategory>();
            JobCategoryModel   JobModel         = new JobCategoryModel();

            _JobcategoryList       = JobModel.GetList();
            Session["JobCategory"] = _JobcategoryList;
            model.messageSender    = 0;
            if (Request.QueryString["mailMessagId"] != null)
            {
                string _messageSender = Request.QueryString["mailMessagId"].ToString();
                model.messageSender     = Convert.ToInt32(_messageSender);
                Session["mailMessagId"] = _messageSender;
            }

            TempData["TrendingTagsFooter"] = MatchBxCommon.GetTrendingTagsFooter(objTrending.FromPage);
            return(View("Index", model));
        }