public ActionResult EditSkill()         //Get-edit Skills
        {
            SearcherSkillSets skills = this.jobMediator.FetchSkill((int)Session["SkillId"]);
            var map = AutoMapper.Mapper.Map <SearcherSkillSets, SearcherSkillsViewModel>(skills);

            return(View(map));
        }
 public SearcherSkillSets FetchSkill(int log)        //Check Skill Exists
 {
     using (DBUtills db = new DBUtills())
     {
         SearcherSkillSets output = null;
         output = db.SkillDb.Find(log);
         return(output);
     }
 }
        public SearcherSkillSets FetchIndividualSkill(int log)        //Fetch skills
        {
            SearcherSkillSets skill = null;

            using (DBUtills dB = new DBUtills())
            {
                skill = dB.SkillDb.FirstOrDefault(id => id.AccountId == log);
                return(skill);
            }
        }
        public ActionResult SearcherSkillDetails()
        {
            int id = Convert.ToInt32(Session["AccountId"]);
            SearcherSkillSets result = this.jobMediator.FetchIndividualSkill(id);

            Session["SkillId"] = result.SkillId;
            if (result != null)
            {
                return(RedirectToAction("EditSkill"));
            }
            return(View());
        }
        public bool UpdateSkills(SearcherSkillSets skillSets)          //Update skills
        {
            bool status = false;

            using (DBUtills dBUtills = new DBUtills())
            {
                dBUtills.Entry(skillSets).State = EntityState.Modified;
                dBUtills.SaveChanges();
                status = true;
            }
            return(status);
        }
 public void AddSkills(SearcherSkillSets skill)        //Add skills
 {
     using (DBUtills db = new DBUtills())
     {
         try
         {
             db.SkillDb.Add(skill);
             db.SaveChanges();
         }
         catch (DbEntityValidationException dbEx)
         {
             foreach (var validationErrors in dbEx.EntityValidationErrors)
             {
                 foreach (var validationError in validationErrors.ValidationErrors)
                 {
                     System.Console.WriteLine("Property: {0} Error: {1}", validationError.PropertyName, validationError.ErrorMessage);
                 }
             }
         }
     }
 }
        public ActionResult DisplaySkills()
        {
            SearcherSkillSets account = this.jobMediator.FetchIndividualSkill(Convert.ToInt32(Session["AccountId"]));

            return(View(account));
        }
Exemple #8
0
 public bool EditSkills(SearcherSkillSets id)        //Update edited skills
 {
     return(jobRepository.UpdateSkills(id));
 }
Exemple #9
0
 public void AddSearcherSkillSet(SearcherSkillSets work)        //Adding Searcher Skillset
 {
     jobRepository.AddSkills(work);
 }