Пример #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 JsonResult PurchasedGigsLoadMore(int id)
 {
     objPurchasedGig.UserId = Convert.ToInt32(Session["PublicProfileId"]);
     objPurchasedGigList    = MatchBxCommon.GenerateBadgeForGig(objGigMod.GetPurchasedGig(objPurchasedGig));
     model.PurchasedGig     = objPurchasedGigList.Where(x => x.GigSubscriptionId > id).ToList().Take(_RecordDisplay);
     return(Json(model.PurchasedGig, JsonRequestBehavior.AllowGet));
 }
Пример #3
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));
        }
Пример #4
0
 public JsonResult ListedGigsLoadMore(int id, string skillid)
 {
     //objGig.TrendingTagsIdList = "0";
     //objGig.SkillsList = "0";
     objGig.UserId      = Convert.ToInt32(Session["PublicProfileId"]);
     objGig.LoginUserId = Convert.ToInt32(Session["UserId"]);
     objGigList         = MatchBxCommon.GenerateBadgeForGig(objGigMod.GetGigDetailsProfile(objGig));
     model.ListedGig    = objGigList.Where(x => x.GigId < id).ToList().Take(_RecordDisplay);
     return(Json(model.ListedGig, JsonRequestBehavior.AllowGet));
 }
Пример #5
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));
        }
Пример #6
0
        public ActionResult LoadMoreGig(string _searchtext, int JobCategoryId, string SortBy, int id)
        {
            GigModel _GigModel = new GigModel();
            Gig      _Gig      = new Gig();

            _Gig.JobCategoryId = JobCategoryId;
            _Gig.SortBy        = SortBy;
            List <Gig> _GigList = new List <Gig>();

            _GigList = SortBy == "N" ? (MatchBxCommon.GenerateBadgeForGig(_GigModel.GetGigReview(_Gig).Where(x => x.GigId < id).ToList())) : (MatchBxCommon.GenerateBadgeForGig(_GigModel.GetGigReview(_Gig).Where(x => x.GigId > id).ToList()));
            if (_GigList.Count > 0)
            {
                //foreach (Job _job in _JobList)
                //{
                _GigList.ForEach(s => s.BudgetASPInt = Convert.ToInt32(s.BudgetASP));
                // _JobList.ForEach(s => s.EndsIn = (s.JobCompletionDate.Subtract(DateTime.Now)).Days + " days, " + (s.JobCompletionDate.Subtract(DateTime.Now)).Hours + " hours");
                //}
                if (!String.IsNullOrEmpty(_searchtext))
                {
                    _GigList = _GigList.Where(p => p.GigDescription != null && p.GigDescription.ToLower().Contains(_searchtext.ToLower().Trim()) || p.GigTitle != null && p.GigTitle.ToLower().Contains(_searchtext.ToLower().Trim()) || p.TrendingTagsIdList != null && p.TrendingTagsIdList.ToLower().Contains(_searchtext.ToLower()) || p.SkillsList != null && p.SkillsList.ToLower().Contains(_searchtext.ToLower())).ToList();
                }
                var objJobListFiltered = _GigList.GroupBy(x => x.GigId).Select(y => y.First()).ToList();
                ReviewRecord = objJobListFiltered.Count();
                if (ReviewRecord > recordDisplay)
                {
                    reviewloadmore = 1;
                }
                else
                {
                    reviewloadmore = 0;
                }
                objJobListFiltered.ForEach(x => x.Isloadmore = reviewloadmore);
                model.GigReview = objJobListFiltered.Take(recordDisplay);
                return(Json(model.GigReview, JsonRequestBehavior.AllowGet));
            }
            else
            {
                return(Json("Failed", JsonRequestBehavior.AllowGet));
            }
        }
