Exemplo n.º 1
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            NCCDTO NCCDTO = new NCCDTO()
            {
                ConQuanLy = true
            };
            ThemNCC frm = new ThemNCC(true, NCCDTO);

            frm.ShowDialog();

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

            NCCDTO NCCDTO = new NCCDTO()
            {
                MaNCC     = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["MaNCC"]).ToString(),
                TenNCC    = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["TenNCC"]).ToString(),
                Tenkvncc  = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["TenKV"]).ToString(),
                diachiNCC = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["diachiNCC"]).ToString(),
                DTNCC     = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["DTNCC"]).ToString(),
                EmailNCC  = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["EmailNCC"]).ToString(),
                ConQuanLy = bool.Parse(gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["ConQuanLy"]).ToString()),
            };
            ThemNCC frm = new ThemNCC(false, NCCDTO);

            frm.ShowDialog();
            hienThi();
        }