private void btn_upravHosta_Click(object sender, EventArgs e) { Database.getInstance.setButtonOff(btn_upravHosta, this); if (lb_guestList.SelectedItem == null) { MessageBox.Show("Musíte zvoliť hosťa zo zoznamu!"); return; } string priezvisko = lb_guestList.SelectedItem.ToString().Split(',')[0].Trim(); string meno = lb_guestList.SelectedItem.ToString().Split(',')[1].Trim(); PridajHosta dialog = new PridajHosta(); dialog.setEditMode(Database.getInstance.getGuestID(priezvisko, meno)); dialog.ShowDialog(); if (dialog.DialogResult == DialogResult.OK) { napln_guestlist(); napln_kalendar(); } Database.getInstance.setButtonOn(btn_upravHosta, this); }
private void btn_pridajHosta_Click(object sender, EventArgs e) { Database.getInstance.setButtonOff(btn_pridajHosta, this); PridajHosta dialog = new PridajHosta(); dialog.ShowDialog(); if (dialog.DialogResult == DialogResult.OK) { napln_guestlist(); } Database.getInstance.setButtonOn(btn_pridajHosta, this); }