コード例 #1
0
        public void SaveCommunication(AssociateCommunication communicationEntity, string attachments)
        {
            this.MomentaDb.AssociateCommunication.AddObject(communicationEntity);
            this.MomentaDb.SaveChanges();
            if (communicationEntity.CommunicationTypeId == (int)CommunicationType.Email)
            {
                AssociateSentEmail sentEmail = new AssociateSentEmail();

                sentEmail.ToAddress    = "";
                sentEmail.AssociateId  = communicationEntity.AssociateId;
                sentEmail.IsAutomatic  = false;
                sentEmail.LoggedInUser = communicationEntity.LoggedInUser;
                sentEmail.Subject      = communicationEntity.Description;
                sentEmail.Body         = communicationEntity.Details;
                sentEmail.EmailSent    = DateTime.Now;

                //string strAttachments = string.Join(",", attachments.Select(cust => cust.DocumentId.ToString()));
                MomentaRecruitment.Common.Repositories.EmailRepository emailRepo = new MomentaRecruitment.Common.Repositories.EmailRepository();
                emailRepo.LogSentEmail(sentEmail, attachments);
            }
        }
コード例 #2
0
        public void SaveCommunication(CommunicationHistoryModel communicationHistoryModel, string attachments)
        {
            AssociateCommunication communicationEntity = this.dataMapper.MapAssociateCommunicationM2E(communicationHistoryModel);

            this.associateRepo.SaveCommunication(communicationEntity, attachments);
        }
コード例 #3
0
ファイル: Sample3.cs.cs プロジェクト: itvijaykumar/MRTest
        public void SaveCommunication(AssociateCommunication communicationEntity, string attachments)
        {
            this.MomentaDb.AssociateCommunication.AddObject(communicationEntity);
            this.MomentaDb.SaveChanges();
            if (communicationEntity.CommunicationTypeId == (int)CommunicationType.Email)
            {
                AssociateSentEmail sentEmail = new AssociateSentEmail();

                sentEmail.ToAddress = "";
                sentEmail.AssociateId = communicationEntity.AssociateId;
                sentEmail.IsAutomatic = false;
                sentEmail.LoggedInUser = communicationEntity.LoggedInUser;
                sentEmail.Subject = communicationEntity.Description;
                sentEmail.Body = communicationEntity.Details;
                sentEmail.EmailSent = DateTime.Now;

                //string strAttachments = string.Join(",", attachments.Select(cust => cust.DocumentId.ToString()));
                MomentaRecruitment.Common.Repositories.EmailRepository emailRepo = new MomentaRecruitment.Common.Repositories.EmailRepository();
                emailRepo.LogSentEmail(sentEmail, attachments);
            }
        }