public static bool IsBorrowed(copy c) { if (StatusRepository.GetStatusByISBN(c.ISBN).statusid != 2) { return(true); } return(false); }
void Start() { instance = this; for (int i = 0; i < hallHttp.instance.kefu_wechat.Count; i++) { int a = i; GameObject.Find("weixinkefu").transform.GetChild(a + 2).GetChild(1).GetComponent <Button>().onClick.AddListener(() => platform(hallHttp.instance.kefu_wechat[a])); GameObject.Find("KeFu_Pay").transform.GetChild(a).GetChild(2).GetComponent <Button>().onClick.AddListener(() => platform(hallHttp.instance.kefu_wechat[a])); } }
private copy CreateCopy(int copyId, int movieId, bool?available) { var response = new copy { available = available, copy_id = copyId, movie_id = movieId }; _unitOfWork.CopiesRepository.Add(response); return(response); }
public static CopyDTO Create(copy copy) { return(new CopyDTO { Id = copy.copy_id, Available = copy.available, Movie = new MovieDTO { Id = copy.movy.movie_id, Year = copy.movy.year, Price = copy.movy.price, Title = copy.movy.title, }, }); }
public static List <BorrowedBookCopy> MapBorrow(List <borrow> b) { List <BorrowedBookCopy> borrowedBookCopy = new List <BorrowedBookCopy>(); foreach (borrow borrow in b) { copy c = CopyRepository.GetCopyByBarcode(borrow.Barcode); borrowedBookCopy.Add(new BorrowedBookCopy() { Borrow = borrow, Authors = AuthorRepository.GetAuthorsByBookISBN(c.ISBN), Book = BookRepository.GetBook(c.ISBN), Category = CategoryRepository.GetCategoryById(BorrowerRepository.GetBorrower(borrow.PersonId).CategoryId), Fine = FineRepository.GetFine(borrow.Barcode, borrow.PersonId) }); } return(borrowedBookCopy); }
private copy InitialiseCopy(int copyId, int?movieId, bool?available, copy response) { if (response != null) { if (response.movie_id != movieId) { response = CreateCopy(copyId, movieId.Value, available); } else { response.available = available; } } else { response = CreateCopy(copyId, movieId.Value, available); _unitOfWork.CopiesRepository.Add(response); } return(response); }
AssertEquals(copy.getTime(), now);
AssertEquals(copy.Entries.get(0), list.Entries.get(0));
_card = new CreditCardBase(copy from _card);