コード例 #1
0
        public int Edit(ref Mugurtham.Core.Contact.ContactCoreEntity objContactCoreEntity)
        {
            IUnitOfWork objIUnitOfWork = new UnitOfWork(_objLoggedInUser.ConnectionStringAppKey);

            try
            {
                using (objIUnitOfWork as IDisposable)
                {
                    Mugurtham.DTO.Profile.Contact objDTOContact = new DTO.Profile.Contact();
                    using (objDTOContact as IDisposable)
                    {
                        AssignDTOFromEntity(ref objDTOContact, ref objContactCoreEntity);
                    }
                    objIUnitOfWork.RepositoryContact.Edit(objDTOContact);
                    objDTOContact = null;
                }
                objIUnitOfWork.commit();
                objIUnitOfWork = null;
            }
            catch (Exception objEx)
            {
                Helpers.LogExceptionInFlatFile(objEx);
            }
            return(0);
        }
コード例 #2
0
 public int AssignEntityToEmpty(Mugurtham.Core.Contact.ContactCoreEntity objContactCoreEntity)
 {
     try
     {
         objContactCoreEntity.Name = string.Empty;
         objContactCoreEntity.ResidentialAddress = string.Empty;
         objContactCoreEntity.TimeToCall         = string.Empty;
         objContactCoreEntity.Email          = string.Empty;
         objContactCoreEntity.LandlineNumber = string.Empty;
         objContactCoreEntity.MobileNumber   = string.Empty;
         objContactCoreEntity.Relationship   = string.Empty;
         objContactCoreEntity.ProfileID      = string.Empty;
     }
     catch (Exception objEx)
     {
         Helpers.LogExceptionInFlatFile(objEx);
     }
     return(0);
 }
コード例 #3
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);
 }