public virtual void VerifyEmail() { if (EmailStatus == EmailStatusEnum.Unverified) { emailStatus = EmailStatusEnum.Verified; } }
public int GetEmailTranslationsCount(ManagerTypeEnum managerType, EmailStatusEnum emailStatus, long managerId) { using (var session = GetSession()) { var query = session.QueryOver <EmailTranslation>(); query = query.Where(m => m.IsDeleted == Utils.CoreDefaultValue.False); if (managerType == ManagerTypeEnum.Common) { if (emailStatus == EmailStatusEnum.UnRead) { query = query.And(m => m.EnquiryId < 1); } query = query.And( m => m.SenderStatus == emailStatus && (m.SenderId == managerId || m.FollowId == managerId)); } if (managerType == ManagerTypeEnum.Super) { query = query.And( m => m.ReceiverStatus == emailStatus && (m.HandlerManagerId == managerId || m.ReceiverId == managerId)); } return(query.RowCount()); } }
public IList <EmailTranslation> GetUnReadEmailTranslationsByEnquiryId(ManagerTypeEnum managerType, long enquiryId, EmailStatusEnum emailStatus, short isDeleted, long receiveId, long intentionId, int pageIndex, int pageSize, out int totalCount) { using (var session = GetSession()) { var query = session.QueryOver <EmailTranslation>(); query = query.Where(m => m.IsDeleted == isDeleted && m.EnquiryId == enquiryId); if (managerType == ManagerTypeEnum.Super) { query = query.And( m => m.ReceiverStatus == emailStatus && (m.ReceiverId == receiveId || m.HandlerManagerId == receiveId)); } if (managerType == ManagerTypeEnum.Common) { query = query.And( m => m.SenderStatus == emailStatus && (m.SenderId == receiveId || m.FollowId == receiveId)); } if (intentionId != 0) { query = query.And(m => m.IntentionId == intentionId); } totalCount = query.RowCount(); return(query.OrderBy(m => m.Id).Desc.Take(pageSize).Skip((pageIndex - 1) * pageSize).List()); } }
public int GetUnReadEmailEnquiryCount(long managerId, EmailStatusEnum emailStatus) { using (var session = GetSession()) { return(session.QueryOver <Enquiry>().Where(m => m.IsDeleted == Utils.CoreDefaultValue.False) .And(m => m.EmailStatus == emailStatus) .And(m => m.ReceiverId == managerId || m.HandlerId == managerId).RowCount()); } }
public static PageModel <Enquiry> GetEnquiryUnReadEmailPages(long managerId, long languageId, long intentId, long useDefinedId, EmailStatusEnum emailStatus, int pageindex, int pageSize) { int totalCount = 0; IList <Enquiry> enquiries = enquiryRepository.GetUnReadEmailEnquirys(managerId, languageId, intentId, useDefinedId, emailStatus, pageindex, pageSize, out totalCount); return(new PageModel <Enquiry>(enquiries, pageindex, pageSize, totalCount)); }
public static PageModel <EmailTranslation> GetEmailTranslations(ManagerTypeEnum managerType, EmailStatusEnum emailStatus, short isDeleted, long receiveId, long intentionId, int pageIndex, int pageSize) { int totalCount = 0; IList <EmailTranslation> emailTranslations = emailTranslationRepository.GetEmailTranslations(managerType, emailStatus, isDeleted, receiveId, intentionId, pageIndex, pageSize, out totalCount); return(new PageModel <EmailTranslation>(emailTranslations, pageIndex, pageSize, totalCount)); }
public TableData( int reportIid, string reportFile, ReportTypeEnum reportType, PrintStatusEnum printStatus, int printPathIid, int numCopy, bool sendMessage, bool graph, SortDirectionEnum groupDirection1, SortDirectionEnum groupDirection2, SortDirectionEnum groupDirection3, string groupHeader1, string groupHeader2, string groupHeader3, string groupTable1, string groupTable2, string groupTable3, SortDirectionEnum sortDirection1, SortDirectionEnum sortDirection2, SortDirectionEnum sortDirection3, string sortHeader1, string sortHeader2, string sortHeader3, string sortTable1, string sortTable2, string sortTable3, int bulletinNumber, string batchName, int batchUser, int batchPathId, int emailId, OutputEnum outputType, int dirPathId, string CompletedReportFile, CopyStatusEnum copyStatus, EmailStatusEnum emailStatus, RunStatusEnum runStatus, int eMailType) { ReportIid = reportIid; ReportFile = reportFile; ReportType = reportType; PrintStatus = printStatus; PrintPathIid = printPathIid; NumCopy = numCopy; SendMessage = sendMessage; Graph = graph; GroupDirection1 = groupDirection1; GroupDirection2 = groupDirection2; GroupDirection3 = groupDirection3; GroupHeader1 = groupHeader1; GroupHeader2 = groupHeader2; GroupHeader3 = groupHeader3; GroupTable1 = groupTable1; GroupTable2 = groupTable2; GroupTable3 = groupTable3; SortDirection1 = sortDirection1; SortDirection2 = sortDirection2; SortDirection3 = sortDirection3; SortHeader1 = sortHeader1; SortHeader2 = sortHeader2; SortHeader3 = sortHeader3; SortTable1 = sortTable1; SortTable2 = sortTable2; SortTable3 = sortTable3; BulletinNumber = bulletinNumber; BatchName = batchName; BatchUser = batchUser; BatchPathId = batchPathId; EmailId = emailId; OutputType = outputType; DirPathId = dirPathId; this.CompletedReportFile = CompletedReportFile; CopyStatus = copyStatus; EmailStatus = emailStatus; RunStatus = runStatus; EmailType = eMailType; }
private void updateEmail(string emailAddress) { if (string.IsNullOrWhiteSpace(emailAddress)) { if (string.IsNullOrWhiteSpace(Email)) { email = ""; verificationCode = ""; } switch (EmailStatus) { case EmailStatusEnum.NotEntered: break; case EmailStatusEnum.Unverified: break; case EmailStatusEnum.Verified: break; default: emailStatus = EmailStatusEnum.NotEntered; break; } } else { switch (EmailStatus) { case EmailStatusEnum.NotEntered: this.email = emailAddress; setVerificationCode(); this.emailStatus = EmailStatusEnum.Unverified; break; case EmailStatusEnum.Unverified: this.email = emailAddress; setVerificationCode(); this.emailStatus = EmailStatusEnum.Unverified; break; case EmailStatusEnum.Verified: break; default: this.email = emailAddress; setVerificationCode(); this.emailStatus = EmailStatusEnum.Unverified; break; } } }
public static int GetUnReadEmailEnquiryCount(long managerId, EmailStatusEnum emailStatus) { return(enquiryRepository.GetUnReadEmailEnquiryCount(managerId, emailStatus)); }
public static int GetEmailTranslationsCount(ManagerTypeEnum managerType, EmailStatusEnum emailStatus, long managerId) { return(emailTranslationRepository.GetEmailTranslationsCount(managerType, emailStatus, managerId)); }
public IList <Enquiry> GetUnReadEmailEnquirys(long managerId, long languageId, long intentId, long useDefinedId, EmailStatusEnum emailStatus, int pageindex, int pageSize, out int totalCount) { using (var session = GetSession()) { var query = session.QueryOver <Enquiry>().Where(m => m.IsDeleted == Utils.CoreDefaultValue.False) .And(m => m.ReceiverId == managerId || m.HandlerId == managerId) .And(m => m.EmailStatus == emailStatus); if (languageId != 0) { query = query.And(m => m.LanguageId == languageId); } if (intentId != 0) { query = query.And(m => m.IntentionId == intentId); } if (useDefinedId != 0) { query = query.And(m => m.UserDefinedId == useDefinedId); } totalCount = query.RowCount(); return(query.OrderBy(m => m.Id).Desc.Take(pageSize) .Skip((pageindex - 1) * pageSize) .List()); } }