public ActionResult EditProfile()
        {
            RecruiterProfile recruiter = this.jobMediator.CheckProfile((int)Session["AccountId"]);
            var map = AutoMapper.Mapper.Map <RecruiterProfile, RecruiterProfileViewModel>(recruiter);

            return(View(map));
        }
 public void AddProfile(RecruiterProfile profile)        //Add profile
 {
     using (DBUtills db = new DBUtills())
     {
         db.ProfileDb.Add(profile);
         db.SaveChanges();
     }
 }
        public RecruiterProfile FetchProfile(int log)        //Fetch profile
        {
            RecruiterProfile profile = null;

            using (DBUtills db = new DBUtills())
            {
                profile = db.ProfileDb.FirstOrDefault(id => id.AccountId == log);
                return(profile);
            }
        }
        public ActionResult ProfileDetails()
        {
            RecruiterProfile recruiter = null;

            recruiter = this.jobMediator.CheckProfile((int)Session["AccountId"]);
            if (recruiter != null)
            {
                return(RedirectToAction("EditProfile"));
            }
            return(View());
        }
        public bool UpdateProfile(RecruiterProfile profile)          //Update profile
        {
            bool status = false;

            using (DBUtills dBUtills = new DBUtills())
            {
                dBUtills.Entry(profile).State = EntityState.Modified;
                dBUtills.SaveChanges();
                status = true;
            }
            return(status);
        }
        public ActionResult DisplayProfile()
        {
            RecruiterProfile account = this.jobMediator.CheckProfile(Convert.ToInt32(Session["AccountId"]));

            if (account != null)
            {
                return(View(account));
            }
            else
            {
                return(RedirectToAction("ProfileDetails"));
            }
        }
        public ActionResult RecruiterJobDetails()
        {
            RecruiterProfile account = this.jobMediator.CheckProfile(Convert.ToInt32(Session["AccountId"]));

            if (account == null)
            {
                return(RedirectToAction("ProfileDetails", "Job"));
            }
            else
            {
                ViewBag.CompanyName = account.WorkingCompany;
                ViewBag.JobTypes    = new SelectList(this.jobMediator.GetJobTypes(), "JobTypeId", "JobType");
                ViewBag.Locations   = new SelectList(this.jobMediator.GetLocations(), "LocationId", "Location");
                ViewBag.Cgpas       = new SelectList(this.jobMediator.GetCgpas(), "CgpaId", "CGPA");
            }
            return(View());
        }
Ejemplo n.º 8
0
 public bool UpdateProfile(RecruiterProfile recruiter)        //Update profiles
 {
     return(jobRepository.UpdateProfile(recruiter));
 }
Ejemplo n.º 9
0
 public void AddProfile(RecruiterProfile profile)        //Adding Recruiter profile
 {
     jobRepository.AddProfile(profile);
 }