Exemple #1
0
 private void DataGridNhomNguoiDung_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     Object.NhomNguoiDung nND = new Object.NhomNguoiDung();
     nND.MaNhomNguoiDung  = dataGridNhomNguoiDung.Rows[e.RowIndex].Cells[0].Value.ToString();
     nND.TenNhomNguoiDung = dataGridNhomNguoiDung.Rows[e.RowIndex].Cells[1].Value.ToString();
     nND.XuatNhapLieu(ref txtMaNhom, ref txtTenNhomNguoiDung);
 }
Exemple #2
0
        private void BtnXoa_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult = MessageBox.Show("Bạn thực sự muốn xóa?", "Cảnh báo!", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

            if (dialogResult == DialogResult.Yes)
            {
                Object.NhomNguoiDung nND = new Object.NhomNguoiDung();
                nND.MaNhomNguoiDung  = txtMaNhom.Text;
                nND.TenNhomNguoiDung = txtTenNhomNguoiDung.Text;
                nND.XoaData();

                LamMoi();
            }
            else if (dialogResult == DialogResult.No)
            {
            }
        }
Exemple #3
0
        private void BtnLuu_Click(object sender, EventArgs e)
        {
            if (btnSua.Visible == false)
            {
                Object.NhomNguoiDung nND = new Object.NhomNguoiDung();
                nND.MaNhomNguoiDung  = txtMaNhom.Text;
                nND.TenNhomNguoiDung = txtTenNhomNguoiDung.Text;
                nND.ThemData();
            }

            if (btnThem.Visible == false)
            {
                Object.NhomNguoiDung nND = new Object.NhomNguoiDung();
                nND.MaNhomNguoiDung  = txtMaNhom.Text;
                nND.TenNhomNguoiDung = txtTenNhomNguoiDung.Text;
                nND.SuaData();
            }
            LamMoi();
        }