public void Insert(PhieuNhapSach info)
        {
            string sqlQuery = "insert into PhieuNhapSach values ('" +
                info.MaPN + "','" +
                info.MaSach + "','" +
                info.MaNCC + "'," +
                info.SoLuong + ",'" +
                info.NgayNhap.ToShortDateString() + "')";

            ExecuteNonQuery(sqlQuery);
        }
        public void Update(PhieuNhapSach info)
        {
            string sqlQuery = "update PhieuNhapSach" +
                              " set MaSach='" + info.MaSach + "'," +
                              "MaNCC='" + info.MaNCC + "'" +
                              "SoLuong=" + info.SoLuong +
                              "NgayNhap='" + info.NgayNhap.ToShortDateString() + "'"+
                              "where MaPN='" + info.MaPN + "'";

            ExecuteNonQuery(sqlQuery);
        }
        public List<PhieuNhapSach> GetList()
        {
            List<PhieuNhapSach> list = new List<PhieuNhapSach>();

            string sqlQuery = "select * from PhieuNhapSach";

            reader = ExecuteReader(sqlQuery);

            while (reader.Read())
            {
                PhieuNhapSach phieuNhapSach = new PhieuNhapSach();

                phieuNhapSach.MaPN = reader["MaPN"].ToString();
                phieuNhapSach.MaSach = reader["MaSach"].ToString();
                phieuNhapSach.MaNCC = reader["MaNCC"].ToString();
                phieuNhapSach.SoLuong = (int)reader["SoLuong"];
                phieuNhapSach.NgayNhap = (DateTime)reader["NgayNhap"];
                list.Add(phieuNhapSach);
            }

            return list;
        }
 public void Update(PhieuNhapSach info)
 {
     data.Update(info);
 }
 public void Insert(PhieuNhapSach info)
 {
     data.Insert(info);
 }