Esempio n. 1
0
 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);
             }
     }
 }
Esempio n. 2
0
        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;
                            }
                        }
                    }
                }
            }
        }