private void bngThemmoi_Click_1(object sender, EventArgs e) { DataRow m_Row = m_NgheNghiepCtrl.ThemDongMoi(); m_Row["MaNgheNghiep"] = "NN" + quyDinh.LaySTT(dgvNN1.Rows.Count + 1); m_Row["TenNgheNghiep"] = ""; m_NgheNghiepCtrl.ThemNgheNghiep(m_Row); bdgNN.BindingSource.MoveLast(); }
private void bindingNavigatorAddNewItem_Click_1(object sender, EventArgs e) { if (dGVNgheNghiep.RowCount == 0) { bindingNavigatorDeleteItem.Enabled = true; } DataRow m_Row = m_NgheNghiepCtrl.ThemDongMoi(); m_Row["MaNghe"] = "NN" + quyDinh.LaySTT(dGVNgheNghiep.Rows.Count + 1); m_Row["TenNghe"] = ""; m_NgheNghiepCtrl.ThemNgheNghiep(m_Row); bindingNavigatorNgheNghiep.BindingSource.MoveLast(); }