public int AddBorrowed(BorrowDTO record) { Model.BorrowDTO ModelDto = new Model.BorrowDTO(); ModelDto.MediaID = record.MediaID; ModelDto.ReturnDate = record.ReturnDate; ModelDto.UID = record.UID; ModelDto.BorrowDate = record.BorrowDate; return(RecordManager.AddBorrowed(ModelDto)); }
public BorrowDTO Translate(Model.BorrowDTO input) { BorrowDTO Output = new BorrowDTO(); Output.BID = input.BID; Output.UID = input.UID; Output.MediaID = input.MediaID; Output.BorrowDate = input.BorrowDate; Output.ReturnDate = input.ReturnDate; Output.ActualReturnDate = input.ActualReturnDate; Output.LateFee = input.LateFee; return(Output); }
public IList <BorrowDTO> GetBorrowed(int?bID = null, int?uID = null, int?MediaID = null) { IList <Model.BorrowDTO> response = (RecordManager.GetBorrowed(bID, uID, MediaID)); IList <BorrowDTO> translated = new List <BorrowDTO>(); for (int i = 0; i < response.Count; i++) { BorrowDTO current = Translate(response[i]); current.LateFee = current.ReturnDate.Subtract(current.ActualReturnDate).Days *LateFeePerDay; translated.Add(current); } return(translated); }
public BorrowDTO ReturnBorrowed(BorrowDTO record) { throw new NotImplementedException(); }