Пример #7
0
        //[SessionExpire]
        public ActionResult Index(int?id)
        {
            TempData["TrendingTagsFooter"] = MatchBxCommon.GetTrendingTagsFooter();
            TempData["RecordDisplay"]      = _RecordDisplay;
            //Session["ProfilePic"] = "/Content/images/client_pic_1.png";
            int userid = id.GetValueOrDefault();

            if (userid.ToString() != null)
            {
                Session["MemberNo"]        = userid;
                Session["PublicProfileId"] = userid;

                // Gus: 2FA
                TwoFactorAuthenticator tfa = new TwoFactorAuthenticator();
                string useruniquekey       = Convert.ToString(userid) + Session["UserName"];
                Session["Useruniquekey"] = useruniquekey;
                var setupinfo = tfa.GenerateSetupCode("MatchBX-" + Session["email"], useruniquekey, 280, 280);
                ViewBag.qrcode     = setupinfo.QrCodeSetupImageUrl;
                ViewBag.manualcode = setupinfo.ManualEntryKey;
            }

            objProfile = objProfileMod.LoadUserProfile(userid).FirstOrDefault();

            try
            {
                string rating = Adjust(decimal.ToDouble(objProfile.Rating)).ToString();
                if (rating.Contains('.'))
                {
                    string[] parts = rating.Split('.');
                    TempData["RatingWhole"] = parts[0];
                    if (parts[1] != null)
                    {
                        TempData["RatingFraction"] = parts[1];
                    }
                    else
                    {
                        TempData["RatingFraction"] = 0;
                    }
                }
                else
                {
                    TempData["RatingWhole"]    = rating;
                    TempData["RatingFraction"] = 0;
                }
            }
            catch (Exception ex)
            {
            }

            model.Profile = objProfile;

            objUserSkillList = objUserSkill.SkillsByUserId(userid);
            objUserSkillList.ToList().ForEach(x => x.Description = "#" + x.Description.ToString());

            string userskilllist = "";

            foreach (var item in objUserSkillList)
            {
                if (objUserSkillList.IndexOf(item) == objUserSkillList.Count - 1)
                {
                    userskilllist += item.Description;
                }
                else
                {
                    userskilllist += item.Description + ", ";
                }
            }

            model.UserSkill = objUserSkillList;
            model.Skill     = userskilllist;

            if (userid != 0)
            {
                objJob.TrendingTagsIdList          = "0";
                objJob.SkillsList                  = "0";
                objJob.UserId                      = userid;
                Session["PublicProfileId"]         = userid;
                objCompletedJob.TrendingTagsIdList = "0";
                objCompletedJob.SkillsList         = "0";
                objCompletedJob.JobSeekerId        = userid;
                objCompletedJob.FromPage           = "J";
                objJob.FromPage                    = "J";
                //objGig.TrendingTagsIdList = "0";
                //objGig.SkillsList = "0";
                objGig.UserId           = userid;
                objGig.LoginUserId      = Convert.ToInt32(Session["UserId"]);
                objPurchasedGig.UserId  = userid;
                objCompletedJobList     = objJobMod.GetJobDetails(objCompletedJob);
                model.CompletedJobCount = objCompletedJobList.Count();
                model.CompletedJob      = MatchBxCommon.GenerateBadge(objCompletedJobList.Take(_RecordDisplay).ToList());
                objJobList           = objJobMod.GetJobDetails(objJob);
                model.ListedJobCount = objJobList.Count();
                model.ListedJob      = MatchBxCommon.GenerateBadge(objJobList.Take(_RecordDisplay).ToList());
                objGigList           = objGigMod.GetGigDetailsProfile(objGig);
                model.ListedGigCount = objGigList.Count();
                model.ListedGig      = MatchBxCommon.GenerateBadgeForGig(objGigList.Take(_RecordDisplay).ToList());
                //model.UserSkill = objUserSkill.LoadSkillsByUserId(userid);
                objPurchasedGigList     = objGigMod.GetPurchasedGig(objPurchasedGig);
                model.PurchasedGigCount = objPurchasedGigList.Count();
                model.PurchasedGig      = MatchBxCommon.GenerateBadgeForGig(objPurchasedGigList.Take(_RecordDisplay).ToList());
                model.WithID            = "Y";
            }
            else
            {
                model.WithID = "N";
            }
            model.messageSender = 0;
            //model.Job.messageSender=0;
            return(View("Index", model));
        }
