Пример #1
1
        private void tspControl2_DropDownClosed(object sender, RoutedEventArgs e)
        {
            TimeSpan? totalTime = tspControl2.Value;

            var alert = new RadDesktopAlert();
            alert.Header = "Triggered Alert!";
            alert.Content = $"Hello, this message will self-destruct in {totalTime.Value.Seconds} seconds.";
            alert.ShowDuration = (int)totalTime.Value.TotalMilliseconds;

            //Add Icon from Theme
            alert.Icon = new Image { Source = Application.Current.FindResource("DesktopAlertIcon") as ImageSource, Width = 48, Height = 48 };
            alert.IconColumnWidth = 75;
            alert.IconMargin = new Thickness(0, 0, 10, 10);

            RadDesktopAlertManager manager = new RadDesktopAlertManager();
            manager.ShowAlert(alert);
        }
Пример #2
0
        private void saveButton_Click(object sender, RoutedEventArgs e)
        {
            if (ValidateGL())
            {
                //if (_viewModel.AddGLCommand.CanExecute(null))
                //{
                //    RaiseCanExecuteChanged();
                //}
                //else
                //{
                //    RaiseNoCanExecuteChanged();

                //}
                //NavStateTrue();
                GLDataForm.CommitEdit();
                _viewModel.Save();
                var manager = new RadDesktopAlertManager(AlertScreenPosition.TopCenter);

                var alert = new RadDesktopAlert
                {
                    FlowDirection = FlowDirection.RightToLeft,
                    Header        = "اطلاعات",
                    Content       = "اطلاعات با موفقیت ثبت شد",
                    ShowDuration  = 2000,
                };
                manager.ShowAlert(alert);
            }// _viewModel.SaveCommand
        }
        private void SLDataForm_EditEnded(object sender, Telerik.Windows.Controls.Data.DataForm.EditEndedEventArgs e)
        {
            var commitEditCommand = RadDataFormCommands.CommitEdit as RoutedUICommand;

            if (e.EditAction == Telerik.Windows.Controls.Data.DataForm.EditAction.Commit)
            {
                _viewModel.Save();
                commitEditCommand.Execute(null, SLDataForm);
                var manager = new RadDesktopAlertManager(AlertScreenPosition.TopCenter);

                var alert = new RadDesktopAlert
                {
                    FlowDirection = FlowDirection.RightToLeft,
                    Header        = "اطلاعات",
                    Content       = "اطلاعات با موفقیت ثبت شد",
                    ShowDuration  = 2000,
                };
                manager.ShowAlert(alert);
                //  if (e.EditAction == Telerik.Windows.Controls.Data.DataForm.EditAction.Commit)
                //  _viewModel.Save();
            }
            else if (e.EditAction == Telerik.Windows.Controls.Data.DataForm.EditAction.Cancel)
            {
                _viewModel.Reject();
            }
        }
Пример #4
0
        private void GLDataForm_DeletedItem(object sender, Telerik.Windows.Controls.Data.DataForm.ItemDeletedEventArgs e)
        {
            // var r = _viewModel.DeleteGL((GL));
            //// var r = _viewModel.DeleteGL((GL)e.DeletedItem);

            if (_dialogResult == true)
            {
                var manager = new RadDesktopAlertManager(AlertScreenPosition.TopCenter, new Point(0, 0), 100);

                var alert = new RadDesktopAlert
                {
                    FlowDirection = FlowDirection.RightToLeft,
                    Header        = "اطلاعات",
                    Content       = ".حذف با موفقیت انجام شد",
                    ShowDuration  = 5000,
                };
                manager.ShowAlert(alert);
            }

            //else
            //{
            //    DialogParameters parameters = new DialogParameters();
            //    parameters.OkButtonContent = "بله";
            //    parameters.Header = "اخطار";
            //    parameters.Content = ".امکان حذف وجود ندارد";
            //    // parameters.Closed = OnClosed;
            //    RadWindow.Alert(parameters);
            //}
        }
Пример #5
0
        private void RadButtonGuardar_Click(object sender, RoutedEventArgs e)
        {
            if (txtNombreEjecutor.Text == "")
            {
                txtNombreEjecutor.Background = Brushes.Orange;
                var alert = new RadDesktopAlert();
                alert.Header  = "NOTIFICACIÓN";
                alert.Content = "Por favor registra un nombre al ejecutor.";

                RadDesktopAlertManager manager = new RadDesktopAlertManager();
                manager.ShowAlert(alert);
            }
            else
            {
                var padre = Window.GetWindow(this) as MainWindow;
                padre.radBusyIndicator.IsBusy = true;


                BackgroundWorker bw = new BackgroundWorker();
                bw.DoWork             += new DoWorkEventHandler(GuardarEjecutor);
                bw.ProgressChanged    += new ProgressChangedEventHandler(GuardarEjecutorChanged);
                bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(GuardarEjecutorFin);

                bw.RunWorkerAsync();
            }
        }
Пример #6
0
        /// <summary>
        /// Recreate RadDesktopAlertManager.
        /// </summary>
        void recreateManager()
        {
            CloseAllAlerts(false);
            var alertOffsetPos = getAlertOffsetPosition(AlertWindowPosition);

            _manager = new RadDesktopAlertManager(AlertWindowPosition, alertOffsetPos);
        }
