public void Export(string type)
 {
     if (type.ToLower() == "pdf")
     {
         ExportBtn.Click();
         Wait.MLSeconds(100);
         FileHandler.BerforeDownLoadNotification();
         driver.FindElement(By.LinkText("PDF")).Click();
         Wait.UntilDownloading();
         FileHandler.CheckIfPDFFileContainRecords(FileHandler.FindPDFFilePathForReport());
     }
     else if (type.ToLower() == "excel")
     {
         try
         {
             ExportBtn.Click();
         }
         catch (Exception)
         {
             ExcelOnly.FindElement(By.TagName("button")).Click();
         }
         FileHandler.BerforeDownLoadNotification();
         Wait.MLSeconds(100);
         driver.FindElement(By.LinkText("Excel")).Click();
         Wait.UntilDownloading();
         Wait.MLSeconds(200);
         FileHandler.CheckIfExcelFileContainRecords(FileHandler.FindExcelFilePathForReport());
     }
 }
示例#2
0
        public NewsPane()
        {
            InitializeComponent();

            Progress.Init(ExportBtn, MainGrid);

            From = DateTime.Today - TimeSpan.FromDays(7);
            To   = DateTime.Today + TimeSpan.FromDays(1);

            _entityRegistry = ConfigManager.GetService <IEntityRegistry>();

            ExportBtn.EnableType(ExportTypes.Bin, false);
        }
        public AllSecuritiesPane()
        {
            InitializeComponent();

            Progress.Init(ExportBtn, MainGrid);

            SecurityPicker.SecurityProvider = ConfigManager.TryGetService <FilterableSecurityProvider>();

            ExportBtn.EnableType(ExportTypes.Bin, false);

            MarketData.DataLoading += () => MarketDataBusyIndicator.IsBusy = true;
            MarketData.DataLoaded  += () => MarketDataBusyIndicator.IsBusy = false;
        }
示例#4
0
        public ClassesRegister()
        {
            InitializeComponent();
            ChooseClassLbl.Text = Res.PressClassLbl;
            FullNameLbl.Text    = Res.FullNameLbl;

            SaveBtn.SmallBtnSetStyle(Res.SaveBtn);
            ExportBtn.SmallBtnSetStyle(Res.ExportBtn);
            CloseBtn.SmallBtnSetStyle(Res.CloseBtn);

            TableFlow.Visible      = false;
            ChooseColumnCB.Enabled = false;
            ChooseColumnCB.Items.AddRange(AppConstants.columnsPupilList.ToArray());
        }
示例#5
0
        public TeachersRegistration()
        {
            InitializeComponent();
            ExportBtn.SmallBtnSetStyle(Res.ExportBtn);
            CloseBtn.SmallBtnSetStyle(Res.CloseBtn);
            SaveBtn.SmallBtnSetStyle(Res.SaveBtn);
            FullNameLbl.Text = Res.FullNameLbl;

            SaveBtn.Enabled   = false;
            ExportBtn.Enabled = true;

            Table.Visible = false;
            ColumnNameCB.Items.AddRange(AppConstants.columnsTeacherList.ToArray());
        }
        private void ExportBtn_OnExportStarted()
        {
            if (SecurityPicker.FilteredSecurities.Count == 0)
            {
                Progress.DoesntExist();
                return;
            }

            var path = ExportBtn.GetPath(null, typeof(Security), null, null, null, null);

            if (path == null)
            {
                return;
            }

            Progress.Start(null, typeof(Security), null, SecurityPicker.FilteredSecurities.ToEx(), path);
        }
示例#7
0
		private void ExportBtn_OnExportStarted()
		{
			var securities = SecurityPicker.FilteredSecurities;

			if (securities.Count == 0)
			{
				Progress.DoesntExist();
				return;
			}

			var path = ExportBtn.GetPath(null, typeof(SecurityMessage), null, null, null, null);

			if (path == null)
				return;

			Progress.Start(null, typeof(SecurityMessage), null, securities.Select(s => s.ToMessage()).ToEx(securities.Count), path);
		}
 public AdGroupPage Export()
 {
     Wait.MLSeconds(300);
     Wait.UntilLoading();
     Wait.UntilClickAble(ExportBtn);
     if (ExportBtn.Enabled)
     {
         FileHandler.BerforeDownLoadNotification();
         ExportBtn.Click();
         Wait.UntilDownloading();
         FileHandler.CheckIfExcelFileContainRecords(FileHandler.FindExcelFilePathForReport());
     }
     else
     {
         Assert.Fail("Export Btn is Disabled.");
     }
     return(this);
 }
