Beispiel #1
0
        public List <PhieuMuonDTO> Select()
        {
            List <PhieuMuonDTO> ListPhieuMuon = new List <PhieuMuonDTO>();

            string query = "SELECT[MAPM],[MASACH],[MADG],[NGAYMUON],[HANTRA] ,[SOLUONG] FROM[PHIEUMUON]";


            DataTable DtPhieuMuon = DataProvider.Instance.Excutequery(query);

            foreach (DataRow row in DtPhieuMuon.Rows)
            {
                PhieuMuonDTO phieuMuon = new PhieuMuonDTO();

                phieuMuon.NewReceipt(row);
                ListPhieuMuon.Add(phieuMuon);
            }

            return(ListPhieuMuon);
        }
Beispiel #2
0
        public List <PhieuMuonDTO> Select_MaSach_By_MaPhieuMuon(string sKeyword)
        {
            List <PhieuMuonDTO> ListPhieuMuon = new List <PhieuMuonDTO>();

            string query = "SELECT[MAPM],[MASACH],[MADG],[NGAYMUON],[HANTRA] FROM[PHIEUMUON] ";

            query += "WHERE MAPM = @sKeyword ";

            DataTable DtPhieuMuon = dataprovider.Excutequery(query);

            foreach (DataRow row in DtPhieuMuon.Rows)
            {
                PhieuMuonDTO phieuMuon = new PhieuMuonDTO();

                phieuMuon.NewReceipt(row);
                ListPhieuMuon.Add(phieuMuon);
            }

            return(ListPhieuMuon);
        }