Пример #7
0
        private void AlertPositioning()
        {
            if (radDesktopAlertManager != null)
            {
                radDesktopAlertManager.CloseAllAlerts();
            }


            if (WindowState != System.Windows.WindowState.Maximized)
            {
                var workingArea = System.Windows.SystemParameters.WorkArea;
                radDesktopAlertManager =
                    new RadDesktopAlertManager(
                        AlertScreenPosition.BottomLeft,
                        new Point(
                            Left + ActualWidth / 2 - 200,
                            -(workingArea.Height - Top - Height + 10)
                            ),
                        5
                        );
            }
            else
            {
                var rect = SystemParameters.WorkArea;

                radDesktopAlertManager =
                    new RadDesktopAlertManager(
                        AlertScreenPosition.BottomCenter, 5);
            }
        }
        //type
        #endregion
        #region Methods
        public void DocumentNumbering()
        {
            var order = _uow.AccDocumentHeaders.OrderBy(x => x.DocumentDate).ThenBy(x => x.DailyNumber).ToList();
            var getDocumentNumbering = _uow.Set <DocumentNumbering>().AsNoTracking().FirstOrDefault(x => x.AccountDocumentId == 1);
            var startNumber          = getDocumentNumbering.StartNumber;

            for (long i = 1; i < order.Count(); i++)
            {
                int ii = Convert.ToInt32(i);
                order[ii].DocumentNumber = startNumber;
                startNumber++;
            }
            _uow.SaveChanges();
            var manager = new RadDesktopAlertManager(AlertScreenPosition.TopCenter);

            var alert = new RadDesktopAlert
            {
                FlowDirection = FlowDirection.RightToLeft,
                Header        = "اطلاعات",
                Content       = ".شماره گذاری با موفقیت انجام شد",
                ShowDuration  = 2000,
            };

            manager.ShowAlert(alert);
        }
Пример #9
0
        private void BtnStartTimer_Click(object sender, RoutedEventArgs e)
        {
            var manager = new RadDesktopAlertManager();

            manager = new RadDesktopAlertManager(AlertScreenPosition.BottomCenter);
            manager = new RadDesktopAlertManager(AlertScreenPosition.TopCenter, 5);
            manager = new RadDesktopAlertManager(AlertScreenPosition.TopRight, new Point(0, 0));
            manager = new RadDesktopAlertManager(AlertScreenPosition.BottomCenter, new Point(0, 0), 10);
            if (TimerAmount != null && TimerAmount != 0)
            {
                Timer timer = new Timer();
                timer.StartTime = DateTime.Now;
                timer.StopTime  = DateTime.Now.AddMinutes(TimerAmount);
                timer.isDeleted = false;
                TimerRepository.Instance.Service.Add(timer);
                var alert = new RadDesktopAlert
                {
                    Header       = "Timer Started",
                    Content      = "Timer has been started on the display monitor.",
                    ShowDuration = 5000,
                };
                manager.ShowAlert(alert);
            }
            else
            {
                var alert1 = new RadDesktopAlert
                {
                    Header       = "Timer Not Started Sucessfully",
                    Content      = "Timer has not been started on the display monitor.",
                    ShowDuration = 5000,
                };
                manager.ShowAlert(alert1);
            }
            tbTime.Clear();
        }
 private Boolean checksoftwareshouldrun()
 {
     try
     {
         softwaresetting softwareshouldrun = userutils.ravicosoftbusinessbookcanrun;
         if (softwareshouldrun != null)
         {
             if (softwareshouldrun.stringvalue == "no")
             {
                 RadDesktopAlertManager manager = new RadDesktopAlertManager();
                 var alert = new RadDesktopAlert();
                 alert.Header       = "Alert";
                 alert.Content      = "Software usage not allowed. Please contact Ravicosoft for info";
                 alert.ShowDuration = 5000;
                 System.Media.SystemSounds.Hand.Play();
                 manager.ShowAlert(alert);
                 return(false);
             }
             else
             {
                 return(true);
             }
         }
         else
         {
             return(true);
         }
     }
     catch
     {
         return(true);
     }
 }
Пример #11
0
        public void ShowNotification(string header, string content)
        {
            if (_window.Dispatcher.CheckAccess())
            {
                var alert = new RadDesktopAlert();
                alert.Header       = header;
                alert.Content      = content;
                alert.ShowDuration = 3000;
                RadDesktopAlertManager manager = new RadDesktopAlertManager();
                manager.ShowAlert(alert);
            }
            else
            {
                _window.Dispatcher.Invoke(() =>
                {
                    var alert                      = new RadDesktopAlert();
                    alert.Header                   = header;
                    alert.Content                  = content;
                    alert.ShowDuration             = 3000;
                    RadDesktopAlertManager manager = new RadDesktopAlertManager();

                    manager.ShowAlert(alert);
                });
            }
        }
        private void saveButton_Click(object sender, RoutedEventArgs e)
        {
            if (ImageLogo.Source != null)
            {
                String filePath = $"{Environment.CurrentDirectory}\\Image\\CompanyInformationPictur.jpg";
                if (File.Exists(filePath))
                {
                    File.Delete(filePath);
                }
                var encoder = new JpegBitmapEncoder();
                encoder.Frames.Add(BitmapFrame.Create((BitmapSource)ImageLogo.Source));
                using (FileStream stream = new FileStream(filePath, FileMode.Create))
                    encoder.Save(stream);
                companyInformationViewModel.CompanyInformationModel.Logo = filePath;
            }
            companyInformationViewModel.onSave();
            var manager = new RadDesktopAlertManager(AlertScreenPosition.TopCenter, new Point(0, 0), 100);

            var alert = new RadDesktopAlert
            {
                FlowDirection = FlowDirection.RightToLeft,
                Header        = "اطلاعات",
                Content       = ".اطلاعات با موفقیت ثبت شد",
                ShowDuration  = 5000,
            };

            manager.ShowAlert(alert);
        }
        public ViewModel()
        {
            this.ContextMenuOpenedCommand = new DelegateCommand(this.OnContextMenuOpenedCommandExecuted);
            this.PauseResumeMailboxCommand = new DelegateCommand(this.OnPauseResumeMailboxCommandExecuted);
            this.ReceivedEmails = EmailService.GetEmails(30);

            this.randomNumberGenerator = new Random();
            this.desktopAlertManager = new RadDesktopAlertManager(AlertScreenPosition.BottomRight, 5d);
        }
