/// <summary> /// Създава формата за промяна на служител или позиция и зареждаме съответната форма /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void changeEmpPosClick(object sender, EventArgs e) { if (allEmployeesView.SelectedItems.Count != 0) { AddEmployeeMenu emp = new AddEmployeeMenu(empData, false, ViewControl.Instance.getPositionsArray(), ViewControl.Instance.getCitiesArray()); emp.Show(); empData = ""; allEmployeesView.SelectedItems.Clear(); } else if (allPositionsView.SelectedItems.Count != 0) { AddPositionMenu pos = new AddPositionMenu(posData, false); pos.Show(); posData = ""; allPositionsView.SelectedItems.Clear(); } }
/// <summary> /// Създава формата за добавяне на позиция /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void addPosButton_Click(object sender, EventArgs e) { AddPositionMenu pos = new AddPositionMenu(posData, true); pos.Show(); }