Exemplo n.º 1
0
        private void InitializeFileManager()
        {
            string sSQL    = @"select ISNULL((select isnull(USE_DM_ON_PORTAL,0) from system_ctrl), 0)";
            object oUSE_DM = _HMCon.SQLExecutor.ExecuteScalar(sSQL, _HMCon.WebConnection);

            if (oUSE_DM == null || oUSE_DM == DBNull.Value)
            {
                oUSE_DM = false;
            }
            _USE_DM = Convert.ToBoolean(oUSE_DM);
            if (_USE_DM)
            {
                if (_ucFileManager != null)
                {
                    _ucFileManager = null;
                }
                _ucFileManager = new DM_CentralizedFSManager.ucFileManager(_HMCon, _TUC, DM_CentralizedFSManager.DocumentViewerMode.All, true, "F");
                _ucFileManager.DocumentFileLink = GetFileLinks(-1);
                _ucFileManager.ReadOnly         = true;
                _ucFileManager.Dock             = DockStyle.Fill;
                _ucFileManager.Parent           = xtabAttachments;
            }
            else
            {
                if (CFS_FileMgr != null)
                {
                    CFS_FileMgr = null;
                }
                CFS_FileMgr = new WO_CentralizedFSManager.ucFileManager(_HMCon, _TUC,
                                                                        WO_CentralizedFSManager.DocumentViewerMode.All, RelType, -1, true, "Work Flow Approval");
                CFS_FileMgr.Dock   = DockStyle.Fill;
                CFS_FileMgr.Parent = xtabAttachments;
            }
        }
Exemplo n.º 2
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();
            }
        }
Exemplo n.º 3
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, RelTypePO, -1, false, "PO");
                CFS_FileMgr.Dock   = DockStyle.Fill;
                CFS_FileMgr.Parent = xtabAttachments;
                CFS_FileMgr.BringToFront();
            }
        }