Пример #14
0
        public MainWindow()
        {
            StyleManager.ApplicationTheme = new FluentTheme();
            InitializeComponent();
            radDesktopAlertManager = new RadDesktopAlertManager(AlertScreenPosition.BottomCenter, new Point(0, 200), 5);

            SizeChanged     += MainWindow_SizeChanged;
            LocationChanged += MainWindow_LocationChanged;
            Loaded          += MainWindow_Loaded;
            //var t = System.IO.Directory.GetFiles(@"C:\Work", "*", System.IO.SearchOption.AllDirectories);
        }
        public Example()
        {
            InitializeComponent();

            var model = this.DataContext as ViewModel;
            model.ActivateDesktopAlertAction = new Action<Shipment>(this.ActivateDesktopAlert);

            this.manager = new RadDesktopAlertManager();
            this.manager.ShowAnimation = new SlideAnimation { Direction = AnimationDirection.In, SlideMode = SlideMode.Bottom, Orientation = Orientation.Horizontal, SpeedRatio = 0.3d, PixelsToAnimate = 360 };
            this.manager.HideAnimation = new SlideAnimation { Direction = AnimationDirection.Out, SlideMode = SlideMode.Bottom, Orientation = Orientation.Horizontal, SpeedRatio = 0.18d, PixelsToAnimate = 360 };
        }
Пример #16
0
        private void OnInformation(string error)
        {
            var manager = new RadDesktopAlertManager(AlertScreenPosition.TopCenter);

            var alert = new RadDesktopAlert
            {
                FlowDirection = FlowDirection.RightToLeft,
                Header        = "اطلاعات",
                Content       = error,
                ShowDuration  = 2000,
            };

            manager.ShowAlert(alert);
        }
Пример #17
0
        //Перевірка події - День народження працівника
        private void BirthDayCheck()
        {
            SqlConnection conn = new SqlConnection {
                ConnectionString = connection
            };

            //Відкриваємо з'єднання
            conn.Open();

            //виведення працівника, в якого День народження
            SqlCommand query =
                new SqlCommand("SELECT Surname + ' ' + Name + ' ' + MiddleName FROM Workers WHERE DATEPART" +
                               "(d, BirthDate) = DATEPART(d, GETDATE()) AND DATEPART(m, BirthDate) = DATEPART(m, GETDATE())",
                               conn);
            //Виконання запиту
            object result = query.ExecuteScalar();

            //обичслення віку працівника
            SqlCommand queryAge = new SqlCommand("SELECT DATEDIFF(YY, [BirthDate], GETDATE()) AS [AGE] FROM Workers",
                                                 conn);
            //Виконання запиту
            object age = queryAge.ExecuteScalar();

            //якщо сьогодні немає іменин у працівників
            if (query.ExecuteScalar() == null)
            {
                //Показ повідомлення
                var nonbirthdayAlert = new RadDesktopAlert();
                nonbirthdayAlert.Header       = "Повідомлення";
                nonbirthdayAlert.Content      = "Днів народжень у працівників сьогодні немає.";
                nonbirthdayAlert.ShowDuration = 10000;

                RadDesktopAlertManager manager2 = new RadDesktopAlertManager();
                manager2.ShowAlert(nonbirthdayAlert);
            }
            //якщо у працівника є день народження
            else if (query.ExecuteScalar() != null && queryAge.ExecuteScalar() != null)
            {
                //Показ повідомлення
                var birthdayAlert = new RadDesktopAlert();
                birthdayAlert.Header  = "День народження!";
                birthdayAlert.Content = "Працівник " + result + " сьогодні святкує свій День народження!" + " (" + age +
                                        " років)";
                birthdayAlert.ShowDuration = 10000;

                RadDesktopAlertManager manager = new RadDesktopAlertManager();
                manager.ShowAlert(birthdayAlert);
            }
        }
Пример #18
0
        private void GLs_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
        {
            if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add)
            {
                int.TryParse(SystemAccountingSettingModel.GLLength, out int SystemAccountingSettingModelGLLength);
                long z = 1;
                long r = 0;
                for (int i = 1; i <= SystemAccountingSettingModelGLLength; i++)
                {
                    r += z * 9;
                    z *= 10;
                }
                if (!_uow.GLs.Any())
                {
                    LastGLCode = 1;
                }
                else
                {
                    LastGLCode = _uow.GLs.Select(x => x.GLCode).Max() + 1;
                }
                if (LastGLCode == 1)
                {
                    var stringLastGLCode = LastGLCode.ToString();
                    var lastGLsCode      = stringLastGLCode.ToString().PadRight(SystemAccountingSettingModelGLLength, '0');
                    ((GL)e.NewItems[0]).GLCode = int.Parse(lastGLsCode);
                    LastGLCode++;
                    // LastGLCode = _uow.GLs.Select(x => x.GLCode).Max() + 1;
                }
                else if (LastGLCode > 1 && LastGLCode <= r)
                {
                    ((GL)e.NewItems[0]).GLCode = LastGLCode;
                    LastGLCode = _uow.GLs.Select(x => x.GLCode).Max() + 1;
                }
                else
                {
                    var manager = new RadDesktopAlertManager(AlertScreenPosition.TopCenter, new Point(0, 0), 100);

                    var alert = new RadDesktopAlert
                    {
                        FlowDirection = FlowDirection.RightToLeft,
                        Header        = "اطلاعات",
                        Content       = ".شماره گذاری حساب گروه به پایان رسیده است",
                        ShowDuration  = 1000,
                    };
                    manager.ShowAlert(alert);
                }
                GLCodeEmptyValue = LastGLCode;
            }
        }
