Пример #1
0
 public CareerCoreEntity GetByProfileID(string strProfileID)
 {
     CareerCoreEntity objCareerCoreEntity = new CareerCoreEntity();
     try
     {
         Mugurtham.DTO.Profile.Career objCareer = new Mugurtham.DTO.Profile.Career();
         IUnitOfWork objUOW = new UnitOfWork();
         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;
 }
Пример #2
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);
        }
Пример #3
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);
 }
Пример #4
0
 private int AssignDTOFromEntity(ref Mugurtham.DTO.Profile.Career objCareer, ref Mugurtham.Core.Career.CareerCoreEntity objCareerCoreEntity)
 {
     try
     {
         objCareer.Education          = objCareerCoreEntity.Education;
         objCareer.EducationInDetail  = objCareerCoreEntity.EducationInDetail;
         objCareer.EmployedIn         = objCareerCoreEntity.EmployedIn;
         objCareer.Income             = objCareerCoreEntity.AnnualIncome;
         objCareer.Occupation         = objCareerCoreEntity.Occupation;
         objCareer.OccupationInDetail = objCareerCoreEntity.OccupationInDetail;
         objCareer.CreatedDate        = DateTime.Now;
         objCareer.ModifiedDate       = DateTime.Now;
         objCareer.ProfileID          = objCareerCoreEntity.ProfileID;
     }
     catch (Exception objEx)
     {
         Helpers.LogExceptionInFlatFile(objEx);
     }
     return(0);
 }