예제 #1
0
        public int Insert(LoaiTour loai)
        {
            string sql = "insert into LOAITOUR values(@maloai, @tenloai)";

            SqlParameter[] pr =
            {
                new SqlParameter("@maloai",  loai.MaLoai),
                new SqlParameter("@tenloai", loai.TenLoai)
            };
            return(db.Insert(sql, pr));
        }
예제 #2
0
        public int Insert(Tour tour)
        {
            string sql = " Insert Into TOUR Values (@matour, @tentour, @hinh, @ngaykhoihanh, @maloai)";

            SqlParameter[] pr =
            {
                new SqlParameter("@matour",      tour.MaLoai),
                new SqlParameter("tentour",      tour.TenTour),
                new SqlParameter("hinh",         tour.Hinh),
                new SqlParameter("ngaykhoihanh", tour.NgayKhoiHanh),
                new SqlParameter("maloai",       tour.MaLoai)
            };
            return(db.Insert(sql, pr));
        }