static void Input(List <manage> list) { manage ul = new manage(); ul.BorrowaBook(); list.Add(ul); }
public void BorrowaBook(List <book> allBooks, List <Member> allmembers) { manage mn = new manage(); mn.ID = BID++; Console.Write("Member:"); int memberID = int.Parse(Console.ReadLine()); Member member = Program.SearchMemberByID(Member.Equals(memberID)); Console.Write("Name of book:"); string book = Console.ReadLine(); Console.Write("Borrow date: "); DateTime bdt; while (!DateTime.TryParse(Console.ReadLine(), out bdt)) { Console.Write("Re enter date:"); } mn.borrowdate = bdt; Console.Write("Return date: "); DateTime rdt; while (!DateTime.TryParse(Console.ReadLine(), out rdt)) { Console.Write("Re enter date:"); } mn.returndate = rdt; Console.Write("Deposit: "); mn.deposit = double.Parse(Console.ReadLine()); Console.Write("Cost:"); mn.cost = double.Parse(Console.ReadLine()); Console.Write("Quantity:"); mn.quantity = int.Parse(Console.ReadLine()); }