Exemple #1
0
 void LoadOutboxes(string year)
 {
     Outboxes.Clear();
     using (IUnitOfWork unit = new UnitOfWork())
     {
         if (string.IsNullOrEmpty(year))
         {
             var all = unit.Outboxes.GetAll().OrderByDescending(x => x.OutboxNo);
             foreach (var outbox in all)
             {
                 Outboxes.Add(outbox);
             }
             return;
         }
         var latestOutboxes = unit.Outboxes.Query(x => x.OutboxNo.StartsWith(year)).OrderByDescending(x => x.OutboxNo);
         foreach (var outbox in latestOutboxes)
         {
             Outboxes.Add(outbox);
         }
     }
 }
Exemple #2
0
 private void FindSubject(string subject)
 {
     Outboxes = new ObservableCollection <Outbox>(Outboxes.Where(x => x.Subject.Contains(subject)));
 }
Exemple #3
0
 private void FindOutboxNo(string outboxNo)
 {
     Outboxes = new ObservableCollection <Outbox>(Outboxes.Where(x => x.OutboxNo.Contains(outboxNo)));
 }