public bool AddCuaHangTheoSanPham(int idSanPham)
        {
            clsSanPhamCuaHang sanPhamCuaHang = new clsSanPhamCuaHang();

            sanPhamCuaHang.IdSanPham = idSanPham;
            DataTable table = _mdlCuaHang.GetIdCuaHang();

            foreach (DataRow row in table.Rows)
            {
                sanPhamCuaHang.IdCuaHang = Convert.ToInt32(row["id"].ToString());
                if (!AddData(sanPhamCuaHang))
                {
                    return(false);
                }
            }
            return(true);
        }
 public bool AddData(clsSanPhamCuaHang sanPhamCuaHang)
 {
     _conn.CMD.CommandText = String.Format("INSERT tbSanPhamCuaHang (idCuaHang,idSanPham) VALUES('{0}','{1}')",
                                           sanPhamCuaHang.IdCuaHang, sanPhamCuaHang.IdSanPham);
     return(_conn.ExecuteCMD());
 }