コード例 #1
0
        public bool CheckIsApplied(string userID, int jobID2)
        {
            IEnumerable <AppliedJob> appliedJob = AppliedJobRepository.Get(filter: s => s.JobID == jobID2 && s.JobSeekerID == userID && s.IsDeleted == false).AsEnumerable();

            if (appliedJob.ToArray().Length == 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #2
0
        public int DeleteAppliedRequest(int jobId, string jobseekerId)
        {
            var listBeforeDelete = (from a in this.AppliedJobRepository.Get()
                                    where a.JobID == jobId && a.JobSeekerID == jobseekerId && a.IsDeleted == true
                                    select a).ToArray();


            AppliedJob appliedJob = AppliedJobRepository.Get(filter: m => m.JobID == jobId && m.JobSeekerID == jobseekerId).FirstOrDefault();

            appliedJob.IsDeleted = true;
            AppliedJobRepository.Update(appliedJob);
            Save();

            var list = (from a in this.AppliedJobRepository.Get()
                        where a.JobID == jobId && a.JobSeekerID == jobseekerId
                        select a).ToArray();

            return(listBeforeDelete.Length - list.Length);
        }