Example #1
0
        public List <BasicInfoCoreEntity> GetAllBySangam(string strSangamID)
        {
            List <BasicInfoCoreEntity> objListBasicInfoCoreEntity = new List <BasicInfoCoreEntity>();

            try
            {
                List <Mugurtham.DTO.Profile.BasicInfo> objListBasicInfo = new List <Mugurtham.DTO.Profile.BasicInfo>();
                IUnitOfWork objUOW = new UnitOfWork(_objLoggedInUser.ConnectionStringAppKey);
                using (objUOW as IDisposable)
                    objListBasicInfo = objUOW.RepositoryBasicInfo.GetAll().ToList().Where(p => p.SangamID == strSangamID).ToList();
                objUOW = null;
                if (objListBasicInfo != null && objListBasicInfo.Count > 0)
                {
                    foreach (Mugurtham.DTO.Profile.BasicInfo objBasicInfo in objListBasicInfo)
                    {
                        using (objBasicInfo as IDisposable)
                        {
                            BasicInfoCoreEntity objBasicInfoCoreEntity = new BasicInfoCoreEntity();
                            AssignEntityFromDTO(objBasicInfoCoreEntity, objBasicInfo);
                            objListBasicInfoCoreEntity.Add(objBasicInfoCoreEntity);
                            objBasicInfoCoreEntity = null;
                        }
                    }
                }
            }
            catch (Exception objEx)
            {
                Helpers.LogExceptionInFlatFile(objEx);
            }
            return(objListBasicInfoCoreEntity);
        }
Example #2
0
        public BasicInfoCoreEntity GetByProfileID(string strProfileID)
        {
            BasicInfoCoreEntity objBasicInfoCoreEntity = new BasicInfoCoreEntity();

            try
            {
                Mugurtham.DTO.Profile.BasicInfo objBasicInfo = new Mugurtham.DTO.Profile.BasicInfo();
                IUnitOfWork objUOW = new UnitOfWork(_objLoggedInUser.ConnectionStringAppKey);
                using (objUOW as IDisposable)
                    objBasicInfo = objUOW.RepositoryBasicInfo.GetAll().ToList().Where(p => p.ProfileID.Trim().ToLower() == strProfileID.Trim().ToLower()).FirstOrDefault();
                objUOW = null;
                if (objBasicInfo != null)
                {
                    using (objBasicInfo as IDisposable)
                    {
                        AssignEntityFromDTO(objBasicInfoCoreEntity, objBasicInfo);
                    }
                }
                objBasicInfo = null;
            }
            catch (Exception objEx)
            {
                Helpers.LogExceptionInFlatFile(objEx);
            }
            return(objBasicInfoCoreEntity);
        }
Example #3
0
 public int AssignEntityFromDTO(BasicInfoCoreEntity objBasicInfoCoreEntity, Mugurtham.DTO.Profile.BasicInfo objBasicInfo)
 {
     try
     {
         objBasicInfoCoreEntity.ProfileID            = objBasicInfo.ProfileID;
         objBasicInfoCoreEntity.SangamProfileID      = objBasicInfo.SangamProfileID;
         objBasicInfoCoreEntity.AboutMe              = objBasicInfo.AboutMe;
         objBasicInfoCoreEntity.Age                  = objBasicInfo.Age;
         objBasicInfoCoreEntity.AnyDhosham           = objBasicInfo.AnyDosham;
         objBasicInfoCoreEntity.BloodGroup           = objBasicInfo.BloodGroup;
         objBasicInfoCoreEntity.BodyType             = objBasicInfo.BodyType;
         objBasicInfoCoreEntity.Caste                = objBasicInfo.Caste;
         objBasicInfoCoreEntity.ChildrenLivingStatus = objBasicInfo.ChildrenLivingStatus;
         objBasicInfoCoreEntity.Complexion           = objBasicInfo.Complexion;
         objBasicInfoCoreEntity.DOB                  = objBasicInfo.DateOfBirth;
         objBasicInfoCoreEntity.Drinking             = objBasicInfo.Drinking;
         objBasicInfoCoreEntity.Eating               = objBasicInfo.Eating;
         objBasicInfoCoreEntity.ElanUserID           = objBasicInfo.ElanUserID;
         objBasicInfoCoreEntity.Gender               = objBasicInfo.Gender;
         objBasicInfoCoreEntity.Gothram              = objBasicInfo.Gothram;
         objBasicInfoCoreEntity.Height               = objBasicInfo.Height;
         objBasicInfoCoreEntity.HoroscopeMatch       = objBasicInfo.HoroscopeMatch;
         objBasicInfoCoreEntity.MaritalStatus        = objBasicInfo.MaritalStatus;
         objBasicInfoCoreEntity.MotherTongue         = objBasicInfo.MotherTongue;
         objBasicInfoCoreEntity.Name                 = objBasicInfo.Name;
         objBasicInfoCoreEntity.NoOfChildren         = objBasicInfo.NoOfChildren;
         objBasicInfoCoreEntity.PartnerExpectation   = objBasicInfo.PartnerExpectations;
         objBasicInfoCoreEntity.PhysicalStatus       = objBasicInfo.PhysicalStatus;
         objBasicInfoCoreEntity.PlaceOfBirth         = objBasicInfo.PlaceOfBirth;
         objBasicInfoCoreEntity.ProfileCreatedBy     = objBasicInfo.ProfileCreatedBy;
         objBasicInfoCoreEntity.Raasi                = objBasicInfo.Raasi;
         objBasicInfoCoreEntity.Religion             = objBasicInfo.Religion;
         objBasicInfoCoreEntity.SangamID             = objBasicInfo.SangamID;
         objBasicInfoCoreEntity.Smoking              = objBasicInfo.Smoking;
         objBasicInfoCoreEntity.Star                 = objBasicInfo.Star;
         objBasicInfoCoreEntity.SubCaste             = objBasicInfo.SubCaste;
         objBasicInfoCoreEntity.TamilDOB             = objBasicInfo.TamilDOB;
         objBasicInfoCoreEntity.TOB                  = objBasicInfo.TimeOfBirth;
         objBasicInfoCoreEntity.Weight               = objBasicInfo.Weight;
         objBasicInfoCoreEntity.Zodiac               = objBasicInfo.Zodiac;
         objBasicInfoCoreEntity.ZodiacDay            = objBasicInfo.ZodiacDay;
         objBasicInfoCoreEntity.ZodiacMonth          = objBasicInfo.ZodiacMonth;
         objBasicInfoCoreEntity.ZodiacYear           = objBasicInfo.ZodiacYear;
         objBasicInfoCoreEntity.PhotoPath            = objBasicInfo.PhotoPath;
         objBasicInfoCoreEntity.CreatedDate          = objBasicInfo.CreatedDate;
         objBasicInfoCoreEntity.Paadham              = objBasicInfo.Paadham;
         objBasicInfoCoreEntity.ProfileCreator       = objBasicInfo.CreatedBy;
     }
     catch (Exception objEx)
     {
         Helpers.LogExceptionInFlatFile(objEx);
     }
     return(0);
 }