Ejemplo n.º 1
0
 private void getMesageDinCategorii(BEmail pEmail, IEnumerable <IMessageSummary> pTipFolder, MessageFlags pFlag)
 {
     foreach (var mail in pTipFolder)
     {
         int nrAtasamente = 0;
         foreach (var attach in mail.BodyParts)
         {
             if (!string.IsNullOrEmpty(attach.FileName) && string.IsNullOrEmpty(attach.ContentId))
             {
                 nrAtasamente++;
             }
         }
         BEmailuriExtrase.Add(pEmail.Id, getIndiceFlag(pFlag), nrAtasamente, getData(mail.Date), mail.Envelope.Subject, mail.Envelope.From.ToString(), mail.Envelope.To.ToString(), (int)mail.UniqueId.Id, string.Empty, null);
         this.pbIncarcaEmailuri.PerformStep();
         nrAtasamente = 0;
     }
 }
Ejemplo n.º 2
0
        private void getMesageDinAll(BEmail pEmail, IEnumerable <IMessageSummary> pTipFolder)
        {
            List <DateTime> lista = BEmailuriExtrase.GetListUniqueId(pEmail.Id, CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null);

            foreach (var mail in pTipFolder)
            {
                int nrAtasamente = 0;
                foreach (var attach in mail.BodyParts)
                {
                    if (!string.IsNullOrEmpty(attach.FileName) && string.IsNullOrEmpty(attach.ContentId))
                    {
                        nrAtasamente++;
                    }
                }
                if (!lista.Contains(getData(mail.Date)))
                {
                    BEmailuriExtrase.Add(pEmail.Id, getIndiceFlag(mail.Flags), nrAtasamente, getData(mail.Date), mail.Envelope.Subject, mail.Envelope.From.ToString(), mail.Envelope.To.ToString(), (int)mail.UniqueId.Id, string.Empty, null);
                    this.pbIncarcaEmailuri.PerformStep();
                    nrAtasamente = 0;
                }
            }
        }