Beispiel #1
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            NhomHangDTO NHDTO = new NhomHangDTO()
            {
                ConQuanLy = true
            };
            ThemNhomHang frm = new ThemNhomHang(true, NHDTO);

            frm.ShowDialog();

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

            NhomHangDTO NHDTO = new NhomHangDTO()
            {
                MaNH      = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["MaNH"]).ToString(),
                TenNH     = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["TenNH"]).ToString(),
                ghichu    = gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["ghichu"]).ToString(),
                ConQuanLy = bool.Parse(gridView1.GetRowCellValue(_currentRowIndex, gridView1.Columns["ConQuanLy"]).ToString()),
            };
            ThemNhomHang frm = new ThemNhomHang(false, NHDTO);

            frm.ShowDialog();
            hienThi();
        }