Пример #19
0
        public void btnClickMe(object sender, RoutedEventArgs e)
        {
            var alert = new RadDesktopAlert();
            alert.Header = "NEW EMAIL";
            alert.Content = "Hello, Here are the resources to the Q2 DevTools Webinar.";
            alert.ShowDuration = 5000;

            //Add Icon from Theme
            alert.Icon = new Image { Source = Application.Current.FindResource("DesktopAlertIcon") as ImageSource, Width = 48, Height = 48 };
            alert.IconColumnWidth = 75;
            alert.IconMargin = new Thickness(0, 0, 10, 10);

            RadDesktopAlertManager manager = new RadDesktopAlertManager();
            manager.ShowAlert(alert);
        }
        private void SLDataForm_DeletedItem(object sender, Telerik.Windows.Controls.Data.DataForm.ItemDeletedEventArgs e)
        {
            if (_dialogResult == true)
            {
                var manager = new RadDesktopAlertManager(AlertScreenPosition.TopCenter, new Point(0, 0), 100);

                var alert = new RadDesktopAlert
                {
                    FlowDirection = FlowDirection.RightToLeft,
                    Header        = "اطلاعات",
                    Content       = ".حذف با موفقیت انجام شد",
                    ShowDuration  = 5000,
                };
                manager.ShowAlert(alert);
            }
        }
Пример #21
0
        //Перевірка події - закінчення випр. терміну
        private void TermCheck()
        {
            SqlConnection conn = new SqlConnection {
                ConnectionString = connection
            };

            //Відкриваємо з'єднання
            conn.Open();
            //запит, який виводить працівників, в яких завершується випробовувальний термін
            SqlCommand queryProbationExpiry =
                new SqlCommand(
                    "SELECT ' (' + CONVERT(VARCHAR(10),con.Probation) + ') в працівника '+ wk.Surname + ' ' + wk.Name + ' ' + wk.MiddleName " +
                    "FROM  Workers wk join Contract con on con.ID=wk.ID " +
                    "WHERE DATEPART( Week, DATEADD( Year, DATEPART( Year, GETDATE()) - " +
                    "DATEPART( Year, con.Probation), con.Probation))= DATEPART( Week, GETDATE());", conn);

            //Виконання запиту
            object resultExpiry = queryProbationExpiry.ExecuteScalar();

            //якщо цього тижня в жодного з працівників не закінчується випробовувальний термін
            if (queryProbationExpiry.ExecuteScalar() == null)
            {
                //Показ повідомлення
                var nonbirthdayAlert = new RadDesktopAlert();
                nonbirthdayAlert.Header  = "Повідомлення";
                nonbirthdayAlert.Content =
                    "Протягом цього тижня випробовувальний термін не закінчується в жодного з працівників";
                nonbirthdayAlert.ShowDuration = 10000;

                RadDesktopAlertManager manager2 = new RadDesktopAlertManager();
                manager2.ShowAlert(nonbirthdayAlert);
            }
            //якщо у працівника найближчим часом завершується випробовувальний термін
            else if (queryProbationExpiry.ExecuteScalar() != null)
            {
                //Показ повідомлення
                var birthdayAlert = new RadDesktopAlert();
                birthdayAlert.Header  = "Завершення випробовувального терміну!";
                birthdayAlert.Content = "Протягом цього тижня " + resultExpiry +
                                        " завершується випробовувальний термін!";
                birthdayAlert.ShowDuration = 10000;

                RadDesktopAlertManager manager = new RadDesktopAlertManager();
                manager.ShowAlert(birthdayAlert);
            }
        }
Пример #22
0
 public static void authorizerole(Window window, string[] roles)
 {
     if (roles.Contains(loggedinuserd.role))
     {
         window.Show();
     }
     else
     {
         RadDesktopAlertManager manager = new RadDesktopAlertManager();
         var alert = new RadDesktopAlert();
         alert.Header       = "Alert";
         alert.Content      = "This page can only accessed by " + String.Join(",", roles);
         alert.ShowDuration = 5000;
         System.Media.SystemSounds.Hand.Play();
         manager.ShowAlert(alert);
     }
 }
Пример #23
0
        private async void OnOpenDevice(object obj)
        {
            if (!IsOpen)
            {
                var result = await _hcdzClient.DeviceOpen(0);

                if (result)
                {
                    BtnIsEnabled   = true;
                    OpenDeviceText = "关闭设备";
                    IsOpen         = true;
                    DeviceDesc     = await _hcdzClient.InitDeviceInfo(0);
                }
                else
                {
                    RadDesktopAlertManager desktop = new RadDesktopAlertManager(AlertScreenPosition.BottomCenter);

                    desktop.ShowAlert(new RadDesktopAlert()
                    {
                        Content = "设备连接失败!"
                    });
                }
            }
            else
            {
                var flag = await _hcdzClient.DeviceClose(0);

                if (flag)
                {
                    OpenDeviceText = "连接设备";
                    IsOpen         = false;
                    DeviceDesc     = string.Empty;
                }
                else
                {
                    RadDesktopAlertManager desktop = new RadDesktopAlertManager(AlertScreenPosition.BottomCenter);

                    desktop.ShowAlert(new RadDesktopAlert()
                    {
                        Content = "设备断开失败!"
                    });
                }
                CloseDMAChannel();
            }
        }
        private void StcDocumentHeaderDataForm_DeletedItem(object sender, Telerik.Windows.Controls.Data.DataForm.ItemDeletedEventArgs e)
        {
            var r = _viewModel.DeleteDocumentHeader((StcDocumentHeader)e.DeletedItem);

            if (r > 0)
            {
                var manager = new RadDesktopAlertManager(AlertScreenPosition.TopCenter, new Point(0, 0), 100);

                var alert = new RadDesktopAlert
                {
                    FlowDirection = FlowDirection.RightToLeft,
                    Header        = "اطلاعات",
                    Content       = ".حذف با موفقیت انجام شد",
                    ShowDuration  = 5000,
                };
                manager.ShowAlert(alert);
            }
        }
