public void DeleteById(int id) { Workload emp = GetById(id); dbconn.Workloads.Remove(emp); dbconn.SaveChanges(); }
public void DeleteById(int id) // Delete function { TrackSkill emp = GetById(id); dbconn.TrackSkills.Remove(emp); dbconn.SaveChanges(); }
public void DeleteById(int id) { Track emp = GetById(id); dbconn.Tracks.Remove(emp); dbconn.SaveChanges(); }
public void DeleteById(int id) // Delete function { EmpSubsidary emp = GetById(id); dbconn.EmpSubsidaries.Remove(emp); dbconn.SaveChanges(); }
public void DeleteById(int id) { Role ro = GetById(id); dbconn.Roles.Remove(ro); dbconn.SaveChanges(); }
public void DeleteById(int id) // Delete function { Employee emp = GetById(id); dbconn.Employees.Remove(emp); dbconn.SaveChanges(); }
public void DeleteById(int id) { Skill sk = GetById(id); dbconn.Skills.Remove(sk); dbconn.SaveChanges(); }
public ActionResult Create([Bind(Include = "ID,EmpID,SkillD,SkillLevelID")] EmpSkill empSkill) { if (ModelState.IsValid) { db.EmpSkills.Add(empSkill); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.EmpID = new SelectList(db.Employees, "ID", "Name", empSkill.EmpID); ViewBag.SkillD = new SelectList(db.Skills, "ID", "Name", empSkill.SkillD); ViewBag.SkillLevelID = new SelectList(db.SkillLevels, "ID", "Name", empSkill.SkillLevelID); return(View(empSkill)); }
public ActionResult Create([Bind(Include = "ID,Name,RoleID,Alias,WorkloadID,JoiningDate,ManagerID")] Employee employee) { if (ModelState.IsValid) { db.Employees.Add(employee); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ManagerID = new SelectList(db.Employees, "ID", "Name", employee.ManagerID); ViewBag.RoleID = new SelectList(db.Roles, "ID", "Name", employee.RoleID); ViewBag.WorkloadID = new SelectList(db.Workloads, "ID", "Name", employee.WorkloadID); return(View(employee)); }