public void editOneNV(SanPham x) { string sql = "UPDATE DienThoai SET tenSp = N'" + x.tenSp + "', hangSp = '" + x.hangSp + "', gia = '" + x.gia + "', manHinh = '" + x.manHinh + "', heDieuhanh = '" + x.heDieuhanh + "', CPU = '" + x.CPU + "', cameraTruoc = '" + x.cameraTruoc + "' , cameraSau = '" + x.cameraSau + "' , RAM = '" + x.RAM + "', boNho = '" + x.boNho + "', Sim = '" + x.Sim + "', Pin = '" + x.Pin + "', trangThai = '" + x.trangThai + "' , hinhAnh = '" + x.hinhAnh + "' WHERE maSp = '" + x.maSp + "'"; db.WriteData(sql); }
public void createDT(SanPham x) { string sql = "INSERT INTO DienThoai VALUES('" + x.maSp + "', N'" + x.maLoaiDt + "', '" + x.tenSp + "', N'" + x.hangSp + "', '" + x.gia + "', '" + x.manHinh + "', '" + x.heDieuhanh + "', '" + x.CPU + "', '" + x.cameraTruoc + "', '" + x.cameraSau + "', '" + x.RAM + "', '" + x.boNho + "', '" + x.Sim + "', '" + x.Pin + "', '" + x.trangThai + "', '" + x.hinhAnh + "')"; db.WriteData(sql); }