Exemplo n.º 1
0
        public void ReadData()
        {
            int id = int.Parse(comboBoxDT.SelectedValue.ToString());

            ConsumerWinform.WSSDT.WSSDT dtct = new ConsumerWinform.WSSDT.WSSDT();
            //IDataReader reader = new IDataReader();
            dts   = new DataSet();
            table = new DataTable();
            // table dien thoai
            string dt = "";

            dt  = "SELECT BaiViet  FROM ThongTinChiTiet  WHERE idDT ='" + id + "'";
            dts = dtct.SelectQuery(dt);
            //MessageBox.Show(dt);
            table = dts.Tables[0];
            if (table.Rows.Count > 0)
            {
                txtBaiViet.Text = table.Rows[0][0].ToString();
            }
            else
            {
                rsl             = MessageBox.Show(this, "Điện thoại này chưa có bài viết. Nhấn Ok để viết bài..!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Question);
                txtBaiViet.Text = "";
            }
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
        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);
        }
Exemplo n.º 7
0
 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);
 }
Exemplo n.º 8
0
        public void Frmload()
        {
            ConsumerWinform.WSSDT.WSSDT dtct = new ConsumerWinform.WSSDT.WSSDT();
            DataSet dts = new DataSet();
            DataTable table = new DataTable();
            string sql = "";

            sql = "SELECT idHSX, TenHSX, ThuTu, AnHien FROM HANGSANXUAT";// WHERE idHSX =" +"'"+txtIDHSX+"'";
            dts = dtct.SelectQuery(sql);
            table = dts.Tables[0];
            //ds = dtct.SelectQuery(sql);
            dataGridView1.AutoGenerateColumns = false;
            dataGridView1.DataSource = table;
        }
Exemplo n.º 9
0
        public void Frmload()
        {
            ConsumerWinform.WSSDT.WSSDT dtct = new ConsumerWinform.WSSDT.WSSDT();
            DataSet   dts   = new DataSet();
            DataTable table = new DataTable();
            string    sql   = "";

            sql   = "SELECT idHSX, TenHSX, ThuTu, AnHien FROM HANGSANXUAT";// WHERE idHSX =" +"'"+txtIDHSX+"'";
            dts   = dtct.SelectQuery(sql);
            table = dts.Tables[0];
            //ds = dtct.SelectQuery(sql);
            dataGridView1.AutoGenerateColumns = false;
            dataGridView1.DataSource          = table;
        }
Exemplo n.º 10
0
        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);
        }
Exemplo n.º 11
0
        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);
        }
Exemplo n.º 12
0
        public void Frmload()
        {
            dtct = new ConsumerWinform.WSSDT.WSSDT();
            dts = new DataSet();
            table = new DataTable();
            string sql = "";

            sql = "SELECT idDT, TenDT FROM DIENTHOAI";// WHERE idHSX =" +"'"+txtIDHSX+"'";
            dts = dtct.SelectQuery(sql);
            table = dts.Tables[0];
            //ds = dtct.SelectQuery(sql);

            comboBoxDT.DisplayMember = "TenDT";
            comboBoxDT.ValueMember = "idDT";
            comboBoxDT.DataSource = table;
        }
Exemplo n.º 13
0
 public void ReadData()
 {
     id = int.Parse(txtIDHSX.Text);
     ConsumerWinform.WSSDT.WSSDT dtct = new ConsumerWinform.WSSDT.WSSDT();
     //IDataReader reader = new IDataReader();
     DataSet dts = new DataSet();
     DataTable table = new DataTable();
     string sql = "";
     sql = "SELECT TenHSX, ThuTu, AnHien FROM HANGSANXUAT WHERE idHSX ='"+id+"'";
     dts = dtct.SelectQuery(sql);
     table = dts.Tables[0];
     //txtIDHSX.Text = table.Rows[0][0].ToString();
     txtTenHSX.Text = table.Rows[0][0].ToString();
     txtThuTu.Text = table.Rows[0][1].ToString();
     txtAnHien.Text = table.Rows[0][2].ToString();
 }
Exemplo n.º 14
0
        public void Frmload()
        {
            dtct  = new ConsumerWinform.WSSDT.WSSDT();
            dts   = new DataSet();
            table = new DataTable();
            string sql = "";

            sql   = "SELECT idDT, TenDT FROM DIENTHOAI";// WHERE idHSX =" +"'"+txtIDHSX+"'";
            dts   = dtct.SelectQuery(sql);
            table = dts.Tables[0];
            //ds = dtct.SelectQuery(sql);

            comboBoxDT.DisplayMember = "TenDT";
            comboBoxDT.ValueMember   = "idDT";
            comboBoxDT.DataSource    = table;
        }