Пример #8
0
        public ActionResult Details(int?id, int?subid, string type = "")
        {
            TempData["TrendingTagsFooter"]       = MatchBxCommon.GetTrendingTagsFooter();
            TempData["BidMessage"]               = "";
            TempData["GigAmount"]                = "";
            TempData["AXPRFeeAmt"]               = "0.00";
            TempData["AXPRFeeTotAmt"]            = "";
            TempData["BidAmountinDollar"]        = "";
            TempData["GigSubscriptionId"]        = 0;
            TempData["GigCompletionDate"]        = "";
            TempData["GigTitle"]                 = string.Empty;
            TempData["GigCompletionDate"]        = "";
            TempData["JobCompletionDateDisplay"] = "";
            //Session["Expired"] = "N";
            //Session["FromDetails"] = "Y";
            Session["GigSubDocMasterList"]    = null;
            Session["GigSubDocList"]          = null;
            TempData["NoofDocuments"]         = 0;
            TempData["GigSubscriptionStatus"] = "S";

            dynamic        model           = new ExpandoObject();
            GigModel       _GigModel       = new GigModel();
            GigReviewModel _GigReviewModel = new GigReviewModel();
            Gig            _Gig            = new Gig();

            int gigid = id.GetValueOrDefault();

            Session["GigId"]    = gigid;
            Session["SubGigId"] = subid.GetValueOrDefault();
            if (gigid != 0)
            {
                List <Gig> _GigList = MatchBxCommon.GenerateBadgeForGig(_GigModel.GetGigPost(gigid));
                if (_GigList.Count() > 0)
                {
                    _GigList.FirstOrDefault().GigSkillsMappingList       = _GigModel.GetSkillsByGigId(gigid);
                    _GigList.FirstOrDefault().GigTrendingTagsMappingList = _GigModel.GetTagsByGigId(gigid);
                    _Gig = _GigList.FirstOrDefault();
                    Session["JobPoster"] = _Gig.UserId;

                    Session["JobCategory"]       = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(_Gig.Category.ToLower());
                    Session["JobCategoryHeader"] = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(_Gig.Category.ToLower());

                    if (Session["JobCategoryId"] != null && Session["JobCategoryId"].ToString() == "0")
                    {
                        Session["JobCategoryName"] = CultureInfo.CurrentCulture.TextInfo.ToTitleCase("ALL SERVICES".ToLower());
                    }
                    else
                    {
                        Session["JobCategoryName"] = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(_Gig.Category.ToLower());
                    }

                    decimal exchangerate = MatchBxCommon.GetExchangeRate();
                    decimal bid          = Convert.ToDecimal(_Gig.BudgetASP);
                    decimal perc         = (Convert.ToDecimal(bid) * 3) / 100;
                    TempData["AXPRFeeAmt"] = perc.ToString("#,##0.00");
                    string totalfees = (bid + perc).ToString("#,##0.00");
                    TempData["AXPRFeeTotAmt"] = totalfees;
                    TempData["GigAmount"]     = _Gig.BudgetASP.ToString() + " AXPR";
                    //TempData["BidAmountinDollar"] = (Math.Round(exchangerate * (bid + perc), 2)).ToString("#,##0.00");
                    TempData["BidAmountinDollar"] = (Math.Round(exchangerate * (bid), 2)).ToString("#,##0.00");

                    UserProfileModel objProfileMod = new UserProfileModel();
                    UserProfile      objProfile    = new UserProfile();
                    objProfile      = objProfileMod.LoadUserProfile(_Gig.UserId).FirstOrDefault();
                    _Gig.ProfilePic = objProfile.ProfilePic;

                    if (type == "R")
                    {
                        var _SubObj = new GigSubscription();
                        _SubObj.GigId            = Convert.ToInt32(id);
                        _Gig.GigSubscriptionList = new GigSubscriptionModel().GetGigSubscriptions(_SubObj);
                    }
                    else if (type == "A")
                    {
                        var _SubObj = new GigSubscription();
                        _SubObj.GigId            = Convert.ToInt32(id);
                        _Gig.GigActiveOrdersList = new GigSubscriptionModel().GetActiveOrders(_SubObj);
                    }
                    else if (type == "C")
                    {
                        var _SubObj = new GigSubscription();
                        _SubObj.GigId = Convert.ToInt32(id);
                        _Gig.GigCompletedOrdersList = new GigSubscriptionModel().GetCompletedOrders(_SubObj);
                    }
                    _Gig.GigReviewList = _GigReviewModel.GetReviewForGig(gigid);
                    if (_Gig.GigReviewList.Count > _RecordDisplay)
                    {
                        _Gig.GigReviewList.ForEach(s => s.Isloadmore = 1);
                    }
                    else
                    {
                        _Gig.GigReviewList.ForEach(s => s.Isloadmore = 0);
                    }
                    TempData["ReviewCount"] = _Gig.GigReviewList.Count();
                    _Gig.GigReviewList      = _Gig.GigReviewList.Take(_RecordDisplay).ToList();

                    try
                    {
                        string rating = Adjust(decimal.ToDouble(objProfile.Rating)).ToString();
                        TempData["Rating"]      = rating;
                        TempData["RatingCount"] = Adjust(decimal.ToDouble(objProfile.RatingCount)).ToString();
                        if (rating.Contains('.'))
                        {
                            string[] parts = rating.Split('.');
                            TempData["RatingWhole"] = parts[0];
                            if (parts[1] != null)
                            {
                                TempData["RatingFraction"] = parts[1];
                            }
                            else
                            {
                                TempData["RatingFraction"] = 0;
                            }
                        }
                        else
                        {
                            TempData["RatingWhole"]    = rating;
                            TempData["RatingFraction"] = 0;
                        }
                    }
                    catch (Exception ex)
                    {
                    }

                    if (Convert.ToInt32(Session["UserId"]) != _Gig.UserId)
                    {
                        if (subid.GetValueOrDefault() > 0)
                        {
                            GigSubscription      _GigSubscription      = new GigSubscription();
                            GigSubscriptionModel _GigSubscriptionModel = new GigSubscriptionModel();
                            _GigSubscription.GigSubscriptionId = subid.GetValueOrDefault();

                            List <GigSubscription> _GigSubscriptionList = _GigSubscriptionModel.LoadSubscriptionDetails(_GigSubscription);
                            if (_GigSubscriptionList.Count() > 0)
                            {
                                TempData["BidMessage"]               = _GigSubscriptionList.FirstOrDefault().Description;
                                TempData["GigTitle"]                 = _GigSubscriptionList.FirstOrDefault().Title;
                                TempData["GigCompletionDate"]        = _GigSubscriptionList.FirstOrDefault().JobCompletionDate;
                                TempData["GigSubscriptionId"]        = _GigSubscriptionList.FirstOrDefault().GigSubscriptionId;
                                TempData["JobCompletionDateDisplay"] = _GigSubscriptionList.FirstOrDefault().JobCompletionDateDisplay;
                                TempData["NoofDocuments"]            = _GigSubscriptionList.FirstOrDefault().NoofDocuments;
                                TempData["GigSubscriptionStatus"]    = _GigSubscriptionList.FirstOrDefault().GigSubscriptionStatus;
                            }
                        }
                    }
                }
            }
            return(View("Details", _Gig));
        }