Пример #25
0
        public static Boolean initdatabase()
        {
            RadDesktopAlertManager alertmanager = new RadDesktopAlertManager();
            var r = loaddatabseconnectionfile();

            if (!r)
            {
                var alert = new RadDesktopAlert();
                alert.Header       = "Database Configuration File Error";
                alert.Content      = "Please update " + System.AppDomain.CurrentDomain.BaseDirectory + "/data/databaseconnection.json";
                alert.ShowDuration = 10000;
                System.Media.SystemSounds.Hand.Play();
                alertmanager.ShowAlert(alert);
                return(false);
            }

            var r1 = checkdatabaseserverconnection();

            if (!r1)
            {
                var alert = new RadDesktopAlert();
                alert.Header       = "Database server not running";
                alert.Content      = "Please update " + System.AppDomain.CurrentDomain.BaseDirectory + "/data/databaseconnection.json";
                alert.ShowDuration = 10000;
                System.Media.SystemSounds.Hand.Play();
                alertmanager.ShowAlert(alert);
                return(false);
            }

            var r2 = checkdatabase();

            if (!r2)
            {
                var alert = new RadDesktopAlert();
                alert.Header       = "Database " + databaseconnection.database + " does not exists.";
                alert.Content      = "Trying to create database. Please restart software";
                alert.ShowDuration = 10000;
                System.Media.SystemSounds.Hand.Play();
                alertmanager.ShowAlert(alert);
                createdatabase();
                return(false);
            }
            return(true);
        }
Пример #26
0
        private void AlertPositioning()
        {
            Manager?.CloseAllAlerts();

            var workingArea = SystemParameters.WorkArea;

            if (_window.WindowState != WindowState.Maximized)
            {
                Manager = new RadDesktopAlertManager(AlertScreenPosition.BottomRight, new Point(
                                                         -(_window.Left + _window.Width + workingArea.Width - 2 * (_window.Left + _window.Width)),
                                                         -(_window.Top + _window.Height + workingArea.Height - 2 * (_window.Top + _window.Height))));
            }
            else
            {
                var rect = GetWindowRectangle();

                Manager = new RadDesktopAlertManager(AlertScreenPosition.BottomRight, new Point(rect.Right - workingArea.BottomRight.X, 0));
            }
        }
        private void PermanentButton_Click(object sender, RoutedEventArgs e)
        {
            if (ValidateDocumetHeader())
            {
                //  StcDocumentHeader.Status = StatusEnum.Permanent;
                CommitAndBeginEdit();
                RaiseCanExecuteChanged();

                var manager = new RadDesktopAlertManager(AlertScreenPosition.TopCenter);

                var alert = new RadDesktopAlert
                {
                    FlowDirection = FlowDirection.RightToLeft,
                    Header        = "اطلاعات",
                    Content       = ".صند قطعی شد",
                    ShowDuration  = 2000,
                };
                manager.ShowAlert(alert);
            }
        }
        private void SaveButton_Click(object sender, RoutedEventArgs e)
        {
            if (ValidateProductModel())
            {
                RaiseCanExecuteChanged();
                NavStateTrue();
                CommitAndBeginEdit();

                var manager = new RadDesktopAlertManager(AlertScreenPosition.TopCenter);

                var alert = new RadDesktopAlert
                {
                    FlowDirection = FlowDirection.RightToLeft,
                    Header        = "اطلاعات",
                    Content       = "اطلاعات با موفقیت ثبت شد",
                    ShowDuration  = 2000,
                };
                manager.ShowAlert(alert);
            }// _viewModel.SaveCommand
        }
        private void BackFromEndButton_Click(object sender, RoutedEventArgs e)
        {
            if (ValidateDocumetHeader())
            {
                //  StcDocumentHeader.Status = StatusEnum.Temporary;
                CommitAndBeginEdit();
                isModified = true;
                RaiseCanExecuteChanged();

                var manager = new RadDesktopAlertManager(AlertScreenPosition.TopCenter);

                var alert = new RadDesktopAlert
                {
                    FlowDirection = FlowDirection.RightToLeft,
                    Header        = "اطلاعات",
                    Content       = ". برگشت از خاتمه انجام شد",
                    ShowDuration  = 2000,
                };
                manager.ShowAlert(alert);
            }
        }
