예제 #1
0
 public Recruitee selectRecruiteeByEmail(Recruitee obj)
 {
     try
     {
         IRecruiteeSvc svc = (IRecruiteeSvc)this.getService(typeof(IRecruiteeSvc).Name);
         return svc.selectRecruiteeByEmail(obj);
     }
     catch (ServiceLoadException ex)
     {
         return null;
     }
 }
예제 #2
0
 public Boolean deleteRecruitee(Recruitee obj)
 {
     try
     {
         IRecruiteeSvc svc = (IRecruiteeSvc)this.getService(typeof(IRecruiteeSvc).Name);
         return svc.deleteRecruitee(obj);
     }
     catch (ServiceLoadException ex)
     {
         return false;
     }
 }
예제 #3
0
 public Boolean removeSkillFromRecruitee(Recruitee obj, String skillId)
 {
     try
     {
         IRecruiteeSvc svc = (IRecruiteeSvc)this.getService(typeof(IRecruiteeSvc).Name);
         return svc.removeSkillFromRecruitee(obj, skillId);
     }
     catch (Exception ex)
     {
         return false;
     }
 }
예제 #4
0
 public static RecruiteeDto createRecruiteeDTO(Recruitee obj)
 {
     RecruiteeDto rec = new RecruiteeDto();
     rec.RecruiteeId = obj.RecruiteeId;
     rec.RankingId = obj.RankingId;
     rec.RankingValue = (double)obj.RankingValue;
     rec.Email = obj.Email;
     rec.FirstName = obj.FirstName;
     rec.LastName = obj.LastName;
     rec.Gender = obj.Gender;
     rec.AgeId = obj.AgeId;
     rec.EducationId = obj.EducationId;
     rec.IncomeId = obj.IncomeId;
     return rec;
 }
예제 #5
0
        public Boolean addSkillToRecruitee(Recruitee obj, String skillId)
        {
            using (NewRecruiteeBankContext db = new NewRecruiteeBankContext())
            {
                try
                {
                    Recruitee recruitee = db.Recruitees.SqlQuery("dbo.SelectRecruiteeById @RecruiteeId='" + obj.RecruiteeId.ToString() + "'").Single();
                    Skill skillAdd = db.Skills.SqlQuery("dbo.SelectSkillById @SkillId='" + skillId + "'").Single();

                    if (recruitee != null)
                    {
                        if (skillAdd != null)
                        {
                            recruitee.Skills.Add(skillAdd);
                        }

                        #region Database Submission with Rollback

                        try
                        {
                            db.SaveChanges();
                            return true;
                        }
                        catch (Exception ex)
                        {
                            return false;
                        }
                        #endregion
                    }
                    else
                    {
                        return false;
                    }
                }
                catch (Exception ex)
                {
                    return false;
                }
            }
        }
예제 #6
0
        public Boolean deleteRecruitee(Recruitee obj)
        {
            using (NewRecruiteeBankContext db = new NewRecruiteeBankContext())
            {
                try
                {
                    Recruitee recruitee = db.Recruitees.SqlQuery("dbo.SelectRecruiteeById @RecruiteeId='" + obj.RecruiteeId.ToString() + "'").Single();

                    if (recruitee != null)
                    {
                        db.Recruitees.Remove(recruitee);
                        #region Database Submission

                        try
                        {
                            db.SaveChanges();
                            return true;
                        }
                        catch (Exception ex)
                        {
                            return false;
                        }

                        #endregion
                    }
                    else
                    {
                        return false;
                    }
                }
                catch (Exception ex)
                {
                    return false;
                }
            }
        }
예제 #7
0
    public RecruiteeDto selectRecruiteeById(Guid RecruiteeId)
    {
        RecruiteeManager mgr = new RecruiteeManager();
        Recruitee obj = new Recruitee();
        obj.RecruiteeId = RecruiteeId;
        obj = mgr.selectRecruiteeById(obj);

        if (obj != null)
        {
            return RecruiteeDto.createRecruiteeDTO(obj);
        }
        else
        {
            return null;
        }
    }
예제 #8
0
    public RecruiteeDto selectRecruiteeByEmail(String Email)
    {
        RecruiteeManager mgr = new RecruiteeManager();
        Recruitee obj = new Recruitee();
        obj.Email = Email;
        obj = mgr.selectRecruiteeByEmail(obj);

        if (obj != null)
        {
            return RecruiteeDto.createRecruiteeDTO(obj);
        }
        else
        {
            return null;
        }
    }
예제 #9
0
 public static Recruitee createRecruitee(Guid RecruiteeId, String RankingId, decimal RankingValue, String Email,
            String FirstName, String LastName, String Gender, String AgeId, String EducationId, String IncomeId)
 {
     Recruitee obj = new Recruitee();
     obj.RecruiteeId = RecruiteeId;
     obj.RankingId = RankingId;
     obj.RankingValue = RankingValue;
     obj.Email = Email;
     obj.FirstName = FirstName;
     obj.LastName = LastName;
     obj.Gender = Gender;
     obj.AgeId = AgeId;
     obj.EducationId = EducationId;
     obj.IncomeId = IncomeId;
     return obj;
 }
예제 #10
0
        public Boolean insertRecruitee(Recruitee obj)
        {
            using (NewRecruiteeBankContext db = new NewRecruiteeBankContext())
            {
                try
                {
                    db.Recruitees.Add(obj);
                    db.SaveChanges();
                    return true;
                }
                catch (Exception ex)
                {
                    return false;
                }

            }
        }
예제 #11
0
        public Boolean updateRecruitee(Recruitee obj)
        {
            using (NewRecruiteeBankContext db = new NewRecruiteeBankContext())
            {
                try
                {

                    Recruitee recruitee = db.Recruitees.SqlQuery("dbo.SelectRecruiteeById @RecruiteeId='" + obj.RecruiteeId.ToString() + "'").Single();

                    if (recruitee != null)
                    {
                        recruitee.RankingId = obj.RankingId;
                        recruitee.RankingValue = obj.RankingValue;
                        recruitee.Email = obj.Email;
                        recruitee.FirstName = obj.FirstName;
                        recruitee.LastName = obj.LastName;
                        recruitee.Gender = obj.Gender;
                        recruitee.AgeId = obj.AgeId;
                        recruitee.EducationId = obj.EducationId;
                        recruitee.IncomeId = obj.IncomeId;

                        #region Database Submission with Rollback

                        try
                        {
                            db.SaveChanges();
                            return true;
                        }
                        catch (Exception ex)
                        {
                            return false;
                        }
                        #endregion
                    }
                    else
                    {
                        return false;
                    }
                }
                catch (Exception ex)
                {
                    return false;
                }

            }
        }
예제 #12
0
        public Recruitee selectRecruiteeById(Recruitee obj)
        {
            NewRecruiteeBankContext db = new NewRecruiteeBankContext();

            try
            {

                return db.Recruitees.SqlQuery("dbo.SelectRecruiteeById @RecruiteeId='" + obj.RecruiteeId.ToString() + "'").Single();
            }
            catch (Exception ex)
            {
                return null;
            }
        }