private void frmThongTinTrungTam_Load(object sender, EventArgs e) { var item = ChiTietTrungTam.Select(); txtTenTrungTam.Text = item.TenTT; txtDiaChi.Text = item.DiaChiTT; txtSDT.Text = item.SdtTT; txtEmail.Text = item.EmailTT; txtWebsite.Text = item.Website; }
private void btnLuuThongTin_Click(object sender, EventArgs e) { try { ChiTietTrungTam.Update(LoadChiTiet()); MessageBox.Show("Thay đổi thông tin trung tâm thành công", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); GlobalSettings.LoadCenterInformation(); this.Close(); } catch { MessageBox.Show("Có lỗi xảy ra", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } }