private void bnEdit_Click(object sender, EventArgs e) { try { if (String.IsNullOrEmpty(txtName.Text) == true) { txtName.Focus(); MessageBox.Show("Vui lòng nhập tên nhóm dịch vụ.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { bnAdd.Enabled = true; bnEdit.Enabled = false; ServiceGroupsBO aServiceGroupsBO = new ServiceGroupsBO(); ServiceGroups aServiceGroups = new ServiceGroups(); aServiceGroups.ID =Convert.ToInt32(lblID.Text); aServiceGroups.Name = txtName.Text; aServiceGroups.Type = Convert.ToInt32(lueType.EditValue); aServiceGroups.Disable = bool.Parse(cbxDisable.SelectedItem.ToString()); aServiceGroupsBO.Update(aServiceGroups); this.ReloadData(); if (afrmIns_Services != null) { this.afrmIns_Services.ReloadData(); } } } catch (Exception ex) { MessageBox.Show("frmIns_ServiceGroups.bnEdit_Click\n" + ex.ToString(), "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } }