static void Main(string[] args) { Sach sach = new Sach(); OChua ochua = new OChua(); PhieuMuon phieuMuon = new PhieuMuon(); Program program = new Program(); int n = 0; List <Sach> dsSach = new List <Sach>(); List <OChua> dsOChua = new List <OChua>(); List <PhieuMuon> dsPhieuMuon = new List <PhieuMuon>(); Dictionary <string, int> sl = new Dictionary <string, int>(); sach.showLayout(); Console.WriteLine("Nhap so o chua :"); n = int.Parse(Console.ReadLine()); while (true) { sach.showLayout(); int chon = 0; String luachon = "\nNhap lua chon :" + "\n1.Nhap sach " + "\n2.Lap phieu muon " + "\n3.Tim kiem theo ma sach " + "\n4.In danh sach sach "; Console.WriteLine(luachon); program.showFoot(); chon = int.Parse(Console.ReadLine()); switch (chon) { case 1: { NhapSach(dsSach, sl, dsOChua, n); break; } case 2: { TaoPhieuMuon(dsOChua, dsPhieuMuon, sl); break; } case 3: { sach.showLayout(); Console.WriteLine("Nhap ma sach :"); string ms = Console.ReadLine(); program.TimKiem(dsSach, sl, dsOChua, ms); break; } case 4: { sach.showLayout(); program.DanhSachSach(dsSach, sl, dsOChua); program.DanhSachOChua(dsOChua); Console.ReadLine(); Console.Clear(); break; } case 0: break; } } Console.ReadLine(); }
partial void UpdateSach(Sach instance);
partial void DeleteSach(Sach instance);
partial void InsertSach(Sach instance);