Ejemplo n.º 1
0
        private void btn_Sua_NhomNguoiDung_Click(object sender, EventArgs e)
        {
            int    cathu       = gridView_NhomNguoiDung.FocusedRowHandle;
            string sql_manhom  = gridView_NhomNguoiDung.GetRowCellValue(cathu, "MANHOM").ToString();
            string sql_tennhom = gridView_NhomNguoiDung.GetRowCellValue(cathu, "TENNHOM").ToString();
            string sql_ghichu  = gridView_NhomNguoiDung.GetRowCellValue(cathu, "GHICHU").ToString();

            DataSetQLNS.NHOMNGUOIDUNGRow data = dataSetQLNS.NHOMNGUOIDUNG.FindByMANHOM(sql_manhom);
            data.TENNHOM = sql_tennhom;
            nHOMNGUOIDUNGTableAdapter.Update(this.dataSetQLNS.NHOMNGUOIDUNG);
            //cHUCVUTableAdapter
            load_dataNhomNguoiDung();
        }
Ejemplo n.º 2
0
        private void btn_Sua_NhomNguoiDung_Click(object sender, EventArgs e)
        {
            if (mANHOMComboBox.Text.Length > 0 && tENNHOMTextEdit.Text.Length > 0)
            {
                int    cathu       = gridView_NhomNguoiDung.FocusedRowHandle;
                string sql_manhom  = gridView_NhomNguoiDung.GetRowCellValue(cathu, "MANHOM").ToString();
                string sql_tennhom = gridView_NhomNguoiDung.GetRowCellValue(cathu, "TENNHOM").ToString();
                string sql_ghichu  = gridView_NhomNguoiDung.GetRowCellValue(cathu, "GHICHU").ToString();

                DataSetQLNS.NHOMNGUOIDUNGRow data = dataSetQLNS.NHOMNGUOIDUNG.FindByMANHOM(sql_manhom);
                data.TENNHOM = sql_tennhom;
                nHOMNGUOIDUNGTableAdapter.Update(this.dataSetQLNS.NHOMNGUOIDUNG);

                load_dataNhomNguoiDung();
            }
            else
            {
                MessageBox.Show("Nhập thiếu dữ liệu !!!");
            }
        }