Exemplo n.º 15
0
        public void ReadData()
        {
            id = int.Parse(txtIDHSX.Text);
            ConsumerWinform.WSSDT.WSSDT dtct = new ConsumerWinform.WSSDT.WSSDT();
            //IDataReader reader = new IDataReader();
            DataSet   dts   = new DataSet();
            DataTable table = new DataTable();
            string    sql   = "";

            sql   = "SELECT TenHSX, ThuTu, AnHien FROM HANGSANXUAT WHERE idHSX ='" + id + "'";
            dts   = dtct.SelectQuery(sql);
            table = dts.Tables[0];
            //txtIDHSX.Text = table.Rows[0][0].ToString();
            txtTenHSX.Text = table.Rows[0][0].ToString();
            txtThuTu.Text  = table.Rows[0][1].ToString();
            txtAnHien.Text = table.Rows[0][2].ToString();
        }
Exemplo n.º 16
0
 //=================================
 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);
 }
Exemplo n.º 17
0
        private void buttonLoad_Click(object sender, EventArgs e)
        {
            //WSSDT dtct = new WSSDT();
            //ComsumerWinform.WSSDT.WSSDTSoapClient dtct = new ComsumerWinform.WSSDT.WSSDTSoapClient();
            ConsumerWinform.WSSDT.WSSDT dtct = new ConsumerWinform.WSSDT.WSSDT();
            DataSet dts = new DataSet();
            DataTable table = new DataTable();
            string sql = "";

            sql = "SELECT TenHSX, TenDT, Gia, MoTa, PhuKien, BaoHanh, KhuyenMai, NgayCapNhat ";
            sql += "FROM DIENTHOAI DT, HANGSANXUAT HSX ";
            sql += "WHERE DT.idHSX = HSX.idHSX ";

            dts = dtct.SelectQuery(sql);
            table = dts.Tables[0];
            //ds = dtct.SelectQuery(sql);
            dataGridView1.AutoGenerateColumns = false;
            dataGridView1.DataSource = table;
        }
Exemplo n.º 18
0
        //=================================
        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);
        }
Exemplo n.º 19
0
        private void buttonLoad_Click(object sender, EventArgs e)
        {
            //WSSDT dtct = new WSSDT();
            //ComsumerWinform.WSSDT.WSSDTSoapClient dtct = new ComsumerWinform.WSSDT.WSSDTSoapClient();
            ConsumerWinform.WSSDT.WSSDT dtct = new ConsumerWinform.WSSDT.WSSDT();
            DataSet   dts   = new DataSet();
            DataTable table = new DataTable();
            string    sql   = "";

            sql  = "SELECT TenHSX, TenDT, Gia, MoTa, PhuKien, BaoHanh, KhuyenMai, NgayCapNhat ";
            sql += "FROM DIENTHOAI DT, HANGSANXUAT HSX ";
            sql += "WHERE DT.idHSX = HSX.idHSX ";

            dts   = dtct.SelectQuery(sql);
            table = dts.Tables[0];
            //ds = dtct.SelectQuery(sql);
            dataGridView1.AutoGenerateColumns = false;
            dataGridView1.DataSource          = table;
        }
Exemplo n.º 20
0
        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 = "";
        }
Exemplo n.º 21
0
        public void Xoa()
        {
            id = int.Parse(comboBoxDT.SelectedValue.ToString());

            int rs;

            ConsumerWinform.WSSDT.WSSDT dtct = new ConsumerWinform.WSSDT.WSSDT();
            string sql = "";

            sql = "DELETE FROM THONGTINCHITIET 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(sql);
            }
            else
            {
                Frmload();
            }
        }
Exemplo n.º 22
0
        // 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);
        }
Exemplo n.º 23
0
        // 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);
        }
Exemplo n.º 24
0
 public void ReadData()
 {
     int id = int.Parse(comboBoxDT.SelectedValue.ToString());
     ConsumerWinform.WSSDT.WSSDT dtct = new ConsumerWinform.WSSDT.WSSDT();
     //IDataReader reader = new IDataReader();
     dts = new DataSet();
     table = new DataTable();
     // table dien thoai
     string dt = "";
     dt = "SELECT BaiViet  FROM ThongTinChiTiet  WHERE idDT ='" + id + "'";
     dts = dtct.SelectQuery(dt);
     //MessageBox.Show(dt);
     table = dts.Tables[0];
     if (table.Rows.Count > 0)
     {
         txtBaiViet.Text = table.Rows[0][0].ToString();
     }
     else
     {
         rsl = MessageBox.Show(this, "Điện thoại này chưa có bài viết. Nhấn Ok để viết bài..!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Question);
         txtBaiViet.Text = "";
     }
 }
Exemplo n.º 25
0
        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);
        }
