示例#1
0
        public void Apply()
        {
            Results  = string.Empty;
            _applied = false;

            IEnumerable selectedAgents = GetSelectedAgents(EmployeeSelectionWay == 1).ForEach <IAgent>(o =>
            {
                var timeBox = o.Schedule;

                timeBox.Create(Term.New(EventStart, SelectedEventType, EventLength), (t, success) =>
                {
                    if (success)
                    {
                        ((Term)t).Tag = Comments;
                        _applied      = true;
                    }

                    o.OperationFail = !success;
                }, false);
            });

            if (RefreshDelegate != null)
            {
                RefreshDelegate.Invoke(selectedAgents, _applied);
            }
            //if (ReloadAgentDelegate != null)
            //    SelectedAgents = ReloadAgentDelegate();
        }
示例#2
0
 public void CheckRefresh()
 {
     if (RefreshFlag)
     {
         refresh?.Invoke(this);
         RefreshFlag = false;
     }
 }
 private void tabControlSales_Click(object sender, EventArgs e)
 {
     refreshDelegate.Invoke();
 }