Esempio n. 1
0
        private CareerCoreEntity GetByProfileID(string strProfileID)
        {
            CareerCoreEntity objCareerCoreEntity = new CareerCoreEntity();

            try
            {
                Mugurtham.DTO.Profile.Career objCareer = new Mugurtham.DTO.Profile.Career();
                IUnitOfWork objUOW = new UnitOfWork(_objLoggedInUser.ConnectionStringAppKey);
                using (objUOW as IDisposable)
                    objCareer = objUOW.RepositoryCareer.GetAll().ToList().Where(p => p.ProfileID.Trim().ToLower() == strProfileID.Trim().ToLower()).FirstOrDefault();
                objUOW = null;
                if (objCareer != null)
                {
                    using (objCareer as IDisposable)
                    {
                        AssignEntityFromDTO(ref objCareerCoreEntity, objCareer);
                    }
                }
                objCareer = null;
            }
            catch (Exception objEx)
            {
                Helpers.LogExceptionInFlatFile(objEx);
            }
            return(objCareerCoreEntity);
        }
Esempio n. 2
0
 private int AssignEntityFromDTO(ref CareerCoreEntity objCareerCoreEntity, Mugurtham.DTO.Profile.Career objCareer)
 {
     try
     {
         objCareerCoreEntity.AnnualIncome       = objCareer.Income;
         objCareerCoreEntity.Education          = objCareer.Education;
         objCareerCoreEntity.EducationInDetail  = objCareer.EducationInDetail;
         objCareerCoreEntity.EmployedIn         = objCareer.EmployedIn;
         objCareerCoreEntity.Occupation         = objCareer.Occupation;
         objCareerCoreEntity.OccupationInDetail = objCareer.OccupationInDetail;
         objCareerCoreEntity.ProfileID          = objCareer.ProfileID;
     }
     catch (Exception objEx)
     {
         Helpers.LogExceptionInFlatFile(objEx);
     }
     return(0);
 }