Exemple #1
0
        private void SetupDMAttachments()
        {
            string sSQL    = @"select ISNULL((select isnull(USE_DM_ON_PORTAL,0) from system_ctrl), 0)";
            object oUSE_DM = Connection.SQLExecutor.ExecuteScalar(sSQL, Connection.WebConnection);

            if (oUSE_DM == null || oUSE_DM == DBNull.Value)
            {
                oUSE_DM = false;
            }
            _USE_DM = Convert.ToBoolean(oUSE_DM);
            if (_USE_DM)
            {
                if (FileMgr != null)
                {
                    try { FileMgr.Dispose(); }
                    catch { }
                    FileMgr = null;
                }
                FileMgr        = new DM_CentralizedFSManager.ucFileManager(Connection, DevXMgr, DM_CentralizedFSManager.DocumentViewerMode.All, true, "F");
                FileMgr.Dock   = DockStyle.Fill;
                FileMgr.Parent = tpAttachments;
                FileMgr.BringToFront();

                FileLinks = new DM_CentralizedFSManager.FileLink[1];
            }
            else
            {
                if (CFS_FileMgr != null)
                {
                    try { CFS_FileMgr.Dispose(); }
                    catch { }
                    CFS_FileMgr = null;
                }
                CFS_FileMgr = new WO_CentralizedFSManager.ucFileManager(Connection, DevXMgr,
                                                                        WO_CentralizedFSManager.DocumentViewerMode.All, RelType, -1, true, "Work Flow Approval");
                CFS_FileMgr.Dock   = DockStyle.Fill;
                CFS_FileMgr.Parent = tpAttachments;
                CFS_FileMgr.BringToFront();
            }
        }
Exemple #2
0
        private void InitializeFileManager()
        {
            string sSQL    = @"select ISNULL((select isnull(USE_DM_ON_PORTAL,0) from system_ctrl), 0)";
            object oUSE_DM = Connection.SQLExecutor.ExecuteScalar(sSQL, Connection.WebConnection);

            if (oUSE_DM == null || oUSE_DM == DBNull.Value)
            {
                oUSE_DM = false;
            }
            _USE_DM = Convert.ToBoolean(oUSE_DM);
            if (_USE_DM)
            {
                if (_ucFileManager != null)
                {
                    try { _ucFileManager.Dispose(); }
                    catch { }
                    _ucFileManager = null;
                }
                _ucFileManager = new DM_CentralizedFSManager.ucFileManager(Connection, DevXMgr, DM_CentralizedFSManager.DocumentViewerMode.All, true, "F");
                _ucFileManager.DocumentFileLink = GetFileLinks(-1);
                _ucFileManager.ReadOnly         = true;
                _ucFileManager.Dock             = DockStyle.Fill;
                _ucFileManager.Parent           = xtabAttachments;
                _ucFileManager.BringToFront();
            }
            else
            {
                if (CFS_FileMgr != null)
                {
                    try { CFS_FileMgr.Dispose(); }
                    catch { }
                    CFS_FileMgr = null;
                }
                CFS_FileMgr = new WO_CentralizedFSManager.ucFileManager(Connection, DevXMgr,
                                                                        WO_CentralizedFSManager.DocumentViewerMode.All, RelType, -1, true, "PO");
                CFS_FileMgr.Dock   = DockStyle.Fill;
                CFS_FileMgr.Parent = xtabAttachments;
                CFS_FileMgr.BringToFront();
            }
        }