private void FillCboDispatcher() { //TODO: Re-check this UserObjectCollection users = new User().GetAll(); foreach (UserObject user in users) { if (user.Security.Planning != null) if (Functions.AllowMaintain(user.Security.Planning.AuthPlanning)) { ComboBoxItem item = new ComboBoxItem { Value = user }; this.cboDispatcher.Items.Add(item); } } }
private void FillCboReplacements() { UserObjectCollection users = new User().GetAll(); foreach (UserObject user in users) { if (user.Security.Planning != null) { if (Functions.AllowMaintain(user.Security.Planning.AuthPlanning)) { if (user.UsrID != this._planning.Dispatcher) { ComboBoxItem item = new ComboBoxItem { Value = user }; this.cboReplacement.Items.Add(item); if (item.Value.UsrID == this._planning.ReplacingDispatcher) { cboReplacement.SelectedIndex = cboReplacement.Items.Count - 1; chkActive.Checked = this._planning.ReplacingDispatcher != Guid.Empty; } } } } } }