Пример #1
0
        public void DeleteById(int id)
        {
            Workload emp = GetById(id);

            dbconn.Workloads.Remove(emp);
            dbconn.SaveChanges();
        }
Пример #2
0
        public void DeleteById(int id)           // Delete function
        {
            TrackSkill emp = GetById(id);

            dbconn.TrackSkills.Remove(emp);
            dbconn.SaveChanges();
        }
Пример #3
0
        public void DeleteById(int id)
        {
            Track emp = GetById(id);

            dbconn.Tracks.Remove(emp);
            dbconn.SaveChanges();
        }
Пример #4
0
        public void DeleteById(int id)           // Delete function
        {
            EmpSubsidary emp = GetById(id);

            dbconn.EmpSubsidaries.Remove(emp);
            dbconn.SaveChanges();
        }
Пример #5
0
        public void DeleteById(int id)
        {
            Role ro = GetById(id);

            dbconn.Roles.Remove(ro);
            dbconn.SaveChanges();
        }
Пример #6
0
        public void DeleteById(int id)           // Delete function
        {
            Employee emp = GetById(id);

            dbconn.Employees.Remove(emp);
            dbconn.SaveChanges();
        }
Пример #7
0
        public void DeleteById(int id)
        {
            Skill sk = GetById(id);

            dbconn.Skills.Remove(sk);
            dbconn.SaveChanges();
        }
Пример #8
0
        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));
        }
Пример #9
0
        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));
        }