public Form_SetReportServer()
        {
            InitializeComponent();

            this.Text = Utility.ErrorMsgs.ReportsCaption;
            _label_HeaderText.Text = Description;

            // load values
            m_ReportsRecord = new SQL.ReportsRecord();
            m_ReportsRecord.Read();

            textComputer.Text = m_ReportsRecord.reportServer;
            textFolder.Text   = m_ReportsRecord.reportFolder;

            //------------------------------------------------------
            // Make controls read only unless user has admin access
            //------------------------------------------------------
            if (!Program.gController.isAdmin)
            {
                textComputer.Enabled = false;
                textFolder.Enabled   = false;

                // change buttons
                _button_OK.Visible     = false;
                _button_Cancel.Text    = CloseText;
                _button_Cancel.Enabled = true;
                this.AcceptButton      = _button_Cancel;
            }
        }
예제 #2
0
        public void loadData()
        {
            bool installed;

            m_ReportsRecord = new SQL.ReportsRecord();
            m_ReportsRecord.Read();

            if (m_ReportsRecord.ReportsDeployed)
            {
                installed            = true;
                _label_Computer.Text = m_ReportsRecord.ReportServer;
                _label_Folder.Text   = m_ReportsRecord.TargetDirectory;
            }
            else
            {
                installed            = false;
                _label_Computer.Text = NotConfigured;
                _label_Folder.Text   = string.Empty;
            }

            _linkLabel_Launch.Enabled = installed && Program.gController.isViewer;
        }