Exemplo n.º 26
0
        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 { }
        }
Exemplo n.º 27
0
        //doc du lieu
        public void ReadData()
        {
            id = int.Parse(comboBoxDT.SelectedValue.ToString());
            ConsumerWinform.WSSDT.WSSDT dtct = new ConsumerWinform.WSSDT.WSSDT();
            //IDataReader reader = new IDataReader();
            dts = new DataSet();
            table = new DataTable();
            // table dien thoai
            string dt = "";
            dt = "SELECT TenDT, Gia, HinhAnh, MoTa, PhuKien, BaoHanh, KhuyenMai, NgayCapNhat, AnHien, idHSX  FROM DIENTHOAI  WHERE idDT ='" + id + "'";
            dts = dtct.SelectQuery(dt);
            table = dts.Tables[0];
            txtidHSX.Text = table.Rows[0][9].ToString();
            txtTenDT.Text = table.Rows[0][0].ToString();
            txtGia.Text = table.Rows[0][1].ToString();
            txtHinhAnh.Text = table.Rows[0][2].ToString();
            txtMoTa.Text = table.Rows[0][3].ToString();
            txtPhuKien.Text = table.Rows[0][4].ToString();
            txtBaoHanh.Text = table.Rows[0][5].ToString();
            txtKhuyenMai.Text = table.Rows[0][6].ToString();
            txtNgayCapNhat.Text = table.Rows[0][7].ToString();
            txtDTAnHien.Text = table.Rows[0][8].ToString();
            // table tinh nang dien thoai

            string tn;
            tn = "Select 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 From TinhNangDienThoai where idDT='" + id + "'";
            ds = new DataSet();
            table2 = new DataTable();
            ds = dtct.SelectQuery(tn);
            table2 = ds.Tables[0];

            txtMang2G.Text = table2.Rows[0][0].ToString();
            txtMang3G.Text = table2.Rows[0][1].ToString();
            txtSim.Text = table2.Rows[0][2].ToString();
            txtKichThuoc.Text = table2.Rows[0][3].ToString();
            txtTrongLuong.Text = table2.Rows[0][4].ToString();
            txtMauSac.Text = table2.Rows[0][5].ToString();
            txtLoaiManHinh.Text = table2.Rows[0][6].ToString();
            txtKTManHinh.Text=table2.Rows[0][7].ToString();
            txtAudio.Text = table2.Rows[0][8].ToString();
            txtVideo.Text = table2.Rows[0][9].ToString();
            txtRadio.Text = table2.Rows[0][10].ToString();
            txtKieuChuong.Text = table2.Rows[0][11].ToString();
            txtLoaNgoai.Text = table2.Rows[0][12].ToString();
            txtBoNhoTrong.Text = table2.Rows[0][13].ToString();
            txtTheNho.Text = table2.Rows[0][14].ToString();
            txtWLan.Text = table2.Rows[0][15].ToString();
            txtGPRS.Text = table2.Rows[0][16].ToString();
            txtHSPDA.Text = table2.Rows[0][17].ToString();
            txtBlueTooth.Text = table2.Rows[0][18].ToString();
            txtUSB.Text = table2.Rows[0][19].ToString();
            txtGPS.Text = table2.Rows[0][20].ToString();
            txtJack.Text = table2.Rows[0][21].ToString();
            txtCameraChinh.Text = table2.Rows[0][21].ToString();
            txtChucNang.Text = table2.Rows[0][23].ToString();
            txtCameraPhu.Text = table2.Rows[0][24].ToString();
            txtQuayPhim.Text = table2.Rows[0][25].ToString();
            txtTinNhan.Text = table2.Rows[0][26].ToString();
            txtTrinhDuyet.Text = table2.Rows[0][27].ToString();
            txtHDH.Text = table2.Rows[0][28].ToString();
            txtCPU.Text = table2.Rows[0][29].ToString();
            txtChipSet.Text = table2.Rows[0][30].ToString();
            txtGPU.Text = table2.Rows[0][31].ToString();
            txtJava.Text = table2.Rows[0][32].ToString();
            txtTroChoi.Text = table2.Rows[0][33].ToString();
            txtLoaiPin.Text = table2.Rows[0][34].ToString();
            txtThoiGianCho.Text = table2.Rows[0][35].ToString();
            txtThoiGianHoatDong.Text = table2.Rows[0][36].ToString();
            txtKhac.Text = table2.Rows[0][37].ToString();
        }