Пример #30
0
        private void DeleteButton_Click(object sender, RoutedEventArgs e)
        {
            if (_accessUtility.HasAccess(66))
            {
                ObservableCollection <object> tLDocHeaders = RadGridView1.SelectedItems;
                if (tLDocHeaders.Count > 0)
                {
                    Deleting();
                    if (_dialogResult == true)
                    {
                        var list = RadGridView1.SelectedItems;
                        _viewModel.DeleteTLDocumentHeader((tLDocHeaders));
                        _viewModel.LoadTLDocumentHeaders();
                        var manager = new RadDesktopAlertManager(AlertScreenPosition.TopCenter);

                        var alert = new RadDesktopAlert
                        {
                            FlowDirection = FlowDirection.RightToLeft,
                            Header        = "اطلاعات",
                            Content       = ".حذف با موفقیت انجام شد",
                            ShowDuration  = 1200,
                        };
                        manager.ShowAlert(alert);
                    }
                    else
                    {
                        var manager = new RadDesktopAlertManager(AlertScreenPosition.TopCenter);

                        var alert = new RadDesktopAlert
                        {
                            FlowDirection = FlowDirection.RightToLeft,
                            Header        = "اطلاعات",
                            Content       = "سند برای حذف وجود ندارد.",
                            ShowDuration  = 1200,
                        };
                        manager.ShowAlert(alert);
                    }
                }
            }
        }
        public static async void changeaccount(dynamic obj)
        {
            try
            {
                softwaresettingrepo ssr = new softwaresettingrepo();
                var ravicosoftuser      = ssr.getbyname(commonsettingfields.ravicosoftuserid);
                if (ravicosoftuser == null)
                {
                    return;
                }
                var apiendpoint = apiendpointdefault;
                if (userutils.apiendpoint != null)
                {
                    apiendpoint = userutils.apiendpoint.stringvalue;
                }
                RestClient client  = new RestClient(apiendpoint);
                var        request = new RestRequest("changeaccount");
                obj.userid = ravicosoftuser.stringvalue;
                request.AddJsonBody(obj);
                var response = await client.PostAsync <apiresponsetype>(request);

                if (response.status == "success")
                {
                    var user = Newtonsoft.Json.JsonConvert.DeserializeObject <apiresponseuserclass>(response.data);
                    userutils.updateusersetting(user);
                    RadDesktopAlertManager manager = new RadDesktopAlertManager();
                    var alert = new RadDesktopAlert();
                    alert.Header       = "Information";
                    alert.Content      = "User account changed. Please restart software to apply update";
                    alert.ShowDuration = 5000;
                    System.Media.SystemSounds.Hand.Play();
                    manager.ShowAlert(alert);
                }
            }
            catch (Exception ex)
            {
            }
        }
        private Boolean checksystemdate()
        {
            RadDesktopAlertManager manager = new RadDesktopAlertManager();
            var currentdate   = DateTime.Now;
            var lastsaveddate = Settings.Default.lastsavedate;

            if (currentdate < lastsaveddate)
            {
                var alert = new RadDesktopAlert();
                alert.Header       = "Business Book Alert";
                alert.Content      = "Please correct your system date first";
                alert.ShowDuration = 30000;
                System.Media.SystemSounds.Hand.Play();
                manager.ShowAlert(alert);
                return(false);
            }
            else
            {
                Settings.Default.lastsavedate = DateTime.Now;
                Settings.Default.Save();
                return(true);
            }
        }
