Esempio n. 1
0
        } // saveSessionData(View)

        private DataRow _getSessionViewRow( DataTable SessionViewTable, object Name, CswEnumNbtSessionDataType DataType, bool IncludeInQuickLaunch, bool KeepInQuickLaunch )
        {
            DataRow SessionViewRow = null;
            if( SessionViewTable.Rows.Count > 0 )
            {
                SessionViewRow = SessionViewTable.Rows[0];
            }
            else
            {
                SessionViewRow = SessionViewTable.NewRow();
                SessionViewTable.Rows.Add( SessionViewRow );
            }

            SessionViewRow[SessionDataColumn_Name] = CswConvert.ToString( Name );
            SessionViewRow[SessionDataColumn_SessionId] = SessionId;
            SessionViewRow[SessionDataColumn_SessionDataType] = DataType.ToString();
            if( CswConvert.ToBoolean( SessionViewRow[SessionDataColumn_QuickLaunch] ) == false )
            {
                // Only set false to true, not true to false.  See case 23999.
                SessionViewRow[SessionDataColumn_QuickLaunch] = CswConvert.ToDbVal( IncludeInQuickLaunch );
            }
            SessionViewRow[SessionDataColumn_KeepInQuickLaunch] = CswConvert.ToDbVal( KeepInQuickLaunch );

            return SessionViewRow;
        } // _getSessionViewRow()
Esempio n. 2
0
        } // getQuickLaunchJson()

        private void _addQuickLaunchProp( DataRow Row, ViewSelect.Response.Category Category )
        {
            Int32 ItemId = CswConvert.ToInt32( Row[SessionDataColumn_PrimaryKey] );

            CswEnumNbtSessionDataType SessionType = CswConvert.ToString( Row[SessionDataColumn_SessionDataType] );
            string Name = Row[SessionDataColumn_Name].ToString();
            CswNbtSessionDataId SessionDataId = new CswNbtSessionDataId( ItemId );

            if( SessionType == CswEnumNbtSessionDataType.Action )
            {
                Int32 ActionId = CswConvert.ToInt32( Row[SessionDataColumn_ActionId] );
                CswNbtAction Action = _CswNbtResources.Actions[ActionId];
                _addQuickLaunchAction( Category, Name, SessionDataId, Action );
            }
            else if( SessionType == CswEnumNbtSessionDataType.View )
            {
                //Int32 ViewId = CswConvert.ToInt32( Row[SessionDataColumn_ViewId] );
                _addQuickLaunchView( Category, Name, SessionDataId, Row[SessionDataColumn_ViewMode].ToString() );
            }
            else if( SessionType == CswEnumNbtSessionDataType.Search )
            {
                _addQuickLaunchSearch( Category, Name, SessionDataId );
            }
        } // _addQuickLaunchProp()