コード例 #1
0
 public static Tabstrip GetLinkedFolderTabs(string currentFormId, int linkedFolderId)
 {
     return(new Tabstrip
     {
         CurrentTab = currentFormId,
         Tabs = new List <Tab>
         {
             LinkedFolderOverview.Button(linkedFolderId, "Overview").AsTab(),
         }
     });
 }
コード例 #2
0
        public async Task <Response> Handle(Request message)
        {
            var emails = await this.context.ImportedEmails
                         .Include(t => t.LinkedFolder)
                         .Where(t => t.LinkedFolder.Inbox.Users.Any(x => x.UserId == this.userContext.User.UserId))
                         .PaginateAsync(message.EmailPaginator);

            return(new Response
            {
                Emails = emails.Transform(t => new EmailItem
                {
                    Subject = EmailDetails.Button(t.Id, t.Subject),
                    LinkedFolder = LinkedFolderOverview.Button(t.LinkedFolderId, t.LinkedFolder.Name),
                    From = t.From,
                    ReceivedOn = t.ReceivedOn
                })
            });
        }
コード例 #3
0
ファイル: EmailDetails.cs プロジェクト: niaher/inboxy
        public async Task <Response> Handle(Request message)
        {
            var email = await this.context.ImportedEmails
                        .Include(t => t.LinkedFolder)
                        .ThenInclude(t => t.Inbox)
                        .SingleOrExceptionAsync(t => t.Id == message.Id);

            return(new Response
            {
                Body = new EmailBody(email.Body, email.BodyType),
                From = email.From,
                ReceivedOn = email.ReceivedOn,
                ImportedOn = email.ImportedOn,
                Inbox = InboxOverview.Button(email.LinkedFolder.InboxId, email.LinkedFolder.Inbox.Name),
                LinkedFolder = LinkedFolderOverview.Button(email.LinkedFolderId, email.LinkedFolder.Name),
                Metadata = new MyFormResponseMetadata
                {
                    Title = email.Subject
                }
            });
        }