Ejemplo n.º 1
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            TGDTO TGDTO = new TGDTO()
            {
                ConQuanLy = true
            };
            ThemTG frm = new ThemTG(true, TGDTO);

            frm.ShowDialog();

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

            TGDTO TGDTO = new TGDTO()
            {
                MaTG      = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["MaKV"]).ToString(),
                TenTG     = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["TenKV"]).ToString(),
                TGQuyDoi  = int.Parse(gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["ghichu"]).ToString()),
                ConQuanLy = bool.Parse(gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["ConQuanLy"]).ToString()),
            };
            ThemTG frm = new ThemTG(false, TGDTO);

            frm.ShowDialog();
            hienThi();
        }