private void btnLuuNXB_Click(object sender, EventArgs e) { try { if (txtTenNXB.Text.Equals("")) { MessageBox.Show("Bạn cần điền đầy đủ thông tin!", "Cảnh báo", MessageBoxButtons.OK); } else { NhaXuatBan entity = new NhaXuatBan(); entity.TenNXB = txtTenNXB.Text; entity.DiaChi = txtDiaChi.Text; entity.SoDienThoai = txtSoDT.Text; client.createPublisher(entity); MessageBox.Show("Thêm mới thành công!", "Chúc mừng", MessageBoxButtons.OK); resetform(); } } catch (Exception) { MessageBox.Show("Thêm mới thất bại", "Lỗi", MessageBoxButtons.OK); } }