Exemple #1
0
 public static void placedGraduateJob(List <int> idCRDs)
 {
     using (placementDepartmentDBEntities placementDepartmentDB = new placementDepartmentDBEntities())
     {
         foreach (var idCRD in idCRDs)
         {
             CoordinatingJobsForGraduates coordinating = placementDepartmentDB.CoordinatingJobsForGraduates.Find(idCRD);
             coordinating.placementStatus       = 6;
             coordinating.JobCoordinationStatus = null;
             coordinating.lastUpdateDate        = DateTime.Now;
             //Job
             coordinating.Job.isActive                    = false;
             coordinating.Job.reasonForClosing            = 5; //work
             coordinating.Job.ReasonForClosingThePosition = null;
             coordinating.Job.lastUpdateDate              = DateTime.Now;
             //Graduate
             coordinating.Graduate.isWorkerInProfession           = true;
             coordinating.Graduate.placedByThePlacementDepartment = true;
             coordinating.Graduate.lastUpdate  = DateTime.Now;
             coordinating.Graduate.companyName = coordinating.Job.Contact.Company.name;
             coordinating.Graduate.role        = coordinating.Job.Subject.name;
             placementDepartmentDB.SaveChanges();
         }
     }
 }
Exemple #2
0
 public static void DeleteJobsCoordination(List <int> ids)
 {
     using (placementDepartmentDBEntities placementDepartmentDB = new placementDepartmentDBEntities())
     {
         foreach (var id in ids)
         {
             CoordinatingJobsForGraduates JobsCoordination = placementDepartmentDB.CoordinatingJobsForGraduates.Find(id);
             placementDepartmentDB.CoordinatingJobsForGraduates.Remove(JobsCoordination);
         }
         placementDepartmentDB.SaveChanges();
     }
 }