예제 #1
0
        public void UpdateApplicationStatus(int applicationId, Enums.ApplicationStatuses newStatus)
        {
            using (var db = new JobyJobsDB2())
            {
                var application = db.applications.Single(item => item.id == applicationId);

                application.status_id = (int)newStatus;
                db.SetAsModifiedAndSave(application);
            }
        }
예제 #2
0
 public Application(int id, int seekerId, int positionId, Enums.ApplicationStatuses status, DateTime applicationStartDate, DateTime lastUpdated, bool active)
 {
     Id                   = id;
     SeekerId             = seekerId;
     PositionId           = positionId;
     Status               = status;
     ApplicationStartDate = applicationStartDate;
     LastUpdated          = lastUpdated;
     Active               = active;
 }
예제 #3
0
 public void DropAllApplications(int seekerId)
 {
     using (var db = new JobyJobsDB2())
     {
         var ongoingStatuses = new Enums.ApplicationStatuses[5]
         {
             Enums.ApplicationStatuses.New, Enums.ApplicationStatuses.AfterPhoneInterview,
             Enums.ApplicationStatuses.InvitedForInterview, Enums.ApplicationStatuses.InProcessAfterInterview,
             Enums.ApplicationStatuses.Hired
         }.ToSelectedList(item => (int)item);
         var app = db.applications.Where(item => item.seeker_id == seekerId &&
                                         ongoingStatuses.Contains(item.status_id));
         db.SaveChanges();
     }
 }