Esempio n. 1
0
        public string RemoveApplicant(Applicant applicant)
        {
            if (applicant != null)
            {
                using (iMAST_dbEntities db = new iMAST_dbEntities())
                {
                    var a = db.Applicants.Where(x => x.UserId == applicant.UserId && x.ListingId == applicant.ListingId).FirstOrDefault();

                    if (a != null)
                    {
                        db.Applicants.Remove(a);
                        db.SaveChanges();
                        return "Applicant Removed";
                    }
                    else
                    {
                        return "Invalid Applicant";
                    }
                }
            }
            else
            {
                return "Invalid Applicant";
            }
        }
Esempio n. 2
0
        public string AddApplicant(Applicant applicant)
        {
            if (applicant != null)
            {
                using (iMAST_dbEntities db = new iMAST_dbEntities())
                {
                    db.Applicants.Add(applicant);
                    db.SaveChanges();

                    return "Assignment Added";
                }
            }
            else
            {
                return "Invalid Assignment";
            }
        }
Esempio n. 3
0
 public string AddApplicant(Applicant applicant)
 {
     return applicantService.AddApplicant(applicant);
 }
Esempio n. 4
0
 public string RemoveApplicant(Applicant applicant)
 {
     return applicantService.RemoveApplicant(applicant);
 }