Beispiel #1
0
        private void ToolStripMenuItemEditClick(object sender, EventArgs e)
        {
            var form = new EditConcessionRequestForm(_directivesViewer.SelectedItem);

            if (form.ShowDialog() == DialogResult.OK)
            {
                AnimatedThreadWorker.RunWorkerAsync();
            }
        }
Beispiel #2
0
        private void ButtonAddDisplayerRequested(object sender, ReferenceEventArgs e)
        {
            var form = new EditConcessionRequestForm(new SmartCore.CAA.ConcessionRequest()
            {
                Created   = DateTime.Now,
                FromId    = GlobalObjects.CaaEnvironment.IdentityUser.PersonnelId,
                CurrentId = GlobalObjects.CaaEnvironment.IdentityUser.PersonnelId,
                Status    = ConcessionRequestStatus.Open,
                Settings  = new ConcessionRequestSettings()
                {
                    Type       = ConcessionRequestType.Operator,
                    OperatorId = _operatorId.Value
                }
            });

            if (form.ShowDialog() == DialogResult.OK)
            {
                AnimatedThreadWorker.RunWorkerAsync();
            }
            e.Cancel = true;
        }
Beispiel #3
0
 protected override void FillDisplayerRequestedParams(ReferenceEventArgs e)
 {
     if (GlobalObjects.CaaEnvironment.IdentityUser.OperatorId > 0)
     {
         if (SelectedItem.Settings.Type == ConcessionRequestType.Operator)
         {
             if (SelectedItem.Settings.OperatorRecords.Any())
             {
                 var form = new EditCAAConcessionRequestForm(SelectedItem);
                 if (form.ShowDialog() == DialogResult.OK)
                 {
                     _animatedThreadWorker.RunWorkerAsync();
                 }
             }
             else
             {
                 var form = new EditConcessionRequestForm(SelectedItem);
                 if (form.ShowDialog() == DialogResult.OK)
                 {
                     _animatedThreadWorker.RunWorkerAsync();
                 }
             }
         }
     }
     else
     {
         if (SelectedItem.Settings.Type == ConcessionRequestType.CAA)
         {
             var form = new EditCAAConcessionRequestForm(SelectedItem);
             if (form.ShowDialog() == DialogResult.OK)
             {
                 _animatedThreadWorker.RunWorkerAsync();
             }
         }
     }
     e.Cancel = true;
 }