private void btnSave_Click(object sender, EventArgs e) { try { if (ValidateData() == true) { DivisionsBO aDivisionsBO = new DivisionsBO(); Divisions aDivisions = aDivisionsBO.Select_ByID(ID); aDivisions.Name = txtName.Text; aDivisions.Type = cboType.SelectedIndex + 1; aDivisions.Status = cboStatus.SelectedIndex + 1; aDivisions.Disable = Convert.ToBoolean(cboDisable.Text); aDivisionsBO.Update(aDivisions); this.afrmLst_Divisions.ReloadData(); MessageBox.Show("Cập nhật dữ liệu thành công.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Close(); } } catch (Exception ex) { MessageBox.Show("frmUpd_Divisions.btnSave_Click\n" + ex.ToString(), "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Information); } }