/// <summary> /// Reset filters. /// </summary> private void Button6_Click(object sender, EventArgs e) { EmployeesPanel.ClearAllData(); EmployeesLV.ClearAllData(); EmployeesLV.SetNameColumns(); EmployeesLV.GetAllData(!checkBox1.Checked); }
/// <summary> /// Event when the selected employee is changed. /// </summary> private void ListView1_SelectedIndexChanged(object sender, EventArgs e) { // If the focus is lost, delete the panel. if (!EmployeesLV.IsSelected()) { EmployeesPanel.ClearAllData(); button7.Enabled = false; button7.Text = "Оберіть працівника"; return; } FillPanelEmployee(); }
private void FormChooseToolStripMenuItem_Click(object sender, EventArgs e) { Hide(); // Close and clear all data. EmployeesLV.ClearAllData(); EmployeesPanel.ClearAllData(); EmployeesLV.Close(); EmployeesPanel.Close(); Database.CloseConnection(); button7.Enabled = false; button7.Text = "Оберіть працівника"; if (!SelectProject()) { Application.ExitThread(); } Show(); }