示例#1
0
 public void OnNavigatedTo(NavigationContext navigationContext)
 {
     menu = new RTIWorkCodeView();
     menu.SaveButton.Command   = saveCommand;
     menu.DeleteButton.Command = deleteCommand;
     ribbonService.AddRibbonItem(menu, true);
 }
示例#2
0
        public void OnNavigatedTo(NavigationContext navigationContext)
        {
            int hash = int.Parse(navigationContext.Parameters["DataToDisplay"].ToString());

            dataToDisplay        = (object)AppParameters.Request(hash);
            reportPath           = navigationContext.Parameters["ReportPath"].ToString();
            parameters           = (ReportParameter[])navigationContext.Parameters["Parameters"];
            reportDataSourceName = navigationContext.Parameters["ReportDataSourceName"].ToString();

            if (!_isReportViewerLoaded)
            {
                Microsoft.Reporting.WinForms.ReportDataSource reportDataSource = new
                                                                                 Microsoft.Reporting.WinForms.ReportDataSource();

                reportDataSource.Name = reportDataSourceName;

                reportDataSource.Value = DataToDisplay;
                this.ReportViewerControl.LocalReport.DataSources.Add(reportDataSource);
                this.ReportViewerControl.LocalReport.ReportPath = ReportPath;

                if (parameters != null)
                {
                    this.ReportViewerControl.LocalReport.SetParameters(parameters);
                }
                ReportViewerControl.RefreshReport();
                _isReportViewerLoaded = true;
            }

            menu = new RTIReportWindow();
            menu.PrintButton.Command = printCommand;
            ribbonService.AddRibbonItem(menu, true);
        }
示例#3
0
        public void OnNavigatedTo(NavigationContext navigationContext)
        {
            menu = new RTIMainView();
            menu.AboutButton.Command = aboutCommand;

            ribbonService.AddRibbonItem(menu, true);
        }
 public void OnNavigatedTo(NavigationContext navigationContext)
 {
     menu = new RTITCDashboard();
     menu.AboutButton.Command = aboutCommand;
     navigationService        = navigationContext.NavigationService;
     ribbonService.AddRibbonItem(menu, true);
 }
        public void OnNavigatedTo(NavigationContext navigationContext)
        {
            menu = new RTIEmployeesView();
            menu.NewButton.Command    = newCommand;
            menu.DeleteButton.Command = deleteCommand;
            menu.EditButton.Command   = editCommand;

            ribbonService.AddRibbonItem(menu, true);
        }
示例#6
0
        public void OnNavigatedTo(NavigationContext navigationContext)
        {
            menu = new RTIEmployeeView();
            menu.SaveButton.Command = saveCommand;

            ribbonService.AddRibbonItem(menu, true);

            Mapper.CreateMap <Employee, BasicEmployeeVM>();
            if (navigationContext.Parameters["Id"] == null)
            {
                IsNew    = true;
                employee = new BasicEmployeeVM();
            }
            else
            {
                int id = 0;
                int.TryParse(navigationContext.Parameters["Id"].ToString(), out id);
                IsNew    = false;
                employee = Mapper.Map <Employee, BasicEmployeeVM>(employeeService.GetFiltered(a => a.Id == id).FirstOrDefault());
            }
        }