Ejemplo n.º 1
0
        private int SearchSameSubject(string emailSubject)
        {
            List <string>   subjects     = new List <string>();
            EmailRepository parentEmails = new EmailRepository();

            subjects = parentEmails.GetAllSubjects();
            string emailSubjectRe = emailSubject.Substring(5);
            string subject        = subjects.Find(sub => emailSubjectRe == sub);

            if (subject != null)
            {
                int emailParentId = parentEmails.GetParentEmailIdsub(subject);
                if (!(emailParentId == -1))
                {
                    return(emailParentId);
                }
            }


            return(-1);
        }