public void edit() { dtct = new ConsumerWinform.WSSDT.WSSDT(); int rs; ten = txtTenDT.Text; gia = int.Parse(txtGia.Text); img = txtHinhAnh.Text; mota = txtMoTa.Text; phukien = txtPhuKien.Text; baohanh = int.Parse(txtBaoHanh.Text); khuyenmai = txtKhuyenMai.Text; date = txtNgayCapNhat.Text; ah = int.Parse(txtDTAnHien.Text); dt = "update dienthoai set TenDT='" + ten + "', Gia='" + gia + "', HinhAnh='" + img + "',MoTa=N'" + mota + "', PhuKien=N'" + phukien + "',BaoHanh='" + baohanh + "', KhuyenMai=N'" + khuyenmai + "', NgayCapNhat='" + date + "', AnHien='" + ah + "' where idDT='" + id + "'"; // MessageBox.Show(sql); idDT = int.Parse(comboBoxDT.SelectedValue.ToString()); mang2g = txtMang2G.Text; mang3g = txtMang3G.Text; sim = txtSim.Text; khac = txtKhac.Text; loangoai = txtLoaNgoai.Text; thenho = txtTheNho.Text; bluetooth = txtBlueTooth.Text; camerachinh = txtCameraChinh.Text; tinnhan = txtTinNhan.Text; hedieuhanh = txtHDH.Text; java = txtJava.Text; thoigiancho = txtThoiGianCho.Text; kichthuoc = txtKichThuoc.Text; trongluong = txtTrongLuong.Text; mausac = txtMauSac.Text; loaimanhinh = txtLoaiManHinh.Text; bonhotrong = txtBoNhoTrong.Text; gprs = txtGPRS.Text; usb = txtUSB.Text; jack35 = txtJack.Text; cameraphu = txtCameraPhu.Text; trinhduyet = txtTrinhDuyet.Text; gpu = txtGPU.Text; trochoi = txtTroChoi.Text; thoigianhoatdong = txtThoiGianHoatDong.Text; kichthuocmanhinh = txtKTManHinh.Text; audio = txtAudio.Text; video = txtVideo.Text; radio = txtRadio.Text; kieuchuong = txtKieuChuong.Text; wlan = txtWLan.Text; hspda = txtHSPDA.Text; gps = txtGPS.Text; chucnang = txtChucNang.Text; quayphim = txtQuayPhim.Text; cpu = txtCPU.Text; chipset = txtChipSet.Text; loaipin = txtLoaiPin.Text; tndt = "UPDATE TinhNangDienThoai SET Mang2G='" + mang2g + "', Mang3G='" + mang3g + "', Sim='" + sim + "', KichThuoc='" + kichthuoc + "', TrongLuong='" + trongluong + "', MauSac='" + mausac + "', LoaiManHinh='" + loaimanhinh + "', KichThuocManHinh='" + kichthuocmanhinh + "', Audio='" + audio + "', Video='" + video + "', Radio='" + radio + "', KieuChuong='" + kieuchuong + "', LoaNgoai='" + loangoai + "', BoNhoTrong='" + bonhotrong + "', TheNho='" + thenho + "', Wlan='" + wlan + "', GPRS='" + gprs + "', HSPDA='" + hspda + "', Bluetooth='" + bluetooth + "', USB='" + usb + "', GPS='" + gps + "', Jack35='" + jack35 + "', CameraChinh='" + camerachinh + "', ChucNang='" + chucnang + "', CameraPhu='" + cameraphu + "', QuayPhim='" + quayphim + "', TinNhan='" + tinnhan + "', TrinhDuyet='" + trinhduyet + "', HeDieuHanh='" + hedieuhanh + "', CPU='" + cpu + "', Chipset='" + chipset + "', GPU='" + gpu + "', JAVA='" + java + "', TroChoi='" + trochoi + "', LoaiPin='" + loaipin + "', ThoiGianCho='" + thoigiancho + "', ThoiGianHoatDong='" + thoigianhoatdong + "', Khac='" + khac + "' where idDT='" + id + "'"; //MessageBox.Show(tndt); rs = dtct.InsertDeleteQuery(tndt); }
public void edit() { id = int.Parse(comboBoxDT.SelectedValue.ToString()); noidung = txtBaiViet.Text; int rs; ConsumerWinform.WSSDT.WSSDT dtct = new ConsumerWinform.WSSDT.WSSDT(); string sql = ""; sql = "UPDATE THONGTINCHITIET SET BAIVIET='"+noidung+"' WHERE IDDT='" + id + "'"; rs = dtct.InsertDeleteQuery(sql); }
public void add() { id =int.Parse( comboBoxDT.SelectedValue.ToString()); noidung = txtBaiViet.Text; int rs; ConsumerWinform.WSSDT.WSSDT dtct = new ConsumerWinform.WSSDT.WSSDT(); string sql = ""; sql = "INSERT INTO ThongTinChiTiet (idDT, BaiViet) VALUES ('"+id+"', '" + noidung + "')"; //MessageBox.Show(sql); rs = dtct.InsertDeleteQuery(sql); }
public void edit() { id = int.Parse(comboBoxDT.SelectedValue.ToString()); noidung = txtBaiViet.Text; int rs; ConsumerWinform.WSSDT.WSSDT dtct = new ConsumerWinform.WSSDT.WSSDT(); string sql = ""; sql = "UPDATE THONGTINCHITIET SET BAIVIET='" + noidung + "' WHERE IDDT='" + id + "'"; rs = dtct.InsertDeleteQuery(sql); }
public void add() { id = int.Parse(comboBoxDT.SelectedValue.ToString()); noidung = txtBaiViet.Text; int rs; ConsumerWinform.WSSDT.WSSDT dtct = new ConsumerWinform.WSSDT.WSSDT(); string sql = ""; sql = "INSERT INTO ThongTinChiTiet (idDT, BaiViet) VALUES ('" + id + "', '" + noidung + "')"; //MessageBox.Show(sql); rs = dtct.InsertDeleteQuery(sql); }
public void Xoa() { id = int.Parse(comboBoxDT.SelectedValue.ToString()); int rs; ConsumerWinform.WSSDT.WSSDT dtct = new ConsumerWinform.WSSDT.WSSDT(); ttct = "DELETE FROM THONGTINCHITIET WHERE idDT='" + id + "'"; dt = "DELETE FROM DIENTHOAI WHERE idDT='" + id + "'"; tndt = "DELETE FROM TINHNANGDIENTHOAI WHERE idDT='" + id + "'"; //MessageBox.Show(sql); rsl = MessageBox.Show(this, "Bạn Có Muốn Xóa Không...?", "Thông Báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (rsl == DialogResult.Yes) { rs = dtct.InsertDeleteQuery(ttct); rs = dtct.InsertDeleteQuery(dt); rs = dtct.InsertDeleteQuery(tndt); } else { } }
public void Sua() { ten = txtTenHSX.Text; tt = int.Parse(txtThuTu.Text); id = int.Parse(txtIDHSX.Text); ah = int.Parse(txtAnHien.Text); int rs; ConsumerWinform.WSSDT.WSSDT dtct = new ConsumerWinform.WSSDT.WSSDT(); string sql = ""; sql = "UPDATE HANGSANXUAT SET TenHSX=N'" + ten + "',ThuTu='" + tt + "',AnHien='" + ah + "' WHERE idHSX='" + id + "'"; //MessageBox.Show(sql); rs = dtct.InsertDeleteQuery(sql); }
public void Them() { //id = int.Parse(txtIDHSX.Text); ten = (string)txtTenHSX.Text; tt = int.Parse(txtThuTu.Text); ah = int.Parse(txtAnHien.Text); int rs; ConsumerWinform.WSSDT.WSSDT dtct = new ConsumerWinform.WSSDT.WSSDT(); string sql = ""; sql = "INSERT INTO HANGSANXUAT (TenHSX, ThuTu, AnHien) VALUES ('" + ten + "','" + tt + "','" + ah + "')"; //MessageBox.Show(sql); rs = dtct.InsertDeleteQuery(sql); }
//================================= public void add() { dtct = new ConsumerWinform.WSSDT.WSSDT(); int rs; id = int.Parse(txtidHSX.Text); ten = txtTenDT.Text; gia = int.Parse(txtGia.Text); img = txtHinhAnh.Text; mota = txtMoTa.Text; phukien = txtPhuKien.Text; baohanh = int.Parse(txtBaoHanh.Text); khuyenmai = txtKhuyenMai.Text; date = txtNgayCapNhat.Text; ah = int.Parse(txtDTAnHien.Text); sql = "INSERT INTO dienthoai (idHSX, TenDT, Gia, HinhAnh, mota, phukien, baohanh, khuyenmai, ngaycapnhat, anhien) VALUES ('" + id + "','" + ten + "','" + gia + "','" + img + "','" + mota + "','" + phukien + "','" + baohanh + "', '" + khuyenmai + "','" + date + "', '" + ah + "')"; MessageBox.Show(sql); rs = dtct.InsertDeleteQuery(sql); }
public void Xoa() { id = int.Parse(txtIDHSX.Text); int rs; ConsumerWinform.WSSDT.WSSDT dtct = new ConsumerWinform.WSSDT.WSSDT(); string sql = ""; sql = "DELETE FROM HANGSANXUAT WHERE idHSX='" + id + "'"; //MessageBox.Show(sql); rsl = MessageBox.Show(this, "Bạn Có Muốn Xóa Không...?", "Thông Báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (rsl == DialogResult.Yes) { rs = dtct.InsertDeleteQuery(sql); } else { txtIDHSX.Text = ""; } txtIDHSX.Text = ""; }
// them data public void add() { idDT = int.Parse(comboBoxDT.SelectedValue.ToString()); mang2g = txtMang2G.Text; mang3g = txtMang3G.Text; sim = txtSim.Text; khac = txtKhac.Text; loangoai = txtLoaNgoai.Text; thenho = txtTheNho.Text; bluetooth = txtBlueTooth.Text; camerachinh = txtCameraChinh.Text; tinnhan = txtTinNhan.Text; hedieuhanh = txtHDH.Text; java = txtJava.Text; thoigiancho = txtThoiGianCho.Text; kichthuoc = txtKichThuoc.Text; trongluong = txtTrongLuong.Text; mausac = txtMauSac.Text; loaimanhinh = txtLoaiManHinh.Text; bonhotrong = txtBoNhoTrong.Text; gprs = txtGPRS.Text; usb = txtUSB.Text; jack35 = txtJack.Text; cameraphu = txtCameraPhu.Text; trinhduyet = txtTrinhDuyet.Text; gpu = txtGPU.Text; trochoi = txtTroChoi.Text; thoigianhoatdong = txtThoiGianHoatDong.Text; kichthuocmanhinh = txtKTManHinh.Text; audio = txtAudio.Text; video = txtVideo.Text; radio = txtRadio.Text; kieuchuong = txtKieuChuong.Text; wlan = txtWLan.Text; hspda = txtHSPDA.Text; gps = txtGPS.Text; chucnang = txtChucNang.Text; quayphim = txtQuayPhim.Text; cpu = txtCPU.Text; chipset = txtChipSet.Text; loaipin = txtLoaiPin.Text; dtct = new ConsumerWinform.WSSDT.WSSDT(); int rs; //sql = "INSERT INTO TinhNangDienThoai ( idDT, Mang2G, Mang3G, Sim, KichThuoc, TrongLuong, MauSac, LoaiManHinh, KichThuocManHinh, Audio, Video, Radio, KieuChuong, LoaNgoai, BoNhoTrong, TheNho, Wlan, GPRS, HSPDA, Bluetooth, USB, GPS, Jack35, CameraChinh, ChucNang, CameraPhu, QuayPhim, TinNhan, TrinhDuyet, HeDieuHanh, CPU, Chipset, GPU, JAVA, TroChoi, LoaiPin, ThoiGianCho, ThoiGianHoatDong, Khac) VALUES ('"+idDT+"', '"+mang2g+"', '"+mang3g+ "','"+sim+"', '"+kichthuoc+"', '"+trongluong+"', '"+mausac+"', '"+loaimanhinh+"', '"+kichthuocmanhinh+"','"+audio+"', '" + video+"', '"+radio+"', '"+kieuchuong+"', '"+loangoai+"', '"+bonhotrong+"', '"+thenho+"', '"+wlan+"', '"+gprs+"', '"+hspda+"', '"+bluetooth+"', '"+usb+"', '"+gps+"', '"+jack35+"', '"+camerachinh+"', '"+chucnang+"', '"+cameraphu+"', '"+quayphim+"', '"+tinnhan+"', '"+trinhduyet+"', '"+hedieuhanh+"', '"+cpu+"', '"+chipset+"', '"+gpu+ "', '"+java+ "', '"+trochoi+"', '"+loaipin+"', '"+thoigiancho+"', '"+thoigianhoatdong+"', '"+khac+"')"; sql = "INSERT INTO TinhNangDienThoai ( idDT, Mang2G, Mang3G, Sim, KichThuoc, TrongLuong, MauSac, LoaiManHinh, KichThuocManHinh, Audio, Video, Radio, KieuChuong, LoaNgoai, BoNhoTrong, TheNho, Wlan, GPRS, HSPDA, Bluetooth, USB, GPS, Jack35, CameraChinh, ChucNang, CameraPhu, QuayPhim, TinNhan, TrinhDuyet, HeDieuHanh, CPU, Chipset, GPU, JAVA, TroChoi, LoaiPin, ThoiGianCho, ThoiGianHoatDong, Khac) VALUES ('" + idDT + "','" + mang2g + "', '" + mang3g + "', '" + sim + "', '" + kichthuoc + "','" + trongluong + "', '" + mausac + "',' " + loaimanhinh + "', '" + kichthuocmanhinh + "', '" + audio + "', '" + video + "', '" + radio + "', '" + kieuchuong + "', '" + loangoai + "', '" + bonhotrong + "', '" + thenho + "', '" + wlan + "', '" + gprs + "', '" + hspda + "', '" + bluetooth + "', '" + usb + "', '" + gps + "', '" + jack35 + "', '" + camerachinh + "', '" + chucnang + "', '" + cameraphu + "', '" + quayphim + "', '" + tinnhan + "', '" + trinhduyet + "', '" + hedieuhanh + "', '" + cpu + "', '" + chipset + "', '" + gpu + "', '" + java + "', '" + trochoi + "',' " + loaipin + "', '" + thoigiancho + "', '" + thoigianhoatdong + "', '" + khac + "')"; MessageBox.Show(sql); rs = dtct.InsertDeleteQuery(sql); }
// them data public void add() { idDT = int.Parse(comboBoxDT.SelectedValue.ToString()); mang2g = txtMang2G.Text; mang3g = txtMang3G.Text; sim = txtSim.Text; khac = txtKhac.Text; loangoai = txtLoaNgoai.Text; thenho = txtTheNho.Text; bluetooth = txtBlueTooth.Text; camerachinh = txtCameraChinh.Text; tinnhan = txtTinNhan.Text; hedieuhanh = txtHDH.Text; java = txtJava.Text; thoigiancho = txtThoiGianCho.Text; kichthuoc = txtKichThuoc.Text; trongluong = txtTrongLuong.Text; mausac = txtMauSac.Text; loaimanhinh = txtLoaiManHinh.Text; bonhotrong = txtBoNhoTrong.Text; gprs = txtGPRS.Text; usb = txtUSB.Text; jack35 = txtJack.Text; cameraphu = txtCameraPhu.Text; trinhduyet = txtTrinhDuyet.Text; gpu = txtGPU.Text; trochoi = txtTroChoi.Text; thoigianhoatdong = txtThoiGianHoatDong.Text; kichthuocmanhinh = txtKTManHinh.Text; audio = txtAudio.Text; video = txtVideo.Text; radio = txtRadio.Text; kieuchuong = txtKieuChuong.Text; wlan = txtWLan.Text; hspda = txtHSPDA.Text; gps = txtGPS.Text; chucnang = txtChucNang.Text; quayphim = txtQuayPhim.Text; cpu = txtCPU.Text; chipset = txtChipSet.Text; loaipin = txtLoaiPin.Text; dtct = new ConsumerWinform.WSSDT.WSSDT(); int rs; //sql = "INSERT INTO TinhNangDienThoai ( idDT, Mang2G, Mang3G, Sim, KichThuoc, TrongLuong, MauSac, LoaiManHinh, KichThuocManHinh, Audio, Video, Radio, KieuChuong, LoaNgoai, BoNhoTrong, TheNho, Wlan, GPRS, HSPDA, Bluetooth, USB, GPS, Jack35, CameraChinh, ChucNang, CameraPhu, QuayPhim, TinNhan, TrinhDuyet, HeDieuHanh, CPU, Chipset, GPU, JAVA, TroChoi, LoaiPin, ThoiGianCho, ThoiGianHoatDong, Khac) VALUES ('"+idDT+"', '"+mang2g+"', '"+mang3g+ "','"+sim+"', '"+kichthuoc+"', '"+trongluong+"', '"+mausac+"', '"+loaimanhinh+"', '"+kichthuocmanhinh+"','"+audio+"', '" + video+"', '"+radio+"', '"+kieuchuong+"', '"+loangoai+"', '"+bonhotrong+"', '"+thenho+"', '"+wlan+"', '"+gprs+"', '"+hspda+"', '"+bluetooth+"', '"+usb+"', '"+gps+"', '"+jack35+"', '"+camerachinh+"', '"+chucnang+"', '"+cameraphu+"', '"+quayphim+"', '"+tinnhan+"', '"+trinhduyet+"', '"+hedieuhanh+"', '"+cpu+"', '"+chipset+"', '"+gpu+ "', '"+java+ "', '"+trochoi+"', '"+loaipin+"', '"+thoigiancho+"', '"+thoigianhoatdong+"', '"+khac+"')"; sql = "INSERT INTO TinhNangDienThoai ( idDT, Mang2G, Mang3G, Sim, KichThuoc, TrongLuong, MauSac, LoaiManHinh, KichThuocManHinh, Audio, Video, Radio, KieuChuong, LoaNgoai, BoNhoTrong, TheNho, Wlan, GPRS, HSPDA, Bluetooth, USB, GPS, Jack35, CameraChinh, ChucNang, CameraPhu, QuayPhim, TinNhan, TrinhDuyet, HeDieuHanh, CPU, Chipset, GPU, JAVA, TroChoi, LoaiPin, ThoiGianCho, ThoiGianHoatDong, Khac) VALUES ('"+idDT+"','"+mang2g+"', '"+mang3g+"', '"+sim+"', '"+kichthuoc+"','"+trongluong+"', '"+mausac+"',' "+loaimanhinh+"', '"+kichthuocmanhinh+"', '"+audio+"', '"+video+"', '"+radio+"', '"+kieuchuong+"', '"+loangoai+"', '"+bonhotrong+"', '"+thenho+"', '"+wlan+"', '"+gprs+"', '"+hspda+"', '"+bluetooth+"', '"+usb+"', '"+gps+"', '"+jack35+"', '"+camerachinh+"', '"+chucnang+"', '"+cameraphu+"', '"+quayphim+"', '"+tinnhan+"', '"+trinhduyet+"', '"+hedieuhanh+"', '"+cpu+"', '"+chipset+"', '"+gpu+"', '"+java+"', '"+trochoi+"',' "+loaipin+"', '"+thoigiancho+"', '"+thoigianhoatdong+"', '"+khac+"')"; MessageBox.Show(sql); rs = dtct.InsertDeleteQuery(sql); }
public void Xoa() { id = int.Parse(txtIDHSX.Text); int rs; ConsumerWinform.WSSDT.WSSDT dtct = new ConsumerWinform.WSSDT.WSSDT(); string sql = ""; sql = "DELETE FROM HANGSANXUAT WHERE idHSX='"+id+"'"; //MessageBox.Show(sql); rsl = MessageBox.Show(this, "Bạn Có Muốn Xóa Không...?","Thông Báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (rsl == DialogResult.Yes) { rs = dtct.InsertDeleteQuery(sql); } else { txtIDHSX.Text = ""; } txtIDHSX.Text = ""; }
public void Them() { //id = int.Parse(txtIDHSX.Text); ten =(string) txtTenHSX.Text; tt = int.Parse(txtThuTu.Text); ah = int.Parse(txtAnHien.Text); int rs; ConsumerWinform.WSSDT.WSSDT dtct = new ConsumerWinform.WSSDT.WSSDT(); string sql = ""; sql = "INSERT INTO HANGSANXUAT (TenHSX, ThuTu, AnHien) VALUES ('" + ten + "','" + tt + "','" + ah + "')"; //MessageBox.Show(sql); rs = dtct.InsertDeleteQuery(sql); }