Hướng dẫn tạo code add dữ liệu vào table làm giỏ hàng
DataRow row = vandon2.NewRow(); row["ma_vd"] = mavandon.Text; row["ma_hh"] = cbbhanghoa.SelectedValue.ToString();//txt_mahh.Text; row["ten_hh"] = tenhh.Text; row["ma_loai_hh"] = loaihh.Text; row["ma_loai_kien"] = cbbloaikien.SelectedValue.ToString();//txt_m ...
DataRow row = vandon2.NewRow();
row["ma_vd"] = mavandon.Text;
row["ma_hh"] = cbbhanghoa.SelectedValue.ToString();//txt_mahh.Text;
row["ten_hh"] = tenhh.Text;
row["ma_loai_hh"] = loaihh.Text;
row["ma_loai_kien"] = cbbloaikien.SelectedValue.ToString();//txt_malk.Text;
row["loai_kien"] = loaikien.Text;
row["stt_kien"] = sttkien.Text;
row["so_kg"] = sokg.Text;
row["phi_ship"] = phiship.Text;
row["ghichu"] = giao_hang;
row["tonggia"] = sotien.Text;
row["hinhanh"] = link_hinhanh.Text;
vandon2.Rows.Add(row);