Пример #9
0
        public ActionResult Details(int?id)
        {
            //TempData["TrendingTagsFooter"] = MatchBxCommon.GetTrendingTagsFooter();
            TempData["BidMessage"]        = "";
            TempData["GigAmount"]         = "";
            TempData["AXPRFeeAmt"]        = "0.00";
            TempData["AXPRFeeTotAmt"]     = "";
            TempData["BidAmountinDollar"] = "";
            TempData["GigSubscriptionId"] = 0;
            TempData["GigCompletionDate"] = "";
            TempData["GigTitle"]          = string.Empty;
            //Session["Expired"] = "N";
            //Session["FromDetails"] = "Y";

            dynamic  model     = new ExpandoObject();
            GigModel _GigModel = new GigModel();
            Gig      _Gig      = new Gig();

            int gigid = id.GetValueOrDefault();

            Session["GigId"] = gigid;
            if (gigid != 0)
            {
                List <Gig> _GigList = MatchBxCommon.GenerateBadgeForGig(_GigModel.GetGigPost(gigid));
                if (_GigList.Count() > 0)
                {
                    //ViewBag.MetaTag = HomeMetaTags(objJobList[0].JobTitle.ToString(), objJobList[0].JobDescription.ToString());

                    _GigList.FirstOrDefault().GigSkillsMappingList       = _GigModel.GetSkillsByGigId(gigid);
                    _GigList.FirstOrDefault().GigTrendingTagsMappingList = _GigModel.GetTagsByGigId(gigid);
                    _Gig = _GigList.FirstOrDefault();
                    //Session["JobPoster"] = objJob.UserId;

                    Session["JobCategory"]       = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(_Gig.Category.ToLower());
                    Session["JobCategoryHeader"] = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(_Gig.Category.ToLower());

                    if (Session["JobCategoryId"].ToString() == "0")
                    {
                        Session["JobCategoryName"] = CultureInfo.CurrentCulture.TextInfo.ToTitleCase("ALL JOBS".ToLower());
                    }
                    else
                    {
                        Session["JobCategoryName"] = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(_Gig.Category.ToLower());
                    }

                    decimal exchangerate = MatchBxCommon.GetExchangeRate();
                    int     bid          = Convert.ToInt32(_Gig.BudgetASP);
                    decimal perc         = (Convert.ToDecimal(bid) * 3) / 100;
                    TempData["AXPRFeeAmt"] = perc.ToString("#,##0.00");
                    string totalfees = (bid + perc).ToString("#,##0.00");
                    TempData["AXPRFeeTotAmt"]     = totalfees;
                    TempData["GigAmount"]         = _Gig.BudgetASP.ToString() + " AXPR";
                    TempData["BidAmountinDollar"] = (Math.Round(exchangerate * (bid + perc), 2)).ToString("#,##0.00");

                    //TimeSpan span = objJob.JobCompletionDate.Subtract(DateTime.Now);
                    //string EndingIn = span.Days + " DAYS, " + span.Hours + " HOURS, " + span.Minutes + " MINS";
                    //if (span.Days == 0 || objJob.JobStatus == "P")
                    //{
                    //    Session["Expired"] = "N";
                    //    EndingIn = span.Days + " DAYS, " + Math.Abs(span.Hours) + " HOURS, " + Math.Abs(span.Minutes) + " MINS";
                    //}
                    //else if (span.Days < 0 || span.Hours < 0 || span.Minutes < 0 || objJob.JobStatus == "A" || objJob.JobStatus == "C" || objJob.JobStatusSeeker == "C")
                    //{
                    //    Session["Expired"] = "Y";
                    //}
                    //TempData["EndingIn"] = EndingIn;
                    //if (Convert.ToInt32(Session["UserId"]) != _Gig.UserId)
                    //{
                    //    GigSubscription _GigSubscription = new GigSubscription();
                    //    GigSubscriptionModel _GigSubscriptionModel = new GigSubscriptionModel();
                    //    _GigSubscription.UserId = Convert.ToInt32(Session["UserId"]);
                    //    _GigSubscription.GigId = _Gig.GigId;

                    //    List<GigSubscription> _GigSubscriptionList = _GigSubscriptionModel.LoadJobBiddingDetails(_JobBidding);
                    //    if (objBiddingList.Count() > 0)
                    //    {
                    //        TempData["BidMessage"] = objBiddingList.FirstOrDefault().BidMessage;
                    //        TempData["BidAmount"] = (objBiddingList.FirstOrDefault().BidAmount).ToString("#,##0") + " AXPR";
                    //        int bid = Convert.ToInt32(objBiddingList.FirstOrDefault().BidAmount);
                    //        decimal perc = (Convert.ToDecimal(bid) * 3) / 100;
                    //        TempData["AXPRFeeAmt"] = perc.ToString("#,##0.00");

                    //        string totalfees = (bid - perc).ToString("#,##0.00");
                    //        TempData["AXPRFeeTotAmt"] = totalfees;
                    //        decimal exchangerate = MatchBxCommon.GetExchangeRate();
                    //        TempData["BidAmountinDollar"] = (Math.Round(exchangerate * (objBiddingList.FirstOrDefault().BidAmount), 2)).ToString("#,##0.00");
                    //        TempData["JobBiddingId"] = objBiddingList.FirstOrDefault().JobBiddingId;
                    //        TempData["TokenDistributionId"] = objBiddingList.FirstOrDefault().TokenDistributionId;
                    //        TempData["IsPendingStatus"] = objBiddingList.FirstOrDefault().IsPending;
                    //    }
                    //    else
                    //    {
                    //        TempData["IsPendingStatus"] = "N";
                    //    }
                }

                //objJob.ShareJob = shareJobObj.GetShareDetails(jobid, Convert.ToInt32(Session["UserId"]));
                //if (objJob.ShareJob == null)
                //{
                //    objJob.ShareJob = new SocialMediaShare();
                //    objJob.ShareJob.JobId = jobid;
                //    objJob.ShareJob.UserId = Convert.ToInt32(Session["UserId"]);
                //    objJob.ShareJob.FBShare = null;
                //    objJob.ShareJob.TwitterShare = null;
                //}
                //}
            }
            return(View("Details", _Gig));
        }
