public ActionResult ReportingManagers_Update([DataSourceRequest] DataSourceRequest request, ReportingManager reportingManager)
        {
            if (ModelState.IsValid)
            {
                var entity = new ReportingManager
                {
                    RM_Id   = reportingManager.RM_Id,
                    RM_Name = reportingManager.RM_Name
                };

                db.ReportingManagers.Attach(entity);
                db.Entry(entity).State = EntityState.Modified;
                db.SaveChanges();
            }

            return(Json(new[] { reportingManager }.ToDataSourceResult(request, ModelState)));
        }
        public ActionResult Mentors_Update([DataSourceRequest] DataSourceRequest request, Mentor mentor)
        {
            if (ModelState.IsValid)
            {
                var entity = new Mentor
                {
                    M_Id   = mentor.M_Id,
                    M_Name = mentor.M_Name
                };

                db.Mentors.Attach(entity);
                db.Entry(entity).State = EntityState.Modified;
                db.SaveChanges();
            }

            return(Json(new[] { mentor }.ToDataSourceResult(request, ModelState)));
        }
        public ActionResult Projects_Update([DataSourceRequest] DataSourceRequest request, Project project)
        {
            if (ModelState.IsValid)
            {
                var entity = new Project
                {
                    P_Id         = project.P_Id,
                    P_Name       = project.P_Name,
                    P_Technology = project.P_Technology
                };

                db.Projects.Attach(entity);
                db.Entry(entity).State = EntityState.Modified;
                db.SaveChanges();
            }

            return(View("Index"));
        }
        public ActionResult Onboarders_Update([DataSourceRequest] DataSourceRequest request, Onboarder onboarder)
        {
            if (ModelState.IsValid)
            {
                var entity = new Onboarder
                {
                    O_Id           = onboarder.O_Id,
                    O_Name         = onboarder.O_Name,
                    O_Rotation_Num = onboarder.O_Rotation_Num,
                    RM_Id          = onboarder.RM_Id
                };

                db.Onboarders.Attach(entity);
                db.Entry(entity).State = EntityState.Modified;
                db.SaveChanges();
            }

            return(Json(new[] { onboarder }.ToDataSourceResult(request, ModelState)));
        }