Exemplo n.º 1
0
        private ContactCoreEntity GetByProfileID(string strProfileID)
        {
            ContactCoreEntity objContactCoreEntity = new ContactCoreEntity();

            try
            {
                Mugurtham.DTO.Profile.Contact objContact = new Mugurtham.DTO.Profile.Contact();
                IUnitOfWork objUOW = new UnitOfWork(_objLoggedInUser.ConnectionStringAppKey);
                using (objUOW as IDisposable)
                    objContact = objUOW.RepositoryContact.GetAll().ToList().Where(p => p.ProfileID.Trim().ToLower() == strProfileID.Trim().ToLower()).FirstOrDefault();
                objUOW = null;
                if (objContact != null)
                {
                    using (objContact as IDisposable)
                    {
                        AssignEntityFromCore(ref objContact, ref objContactCoreEntity);
                    }
                }
                objContact = null;
            }
            catch (Exception objEx)
            {
                Helpers.LogExceptionInFlatFile(objEx);
            }
            return(objContactCoreEntity);
        }
Exemplo n.º 2
0
 private int AssignEntityFromCore(ref Mugurtham.DTO.Profile.Contact objDTOContact, ref Mugurtham.Core.Contact.ContactCoreEntity objContactCoreEntity)
 {
     try
     {
         objContactCoreEntity.Name = objDTOContact.Name;
         objContactCoreEntity.ResidentialAddress = objDTOContact.Address;
         objContactCoreEntity.TimeToCall         = objDTOContact.ConvinientTimeToCall;
         objContactCoreEntity.Email          = objDTOContact.EMail;
         objContactCoreEntity.LandlineNumber = objDTOContact.LandLineNumber;
         objContactCoreEntity.MobileNumber   = objDTOContact.MobileNumber;
         objContactCoreEntity.Relationship   = objDTOContact.RelationShipWithMember;
         objContactCoreEntity.ProfileID      = objDTOContact.ProfileID;
     }
     catch (Exception objEx)
     {
         Helpers.LogExceptionInFlatFile(objEx);
     }
     return(0);
 }
Exemplo n.º 3
0
 public ContactCoreEntity GetByProfileID(string strProfileID)
 {
     ContactCoreEntity objContactCoreEntity = new ContactCoreEntity();
     try
     {
         Mugurtham.DTO.Profile.Contact objContact = new Mugurtham.DTO.Profile.Contact();
         IUnitOfWork objUOW = new UnitOfWork();
         using (objUOW as IDisposable)
             objContact = objUOW.RepositoryContact.GetAll().ToList().Where(p => p.ProfileID.Trim().ToLower() == strProfileID.Trim().ToLower()).FirstOrDefault();
         objUOW = null;
         if (objContact != null)
         {
             using (objContact as IDisposable)
             {
                 AssignEntityFromCore(ref objContact, ref objContactCoreEntity);
             }
         }
         objContact = null;
     }
     catch (Exception objEx)
     {
         Helpers.LogExceptionInFlatFile(objEx);
     }
     return objContactCoreEntity;
 }