コード例 #1
0
 public List <CollectionView> AllConsultationDrugs()
 {
     using (var clinicrepo = new CollectionRepository())
     {
         return
             (clinicrepo.Getall().ToList()
              .Select(
                  x =>
                  new CollectionView()
         {
             collectionID = x.collectionID,
             PatientName = x.PatientName,
             Prescription = x.Prescription,
             Collected = x.Collected,
             PaymentType = x.PaymentType
         })
              .ToList());
     }
 }
コード例 #2
0
 public List <CollectionView> GetPendingDrugs()
 {
     using (var clinicrepo = new CollectionRepository())
     {
         List <CollectionDrugs> notcollected = clinicrepo.Getall().FindAll(x => x.Collected == false);
         return
             (notcollected.ToList()
              .Select(
                  x =>
                  new CollectionView()
         {
             collectionID = x.collectionID,
             PatientName = x.PatientName,
             Prescription = x.Prescription,
             Collected = x.Collected
         })
              .ToList());
     }
 }
コード例 #3
0
 public List <CollectionView> GetCollectedDrugs()
 {
     using (var clinicrepo = new CollectionRepository())
     {
         List <CollectionDrugs> collected = clinicrepo.Getall().FindAll(x => x.Collected == true);
         return
             (collected.ToList()
              .Select(
                  x =>
                  new CollectionView()
         {
             collectionID = x.collectionID,
             PatientName = x.PatientName,
             Prescription = x.Prescription,
             Collected = x.Collected,
             PaymentType = x.PaymentType
         })
              .ToList());
     }
 }