Exemple #1
0
        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()]);
        }
Exemple #2
0
        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");
        }
Exemple #3
0
 private void tabMain_SelectedIndexChanged(object sender, EventArgs e)
 {
     refreshCurrentTabHelper(PhoneEmpDefaults.Refresh(), Phones.GetPhoneList(), PhoneEmpSubGroups.GetAll());
 }
Exemple #4
0
 private void butOK_Click(object sender, System.EventArgs e)
 {
     PhoneEmpSubGroups.Sync(_dictSubGroupsNew.SelectMany(x => x.Value).ToList(), _dictSubGroupsOld.SelectMany(x => x.Value).ToList());
     DialogResult = DialogResult.OK;
 }