Ejemplo n.º 1
0
 internal List<MockPublications.Publication> Search(string Author)
 {
     MockPublications MockPublications = new MockPublications();
     return MockPublications.MockListPublications()
         .Where(a => a.Author.Name == Author && a.reserved == false)
         .ToList();
 }
Ejemplo n.º 2
0
 internal List<MockPublications.Publication> Search(string Author, string Title, bool both)
 {
     if(both)
     {
         MockPublications MockPublications = new MockPublications();
         return MockPublications.MockListPublications()
             .Where(a => a.Author.Name == Author && a.Title == Title && a.reserved == false)
             .ToList();
     }
     else
     {
         MockPublications MockPublications = new MockPublications();
         return MockPublications.MockListPublications()
             .Where(a => a.Author.Name == Author || a.Title == Title && a.reserved == false)
             .ToList();
     }
 }
Ejemplo n.º 3
0
 internal override bool LoanPublication(string ISBN, Member Member)
 {
     Mock.MockPublications Publications = new Mock.MockPublications();
     return Publications.SetPublicationAsLoaned(ISBN, Member);
 }
Ejemplo n.º 4
0
 internal override bool ReturnPublication(string ISBN, Member Member)
 {
     Mock.MockPublications Publications = new Mock.MockPublications();
     return Publications.UpdatePublicationStatus(ISBN, Member, "Return");
 }
Ejemplo n.º 5
0
 internal override bool IsReserved(string ISBN)
 {
     Mock.MockPublications Publications = new Mock.MockPublications();
     return Publications.IsReserved(ISBN);
 }
Ejemplo n.º 6
0
 internal override int GetPublicationsCount()
 {
     Mock.MockPublications Publications = new Mock.MockPublications();
     return Publications.MockListPublications().Count;
 }