public ActionResult Create() { var freelancerSkills = new FREELANCER_SKILL_INFO_Model(); freelancerSkills.Skills = _iSkillService.GetAllSkill(); return(View(freelancerSkills)); }
public bool UpdateFreelancerSkill(FREELANCER_SKILL_INFO_Model entity) { if (entity != null) { var data = Mapper.Map <FREELANCER_SKILL_INFO_Model, FREELANCER_SKILL_INFO>(entity); return(_iFreelancerSkillInfoRepository.Update(data)); } return(false); }
public FREELANCER_SKILL_INFO_Model GetById(int?Id) { var freelancerSkill = _iFreelancerSkillInfoRepository.GetById(Id); var freelancerSkillModel = new FREELANCER_SKILL_INFO_Model { Id = freelancerSkill.Id, SkillName = _iSkillService.GetSkillById(freelancerSkill.Skill).Name.ToString(), Description = freelancerSkill.Description }; return(freelancerSkillModel); }
public ActionResult Edit([Bind(Include = "Id,Freelancer_Id,Skill,Description")] FREELANCER_SKILL_INFO_Model fREELANCER_SKILL_INFO_Model) { if (ModelState.IsValid) { fREELANCER_SKILL_INFO_Model.Freelancer_Id = User.Identity.GetUserId(); if (_iFreelancerSkillInfoService.UpdateFreelancerSkill(fREELANCER_SKILL_INFO_Model)) { return(RedirectToAction("Index")); } } return(View(fREELANCER_SKILL_INFO_Model)); }
public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } if (User.Identity.GetUserId() == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } FREELANCER_SKILL_INFO_Model fREELANCER_SKILL_INFO_Model = _iFreelancerSkillInfoService.GetById(id); fREELANCER_SKILL_INFO_Model.Skills = _iSkillService.GetAllSkill(); ViewBag.DepartmentId = new SelectList(fREELANCER_SKILL_INFO_Model.Skills, "Id", "Name", fREELANCER_SKILL_INFO_Model.Skill); if (fREELANCER_SKILL_INFO_Model == null) { return(HttpNotFound()); } return(View(fREELANCER_SKILL_INFO_Model)); }