Пример #10
0
        public ActionResult GigReview(int?Gigid)
        {
            if (Session["UserType"] == null || Session["UserType"].ToString() != "4")
            {
                TempData["gigid"] = Gigid.GetValueOrDefault();
                return(RedirectToAction("Index", "Jobs", new { @redirecturl = "Y" }));
            }
            else
            {
                JobCategoryModel objCatMod = new JobCategoryModel();
                var     categoryList       = objCatMod.GetList();
                dynamic model = new ExpandoObject();
                categoryList.ForEach(c =>
                {
                    var lowerCase = c.Category.ToLower();
                    var r         = new Regex(@"(^[a-z])|\.\s+(.)", RegexOptions.ExplicitCapture);
                    c.Category    = r.Replace(lowerCase, s => s.Value.ToUpper());
                });
                TempData["Category"]        = categoryList;
                TempData["message"]         = string.Empty;
                TempData["BlockReason"]     = _objUsrBlockModel.GetList();
                TempData["CancelJobReason"] = _ObjJobModel.GetJobCancelList();
                GigModel _GigModel = new GigModel();

                Gig _Gig = new Gig();
                _Gig.JobCategoryId = 0;
                _Gig.SortBy        = "N";



                List <Gig> _GigList = new List <Gig>();
                _GigList = MatchBxCommon.GenerateBadgeForGig(_GigModel.GetGigReview(_Gig));
                if (Gigid.GetValueOrDefault() != 0)
                {
                    _GigList = _GigList.Where(x => x.GigId == Gigid.GetValueOrDefault()).ToList <Gig>();
                }
                if (_GigList.Count > 0)
                {
                    //foreach (Job _job in _GigList)
                    //{
                    _GigList.ForEach(s => s.BudgetASPInt = Convert.ToInt32(s.BudgetASP));
                    // }
                    //if (!String.IsNullOrEmpty(_searchtext))
                    //{
                    //    _GigList = _GigList.Where(p => p.JobDescription != null && p.JobDescription.ToLower().Contains(_searchtext.ToLower().Trim()) || p.JobTitle != null && p.JobTitle.ToLower().Contains(_searchtext.ToLower().Trim()) || p.JobCompletionDateDisplay != null && p.JobCompletionDateDisplay.ToLower().Contains(_searchtext.ToLower()) || p.TrendingTagsIdList != null && p.TrendingTagsIdList.ToLower().Contains(_searchtext.ToLower())).ToList();
                    //}
                    var objJobListFiltered = _GigList.GroupBy(x => x.GigId).Select(y => y.First()).ToList();
                    ReviewRecord = objJobListFiltered.Count();
                    if (ReviewRecord > recordDisplay)
                    {
                        reviewloadmore = 1;
                    }
                    else
                    {
                        reviewloadmore = 0;
                    }
                    objJobListFiltered.ForEach(x => x.Isloadmore = reviewloadmore);
                    model.GigReview = objJobListFiltered.Take(recordDisplay).ToList();
                }
                else
                {
                    model.GigReview = new List <Gig>();
                }
                return(View("GigReview", model.GigReview));
            }
        }