public FormPhoneEmpDefaultEscalationEdit(PhoneEmpSubGroupType tabDefault = PhoneEmpSubGroupType.Avail) { InitializeComponent(); Lan.F(this); FillTabs(); List <PhoneEmpSubGroup> listGroupsAll = PhoneEmpSubGroups.GetAll(); _dictSubGroupsOld = Enum.GetValues(typeof(PhoneEmpSubGroupType)).Cast <PhoneEmpSubGroupType>().ToDictionary(x => x, x => listGroupsAll.FindAll(y => y.SubGroupType == x)); _dictSubGroupsNew = _dictSubGroupsOld.ToDictionary(x => x.Key, x => x.Value.Select(y => y.Copy()).ToList()); //Get all employees. _listPED = PhoneEmpDefaults.Refresh(); //Sort by name. _listPED.Sort(new PhoneEmpDefaults.PhoneEmpDefaultComparer(PhoneEmpDefaults.PhoneEmpDefaultComparer.SortBy.name)); FillGrids(); //This can change to a switch statement on tabDefault if we ever add custom named tabs. tabMain.SelectTab(tabMain.TabPages[tabDefault.ToString()]); }
private void escalationToolStripMenuItem_Click(object sender, EventArgs e) { if (!Security.IsAuthorized(Permissions.Setup)) { return; } FormPhoneEmpDefaultEscalationEdit FormE = new FormPhoneEmpDefaultEscalationEdit(); FormE.ShowDialog(); refreshCurrentTabHelper(PhoneEmpDefaults.Refresh(), Phones.GetPhoneList(), PhoneEmpSubGroups.GetAll()); SecurityLogs.MakeLogEntry(Permissions.Setup, 0, "Escalation team changed"); }
private void tabMain_SelectedIndexChanged(object sender, EventArgs e) { refreshCurrentTabHelper(PhoneEmpDefaults.Refresh(), Phones.GetPhoneList(), PhoneEmpSubGroups.GetAll()); }