示例#9
0
        private void ExportBtn_OnExportStarted()
        {
            var news = GetNews();

            if (news.Count == 0)
            {
                Progress.DoesntExist();
                return;
            }

            var path = ExportBtn.GetPath(null, typeof(News), null, From, To, null);

            if (path == null)
            {
                return;
            }

            Progress.Start(null, typeof(News), null, news, path);
        }
示例#10
0
        public void ExportToPDF()
        {
            ExportBtn.FindElement(By.TagName("button")).Click();
            Wait.MLSeconds(200);
            FileHandler.BerforeDownLoadNotification();
            ExportBtn.FindElement(By.LinkText("PDF")).Click();
            Wait.UntilDownloading();
            bool Result = FileHandler.CheckIfPDFFileContainRecords(FileHandler.FindPDFFilePathForReport());

            if (Result)
            {
                Logger.Log(LogingType.Error, "Excel Report verified successfully.");
            }
            else
            {
                Logger.Log(LogingType.Error, "Excel Report does't have any Records.");
                //this.CancelnewPage();
                throw new Exception();
            }
        }
        public PageViewerCommandBar()
        {
            this.InitializeComponent();

            _showSettings     = new Subject <Unit>();
            _scrollToTop      = new Subject <Unit>();
            _printPdf         = new Subject <Unit>();
            _edit             = new Subject <Unit>();
            _search           = new Subject <Unit>();
            _showHistory      = new Subject <Unit>();
            _toggleFullscreen = new Subject <Unit>();
            _import           = new Subject <Unit>();
            _export           = new Subject <Unit>();
            _navigateToPage   = new Subject <string>();

            this.WhenActivated(disposable =>
            {
                this.OneWayBind(ViewModel,
                                vm => vm.DevOptsEnabled,
                                view => view.DevOptBtn.Visibility)
                .DisposeWith(disposable);

                SettingsBtn.Events().Click
                .Select(x => Unit.Default)
                .Subscribe(x => { _showSettings.OnNext(x); }).DisposeWith(disposable);

                ToTopBtn.Events().Click
                .Select(x => Unit.Default)
                .Subscribe(x => { _scrollToTop.OnNext(x); }).DisposeWith(disposable);

                PdfBtn.Events().Click
                .Select(x => Unit.Default)
                .Subscribe(x => { _printPdf.OnNext(x); }).DisposeWith(disposable);

                SearchBtn.Events().Click
                .Select(x => Unit.Default)
                .Subscribe(x => { _search.OnNext(x); }).DisposeWith(disposable);

                HistoryBtn.Events().Click
                .Select(x => Unit.Default)
                .Subscribe(x => { _showHistory.OnNext(x); }).DisposeWith(disposable);

                FullscreenBtn.Events().Click
                .Select(x => Unit.Default)
                .Subscribe(x => { _toggleFullscreen.OnNext(x); }).DisposeWith(disposable);

                ImportBtn.Events().Click
                .Select(x => Unit.Default)
                .Subscribe(x => { _import.OnNext(x); }).DisposeWith(disposable);

                ExportBtn.Events().Click
                .Select(x => Unit.Default)
                .Subscribe(x => { _export.OnNext(x); }).DisposeWith(disposable);

                EditBtn.Events().Click
                .Select(_ => Unit.Default)
                .Subscribe(x => { _edit.OnNext(Unit.Default); }).DisposeWith(disposable);

                NewPageBtn.Events().Click
                .Select(_ => Unit.Default)
                .InvokeCommand(ViewModel.NewPageClick)
                .DisposeWith(disposable);

                DevOptBtn.Events().Click
                .Select(_ => Unit.Default)
                .InvokeCommand(ViewModel.DevOptionsClick)
                .DisposeWith(disposable);

                BindTextResources(disposable);

                ShowLastVisitedPages();
            });
        }