public async Task <IActionResult> SendInvoiceTrader() { await CheckReceiveMail.CheckMailAsync(); // CheckReceiveMail.CheckMail(); MongoDbRepository <MailInvoice> mi = new MongoDbRepository <MailInvoice>(); var mailInvoice = mi.SearchFor(x => (x.FromEmail == User.Identity.Name.ToString() || x.ToEmail == User.Identity.Name.ToString()) && (x.mailInvoiceCreationType == MailInvoiceCreationType.Created || x.mailInvoiceCreationType == MailInvoiceCreationType.Uploaded)); return(View(mailInvoice)); }
public async Task <IActionResult> ReceivedInvoiceTrader() { await CheckReceiveMail.CheckMailAsync(); await CheckIMAPMail.CheckMailAsync(); MongoDbRepository <MailInvoice> mi = new MongoDbRepository <MailInvoice>(); var mailInvoice = mi.SearchFor(x => x.mailInvoiceCreationType == MailInvoiceCreationType.Received); return(View(mailInvoice)); }