Пример #33
0
        public void importa()
        {
            try
            {
                OpenFileDialog openfile = new OpenFileDialog();
                openfile.DefaultExt = ".xlsx";
                openfile.Filter     = "(.xlsx)|*.xlsx";
                //openfile.ShowDialog();

                var browsefile = openfile.ShowDialog();

                if (browsefile == true)
                {
                    txtFilePath.Text = openfile.FileName;

                    Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.Application();
                    //Static File From Base Path...........
                    //Microsoft.Office.Interop.Excel.Workbook excelBook = excelApp.Workbooks.Open(AppDomain.CurrentDomain.BaseDirectory + "TestExcel.xlsx", 0, true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0);
                    //Dynamic File Using Uploader...........
                    Microsoft.Office.Interop.Excel.Workbook  excelBook  = excelApp.Workbooks.Open(txtFilePath.Text.ToString(), 0, true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0);
                    Microsoft.Office.Interop.Excel.Worksheet excelSheet = (Microsoft.Office.Interop.Excel.Worksheet)excelBook.Worksheets.get_Item(1);;
                    Microsoft.Office.Interop.Excel.Range     excelRange = excelSheet.UsedRange;

                    string strCellData = "";
                    double douCellData;
                    int    rowCnt = 0;
                    int    colCnt = 0;

                    DataTable dt = new DataTable();
                    for (colCnt = 1; colCnt <= excelRange.Columns.Count; colCnt++)
                    {
                        string strColumn = "";
                        strColumn = (string)(excelRange.Cells[1, colCnt] as Microsoft.Office.Interop.Excel.Range).Value2;
                        dt.Columns.Add(strColumn, typeof(string));
                    }

                    for (rowCnt = 2; rowCnt <= excelRange.Rows.Count; rowCnt++)
                    {
                        string strData = "";
                        for (colCnt = 1; colCnt <= excelRange.Columns.Count; colCnt++)
                        {
                            try
                            {
                                strCellData = (string)(excelRange.Cells[rowCnt, colCnt] as Microsoft.Office.Interop.Excel.Range).Value2;
                                strData    += strCellData + "|";
                            }
                            catch (Exception ex)
                            {
                                douCellData = (excelRange.Cells[rowCnt, colCnt] as Microsoft.Office.Interop.Excel.Range).Value2;
                                strData    += douCellData.ToString() + "|";
                            }
                        }
                        strData = strData.Remove(strData.Length - 1, 1);
                        dt.Rows.Add(strData.Split('|'));
                    }

                    gvData.ItemsSource = dt;

                    excelBook.Close(true, null, null);
                    excelApp.Quit();

                    var alert = new RadDesktopAlert();
                    alert.Header       = "NOTIFICACIÓN";
                    alert.Content      = "El archivo se cargó exitosamente.";
                    alert.ShowDuration = 3000;
                    RadDesktopAlertManager manager = new RadDesktopAlertManager();
                    manager.ShowAlert(alert);
                }
                else
                {
                    btGuardar.Visibility  = Visibility.Hidden;
                    btCancelar.Visibility = Visibility.Hidden;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error");
            }
        }
Пример #34
0
        private async void ScanForUpdates()
        {
            var alertManager = new RadDesktopAlertManager();

            var changesSince = GreatestDateTime((DateTime.Now - TimeSpan.FromHours(24)), _reportsSettings.LastUpdatesScan);
            var projectKeys = _reportsSettings.SelectedProjectsList.Split(',').Select(p => p.Trim());
            try
            {
                var query = string.Format("updated >= '{0}'", changesSince.ToString("yyyy-MM-dd HH:mm"));
                if (projectKeys.Any())
                    query += string.Format(" AND project IN ({0})", string.Join(",", projectKeys));

                var updatedIssues = await _jiraApi.SearchForIssues(query);
                foreach (var issue in updatedIssues.Where(i => i.BuiltInFields.Updated >= _reportsSettings.LastUpdatesScan))
                {
                    var openIssueCommand = new RelayCommand(() =>
                    {
                        var i = issue;
                        Process.Start(string.Format("{0}/browse/{1}", _jiraApi.Server.ServerUri, i.Key));
                    });

                    if (issue.Created >= changesSince && _reportsSettings.ShowCreatedIssues)
                    {
                        if (_reportsSettings.SkipOwnChanges && issue.BuiltInFields.Reporter.Name == _jiraSession.Profile.Name)
                            continue;

                        alertManager.ShowAlert(new RadDesktopAlert
                        {
                            Header = string.Format("New issue: {0}", issue.Key),
                            Content = issue.Summary,
                            ShowDuration = 5000,
                            Icon = new Image { Source = GetImageFromResources("/Assets/Avatars/PlusSign.png"), Width = 48, Height = 48 },
                            IconColumnWidth = 48,
                            Command = openIssueCommand
                        });
                    }
                    else if (issue.Created < changesSince && _reportsSettings.ShowUpdatedIssues)
                    {
                        var changes = issue.Changelog.Where(ch => ch.Created >= changesSince
                                                                && !(_reportsSettings.SkipOwnChanges
                                                                && ch.Author.Name == _jiraSession.Profile.Name));

                        changes = changes.Concat(issue.BuiltInFields.Comments.Comments.Where(c => c.Updated >= changesSince
                                                                && !(_reportsSettings.SkipOwnChanges
                                                                && c.UpdateAuthor.Name == _jiraSession.Profile.Name))
                                                                .Select(c => new RawChangesHistory
                                                                {
                                                                    Author = c.UpdateAuthor,
                                                                    Created = c.Updated,
                                                                    Items = new[]
                                                                    {
                                                                        new RawChangelogItem
                                                                        {
                                                                            Field = "Comment",
                                                                            Fieldtype = "string",
                                                                            From = "",
                                                                            FromString = "",
                                                                            To = c.Body,
                                                                            toString = c.Body
                                                                        }
                                                                    }
                                                                }));

                        if (changes.Any() == false)
                            continue;

                        _messenger.Send(new IssueUpdatedMessage(issue, changes.SelectMany(c => c.Items), changes.First().Created, changes.First().Author));

                        var rawChangeSummary = new Dictionary<string, string>();

                        foreach (var change in changes)
                        {
                            foreach (var item in change.Items)
                            {
                                rawChangeSummary[item.Field] = item.toString;
                            }
                        }

                        var changeSummaryBuilder = new StringBuilder();
                        foreach (var changeSummary in rawChangeSummary)
                        {
                            var newValue = changeSummary.Value ?? "(None)";
                            changeSummaryBuilder.AppendFormat("{0}: {1}\n", changeSummary.Key, newValue);
                        }

                        alertManager.ShowAlert(new RadDesktopAlert
                        {
                            Header = string.Format("[{0}] {1}", issue.Key, issue.Summary),
                            Content = changeSummaryBuilder.ToString(),
                            ShowDuration = 5000,
                            Icon = new Image { Source = GetImageFromResources("/Assets/Avatars/EditSign.png"), Width = 48, Height = 48 },
                            IconColumnWidth = 48,
                            Command = openIssueCommand
                        });
                    }
                }
                _reportsSettings.LastUpdatesScan = DateTime.Now;
            }
            catch (SearchFailedException e)
            {
                _logger.Log(LogLevel.Warn, "Failed to retrieve updated issues.", e);
                alertManager.ShowAlert(new RadDesktopAlert
                {
                    Header = "Invalid configuration",
                    Content = "Please verify that you provided correct list of project keys",
                    ShowDuration = 2000
                });
            }
        }
Пример #35
0
        private void RadButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                Datos     datos       = new DAL.Datos();
                DataTable dt          = datos.ObtenerAñosPOM(Convert.ToDecimal(lblPOM.Content)).Tables[0];
                decimal   FechaInicio = 0;
                decimal   FechaFin    = 0;
                string    sNombre     = "";

                foreach (DataRow row in dt.Rows)
                {
                    sNombre     = row["Nombre"].ToString();
                    FechaInicio = Convert.ToDecimal(row["Fecha_Inicio"]);
                    FechaFin    = Convert.ToDecimal(row["Fecha_Fin"]);
                }


                IList lista = lstScripts.SelectedItems;



                //INSERTA SI NO EXISTE EJECUTOR CALENDARIZADO
                DataTable dtEjecutor = datos.VerificaEjecutorCalendarizado(Convert.ToDecimal(lblTitulo.Content), sNombre).Tables[0];
                if (dtEjecutor.Rows.Count != 0)
                {
                    //ACTUALIZA EJECUTOR
                    foreach (ListBoxItem item in lstScripts.SelectedItems)
                    {
                        var valor = item.Content.ToString();

                        if (valor == "Script 1")
                        {
                            datos.CalendarizarEjecutor1(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 2")
                        {
                            datos.CalendarizarEjecutor2(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 3")
                        {
                            datos.CalendarizarEjecutor3(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 4")
                        {
                            datos.CalendarizarEjecutor4(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 5")
                        {
                            datos.CalendarizarEjecutor5(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 6")
                        {
                            datos.CalendarizarEjecutor6(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 7")
                        {
                            datos.CalendarizarEjecutor7(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 8")
                        {
                            datos.CalendarizarEjecutor8(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 9")
                        {
                            datos.CalendarizarEjecutor9(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 10")
                        {
                            datos.CalendarizarEjecutor10(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 11")
                        {
                            datos.CalendarizarEjecutor11(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 12")
                        {
                            datos.CalendarizarEjecutor12(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 13")
                        {
                            datos.CalendarizarEjecutor13(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 14")
                        {
                            datos.CalendarizarEjecutor14(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 15")
                        {
                            datos.CalendarizarEjecutor15(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 16")
                        {
                            datos.CalendarizarEjecutor16(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 17")
                        {
                            datos.CalendarizarEjecutor17(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }

                        if (valor == "Politicas de pago")
                        {
                            //Politicas de Pago
                            datos.CalendarizarPolitica180(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                            datos.CalendarizarPolitica120(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                            datos.CalendarizarPolitica90(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                            datos.CalendarizarPolitica60(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                            datos.CalendarizarPolitica45(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                            datos.CalendarizarPolitica2030(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }

                        if (valor == "Script 18")
                        {
                            datos.CalendarizarEjecutor18(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 19")
                        {
                            datos.CalendarizarEjecutor19(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 20")
                        {
                            datos.CalendarizarEjecutor20(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 21")
                        {
                            datos.CalendarizarEjecutor21(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 22")
                        {
                            datos.CalendarizarEjecutor22(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 23")
                        {
                            datos.CalendarizarEjecutor23(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 24")
                        {
                            datos.CalendarizarEjecutor24(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 25")
                        {
                            datos.CalendarizarEjecutor25(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 26")
                        {
                            datos.CalendarizarEjecutor26(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                    }
                }
                else
                {
                    //INSERTA EJECUTOR
                    datos.CalendarizarEjecutor(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);

                    foreach (ListBoxItem item in lstScripts.SelectedItems)
                    {
                        var valor = item.Content.ToString();

                        if (valor == "Script 1")
                        {
                            datos.CalendarizarEjecutor1(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 2")
                        {
                            datos.CalendarizarEjecutor2(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 3")
                        {
                            datos.CalendarizarEjecutor3(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 4")
                        {
                            datos.CalendarizarEjecutor4(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 5")
                        {
                            datos.CalendarizarEjecutor5(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 6")
                        {
                            datos.CalendarizarEjecutor6(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 7")
                        {
                            datos.CalendarizarEjecutor7(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 8")
                        {
                            datos.CalendarizarEjecutor8(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 9")
                        {
                            datos.CalendarizarEjecutor9(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 10")
                        {
                            datos.CalendarizarEjecutor10(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 11")
                        {
                            datos.CalendarizarEjecutor11(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 12")
                        {
                            datos.CalendarizarEjecutor12(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 13")
                        {
                            datos.CalendarizarEjecutor13(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 14")
                        {
                            datos.CalendarizarEjecutor14(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 15")
                        {
                            datos.CalendarizarEjecutor15(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 16")
                        {
                            datos.CalendarizarEjecutor16(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 17")
                        {
                            datos.CalendarizarEjecutor17(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }

                        if (valor == "Politicas de pago")
                        {
                            //Politicas de Pago
                            datos.CalendarizarPolitica180(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                            datos.CalendarizarPolitica120(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                            datos.CalendarizarPolitica90(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                            datos.CalendarizarPolitica60(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                            datos.CalendarizarPolitica45(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                            datos.CalendarizarPolitica2030(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }

                        if (valor == "Script 18")
                        {
                            datos.CalendarizarEjecutor18(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 19")
                        {
                            datos.CalendarizarEjecutor19(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 20")
                        {
                            datos.CalendarizarEjecutor20(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 21")
                        {
                            datos.CalendarizarEjecutor21(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 22")
                        {
                            datos.CalendarizarEjecutor22(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 23")
                        {
                            datos.CalendarizarEjecutor23(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 24")
                        {
                            datos.CalendarizarEjecutor24(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 25")
                        {
                            datos.CalendarizarEjecutor25(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                        if (valor == "Script 26")
                        {
                            datos.CalendarizarEjecutor26(Convert.ToDecimal(lblTitulo.Content), Convert.ToDecimal(lblPOM.Content), FechaInicio, FechaFin, sNombre);
                        }
                    }
                }


                this.Close();
                var alert = new RadDesktopAlert();
                alert.Header  = "NOTIFICACIÓN";
                alert.Content = "El Ejecutor se calendarizó.";
                RadDesktopAlertManager manager = new RadDesktopAlertManager();
                manager.ShowAlert(alert);
            }
            catch (Exception ex)
            {
                var alert = new RadDesktopAlert();
                alert.Header  = "NOTIFICACIÓN";
                alert.Content = ex.Message;
                RadDesktopAlertManager manager = new RadDesktopAlertManager();
                manager.ShowAlert(alert);
            }
        }