Esempio n. 1
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            KVDTO DVTDTO = new KVDTO()
            {
                ConQuanLy = true
            };
            ThemDVT frm = new ThemDVT(true, DVTDTO);

            frm.ShowDialog();

            hienThi();
        }
Esempio n. 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["MaDVT"]).ToString(),
                TenKV     = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["TenDVT"]).ToString(),
                ghichu    = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["ghichu"]).ToString(),
                ConQuanLy = bool.Parse(gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["ConQuanLy"]).ToString()),
            };
            ThemDVT frm = new ThemDVT(false, KVDTO);

            frm.ShowDialog();
            hienThi();
        }