Example #1
0
        public ActionResult GetTagsnSkills(int category, int jobId)
        {
            //TempData["Tags"] = objJobMod.GetTrendingTags(category);
            TrendingTagsModel _TrendingTagsModel = new TrendingTagsModel();
            SkillsModel       _SkillsModel       = new SkillsModel();
            Job _objJobList = new Job();

            if (jobId != 0)
            {
                _objJobList.TrendingTagsList = _TrendingTagsModel.GetList(" * ", " JobCategoryId = " + category);
                TempData["Tags"]             = _objJobList.TrendingTagsList;
            }
            else
            {
                _objJobList.TrendingTagsList = _TrendingTagsModel.GetList(" * ", " JobCategoryId = " + category + " and TagType = 'S'");
                TempData["Tags"]             = _objJobList.TrendingTagsList;
            }
            //TempData["Skills"] = objJobMod.GetTopSkills(category);

            //_objJobList.TrendingTagsList =  objJobMod.GetTrendingTags(category);

            //_objJobList.JobSkillsList = objJobMod.GetTopSkills(category);
            _objJobList.JobSkillsList = _SkillsModel.GetList(" * ", " JobCategoryId = " + category);
            TempData["Skills"]        = _objJobList.JobSkillsList;
            return(Json(_objJobList, JsonRequestBehavior.AllowGet));
        }
Example #2
0
        public ActionResult CreateGig(int?id)
        {
            Session["ExRate"] = MatchBxCommon.GetExchangeRate();
            dynamic model = new ExpandoObject();
            int     gigid = id.GetValueOrDefault();

            TempData["Category"] = objCatMod.GetList();
            TempData["Tags"]     = new List <TrendingTags>();
            TempData["Skills"]   = new List <Skills>();
            //GetTagsnSkills(0);
            if (gigid != 0)
            {
                objGigList = objGigMod.GetGigPost(gigid);
                if (objGigList.Count() > 0)
                {
                    TrendingTagsModel _TrendingTagsModel = new TrendingTagsModel();
                    SkillsModel       _SkillsModel       = new SkillsModel();
                    //TempData["Tags"] = objJobMod.GetTrendingTags(objJobList[0].JobCategoryId);
                    //TempData["Skills"] = objJobMod.GetTopSkills(objJobList[0].JobCategoryId);
                    if (gigid != 0)
                    {
                        TempData["Tags"] = _TrendingTagsModel.GetList(" * ", " JobCategoryId = " + objGigList[0].JobCategoryId);
                    }
                    else
                    {
                        TempData["Tags"] = _TrendingTagsModel.GetList(" * ", " JobCategoryId = " + objGigList[0].JobCategoryId + " and TagType = 'S'");
                    }
                    TempData["Skills"] = _SkillsModel.GetList(" * ", " JobCategoryId = " + objGigList[0].JobCategoryId);
                    objGigList.FirstOrDefault().GigSkillsMappingList       = objGigMod.GetSkillsByGigId(gigid);
                    objGigList.FirstOrDefault().GigTrendingTagsMappingList = objGigMod.GetTagsByGigId(gigid);
                    objGigList.FirstOrDefault().GigDocumentsList           = objGigMod.GetDocumentsByGigId(gigid);
                    objGig = objGigList.FirstOrDefault();
                    objGig.BudgetInDollar       = objGig.BudgetASP;
                    objGig.BudgetASP            = objGig.BudgetASP * (decimal)Session["ExRate"];
                    objGig.BudgetASPString      = "$ " + objGig.BudgetASP.ToString("#,##0.00");
                    objGig.GigId                = Convert.ToInt32(id);
                    TempData["SelectedTags"]    = objGig.GigTrendingTagsMappingList;
                    TempData["SelectedSkills"]  = objGig.GigSkillsMappingList;
                    Session["TrendingTagsList"] = objGig.GigTrendingTagsMappingList;
                    Session["SkillsList"]       = objGig.GigSkillsMappingList;
                }
            }
            return(View("CreateGig", objGig));
        }