示例#1
0
        void SelectReportGroupViewModel_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            switch (e.PropertyName)
            {
            case "SelectedReportGroup":
                if (selectedReportGroup != null)
                {
                    if (selectedReportGroup.AccessLevel >= ReportGroupAccessLevelType.ReadOnly)
                    {
                        if (!selectedReportGroup.IsJustAdded)
                        {
                            IsSubmittingContext = true;
                            IsRetreivingReports = true;
                            myContext.Load <Report>(myContext.GetAllReportsForReportGroupQuery(selectedReportGroup.Code), GetReportsForReportGroupCallback, null);
                        }

                        else
                        {
                            selectedReportGroup.IsJustAdded = false;
                            selectedReportGroup.IsRenaming  = true;
                        }
                    }
                }
                ViewReportCommand.UpdateCanExecuteCommand();
                EditReportCommand.UpdateCanExecuteCommand();
                break;

            case "SelectedReport":
                ViewReportCommand.UpdateCanExecuteCommand();
                EditReportCommand.UpdateCanExecuteCommand();
                DeleteReportCommand.UpdateCanExecuteCommand();
                PublishReportCommand.UpdateCanExecuteCommand();
                break;
            }
        }
示例#2
0
        void DeployReports()
        {
            String reportName = "*";
            String serverId   = serverConfigManager.AOSName;

            PublishReportCommand cmd = new PublishReportCommand();

            cmd.ReportName = new string[] { reportName };
            cmd.Id         = new string[] { serverId };

            XppLoggerAdapter logger = new XppLoggerAdapter();

            log("deploying reports");
            cmd.Process(logger);

            foreach (var logItem in logger.LogItems)
            {
                log(logItem.Message);
            }

            log("deploying finished");
        }