Ejemplo n.º 1
0
        public ActionResult AddMobileJobAds(Guid[] jobAdIds)
        {
            try
            {
                // Look for the folder.

                var member = CurrentMember;
                var folder = _jobAdFoldersQuery.GetMobileFolder(member);
                if (folder == null)
                {
                    return(JsonNotFound("folder"));
                }

                // Add jobads.

                var count = _memberJobAdListsCommand.AddJobAdsToFolder(member, folder, jobAdIds);
                return(Json(new JsonListCountModel {
                    Id = folder.Id, Count = count
                }));
            }
            catch (UserException ex)
            {
                ModelState.AddModelError(ex, new StandardErrorHandler());
            }

            return(Json(new JsonResponseModel()));
        }
Ejemplo n.º 2
0
        public void TestIsInMobileFolder()
        {
            var poster = CreateEmployer();
            var jobAd  = PostJobAd(poster);

            var member = CreateMember();
            var folder = _jobAdFoldersQuery.GetMobileFolder(member);

            _memberJobAdListsCommand.AddJobAdToFolder(member, folder, jobAd.Id);
            LogIn(member);

            // Get the job.

            Get(GetJobUrl(jobAd.Id));
            AssertIsInMobileFolder(true);
        }
Ejemplo n.º 3
0
        public void TestIsInMobileFolder()
        {
            var jobAd = CreateJobAd();

            var member = CreateMember(0);
            var folder = _jobAdFoldersQuery.GetMobileFolder(member);

            _memberJobAdListsCommand.AddJobAdToFolder(member, folder, jobAd.Id);
            LogIn(member);

            // Get the job.

            Search(Keywords);
            var node = GetResult(jobAd.Id);

            AssertIsInMobileFolder(node, true);
        }
Ejemplo n.º 4
0
 private JobAdFolder GetMobileFolder(IMember member)
 {
     return(_jobAdFoldersQuery.GetMobileFolder(member));
 }