Exemplo n.º 28
0
 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 = "";
 }
Exemplo n.º 29
0
 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);
 }
Exemplo n.º 30
0
        //doc du lieu
        public void ReadData()
        {
            id = int.Parse(comboBoxDT.SelectedValue.ToString());
            ConsumerWinform.WSSDT.WSSDT dtct = new ConsumerWinform.WSSDT.WSSDT();
            //IDataReader reader = new IDataReader();
            dts   = new DataSet();
            table = new DataTable();
            // table dien thoai
            string dt = "";

            dt                  = "SELECT TenDT, Gia, HinhAnh, MoTa, PhuKien, BaoHanh, KhuyenMai, NgayCapNhat, AnHien, idHSX  FROM DIENTHOAI  WHERE idDT ='" + id + "'";
            dts                 = dtct.SelectQuery(dt);
            table               = dts.Tables[0];
            txtidHSX.Text       = table.Rows[0][9].ToString();
            txtTenDT.Text       = table.Rows[0][0].ToString();
            txtGia.Text         = table.Rows[0][1].ToString();
            txtHinhAnh.Text     = table.Rows[0][2].ToString();
            txtMoTa.Text        = table.Rows[0][3].ToString();
            txtPhuKien.Text     = table.Rows[0][4].ToString();
            txtBaoHanh.Text     = table.Rows[0][5].ToString();
            txtKhuyenMai.Text   = table.Rows[0][6].ToString();
            txtNgayCapNhat.Text = table.Rows[0][7].ToString();
            txtDTAnHien.Text    = table.Rows[0][8].ToString();
            // table tinh nang dien thoai

            string tn;

            tn     = "Select 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 From TinhNangDienThoai where idDT='" + id + "'";
            ds     = new DataSet();
            table2 = new DataTable();
            ds     = dtct.SelectQuery(tn);
            table2 = ds.Tables[0];

            txtMang2G.Text           = table2.Rows[0][0].ToString();
            txtMang3G.Text           = table2.Rows[0][1].ToString();
            txtSim.Text              = table2.Rows[0][2].ToString();
            txtKichThuoc.Text        = table2.Rows[0][3].ToString();
            txtTrongLuong.Text       = table2.Rows[0][4].ToString();
            txtMauSac.Text           = table2.Rows[0][5].ToString();
            txtLoaiManHinh.Text      = table2.Rows[0][6].ToString();
            txtKTManHinh.Text        = table2.Rows[0][7].ToString();
            txtAudio.Text            = table2.Rows[0][8].ToString();
            txtVideo.Text            = table2.Rows[0][9].ToString();
            txtRadio.Text            = table2.Rows[0][10].ToString();
            txtKieuChuong.Text       = table2.Rows[0][11].ToString();
            txtLoaNgoai.Text         = table2.Rows[0][12].ToString();
            txtBoNhoTrong.Text       = table2.Rows[0][13].ToString();
            txtTheNho.Text           = table2.Rows[0][14].ToString();
            txtWLan.Text             = table2.Rows[0][15].ToString();
            txtGPRS.Text             = table2.Rows[0][16].ToString();
            txtHSPDA.Text            = table2.Rows[0][17].ToString();
            txtBlueTooth.Text        = table2.Rows[0][18].ToString();
            txtUSB.Text              = table2.Rows[0][19].ToString();
            txtGPS.Text              = table2.Rows[0][20].ToString();
            txtJack.Text             = table2.Rows[0][21].ToString();
            txtCameraChinh.Text      = table2.Rows[0][21].ToString();
            txtChucNang.Text         = table2.Rows[0][23].ToString();
            txtCameraPhu.Text        = table2.Rows[0][24].ToString();
            txtQuayPhim.Text         = table2.Rows[0][25].ToString();
            txtTinNhan.Text          = table2.Rows[0][26].ToString();
            txtTrinhDuyet.Text       = table2.Rows[0][27].ToString();
            txtHDH.Text              = table2.Rows[0][28].ToString();
            txtCPU.Text              = table2.Rows[0][29].ToString();
            txtChipSet.Text          = table2.Rows[0][30].ToString();
            txtGPU.Text              = table2.Rows[0][31].ToString();
            txtJava.Text             = table2.Rows[0][32].ToString();
            txtTroChoi.Text          = table2.Rows[0][33].ToString();
            txtLoaiPin.Text          = table2.Rows[0][34].ToString();
            txtThoiGianCho.Text      = table2.Rows[0][35].ToString();
            txtThoiGianHoatDong.Text = table2.Rows[0][36].ToString();
            txtKhac.Text             = table2.Rows[0][37].ToString();
        }