コード例 #1
0
ファイル: Education.cs プロジェクト: janiukjf/JobBoard
 public void getAppCount(Guid userid = new Guid())
 {
     JobBoardDataContext db = new JobBoardDataContext();
     Contact user = ContactModel.Get(userid);
     if (user.isAdmin()) {
         this.applicationCount = (from e in db.Educations
                                  join j in db.Jobs on e.id equals j.education
                                  join a in db.Applications on j.id equals a.job_id
                                  where e.id.Equals(this.id) && j.jobState.Equals(JobState.PUBLISHED.ToString())
                                  && a.status.Equals(ApplicationStatus.ACTIVE.ToString()) && !a.dateSubmitted.Equals(null)
                                  && j.jobState.Equals(JobState.PUBLISHED.ToString())
                                  select a).Count();
     } else {
         JobContact contact = new JobContact {
             contact = user.id
         };
         this.applicationCount = (from e in db.Educations
                                  join j in db.Jobs on e.id equals j.education
                                  join a in db.Applications on j.id equals a.job_id
                                  where e.id.Equals(this.id) && j.jobState.Equals(JobState.PUBLISHED.ToString())
                                  && a.status.Equals(ApplicationStatus.ACTIVE.ToString()) && !a.dateSubmitted.Equals(null)
                                  && j.Notifications.Contains(contact, new JobContactEqualityComparer())
                                  && j.jobState.Equals(JobState.PUBLISHED.ToString())
                                  select a).Count();
     }
 }
コード例 #2
0
 partial void DeleteJobContact(JobContact instance);
コード例 #3
0
 partial void UpdateJobContact(JobContact instance);
コード例 #4
0
 partial void InsertJobContact(JobContact instance);
コード例 #5
0
		private void detach_Notifications(JobContact entity)
		{
			this.SendPropertyChanging();
			entity.Job1 = null;
		}