示例#1
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            KVDTO KVDTO = new KVDTO()
            {
                ConQuanLy = true
            };
            ThemKV frm = new ThemKV(true, KVDTO);

            frm.ShowDialog();

            hienThi();
        }
示例#2
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            _currentRowIndex = gridView1.FocusedRowHandle;
            if (_currentRowIndex < 0)
            {
                return;
            }

            KVDTO KVDTO = new KVDTO()
            {
                MaKV      = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["MaKV"]).ToString(),
                TenKV     = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["TenKV"]).ToString(),
                ghichu    = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["ghichu"]).ToString(),
                ConQuanLy = bool.Parse(gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["ConQuanLy"]).ToString()),
            };
            ThemKV frm = new ThemKV(false, KVDTO);

            frm.ShowDialog();
            hienThi();
        }