private void BindLogTypeDropDown()
 {
     LogController objLogController = new LogController();
     ArrayList arrLogTypes = objLogController.GetLogTypeInfo();
     arrLogTypes.Sort( new LogTypeSortFriendlyName() );
     ddlLogType.DataTextField = "LogTypeFriendlyName";
     ddlLogType.DataValueField = "LogTypeKey";
     ddlLogType.DataSource = arrLogTypes;
     ddlLogType.DataBind();
     ListItem ddlAllPortals = new ListItem( Localization.GetString( "All" ), "*" );
     ddlLogType.Items.Insert( 0, ddlAllPortals );
 }
        protected void Page_Init( Object sender, EventArgs e )
        {
            
            LogController l = new LogController();
            arrLogTypeInfo = l.GetLogTypeInfo();

            htLogTypeInfo = new Hashtable();

            int i;
            for( i = 0; i <= arrLogTypeInfo.Count - 1; i++ )
            {
                LogTypeInfo objLogTypeInfo = (LogTypeInfo)arrLogTypeInfo[i];
                htLogTypeInfo.Add( objLogTypeInfo.LogTypeKey, objLogTypeInfo );
            }

            string ColorCoding;
            ColorCoding = Convert.ToString( Personalization.GetProfile( "LogViewer", "ColorCoding" ) );
            if( ColorCoding == "0" )
            {
                ColorCodingOn = false;
            }
            else if( ColorCoding == "1" )
            {
                ColorCodingOn = true;
            }
            else
            {
                ColorCodingOn = true;
            }

            string ColorCodingLegend;
            ColorCodingLegend = Convert.ToString( Personalization.GetProfile( "LogViewer", "ColorCodingLegend" ) );
            if( ColorCodingLegend == "0" )
            {
                ColorCodingLegendOn = false;
            }
            else if( ColorCodingLegend == "1" )
            {
                ColorCodingLegendOn = true;
            }
            else
            {
                ColorCodingLegendOn = true;
            }
        }
        //tasks

        private void BindDetailData()
        {
            PortalController pc = new PortalController();
            ddlLogTypePortalID.DataTextField = "PortalName";
            ddlLogTypePortalID.DataValueField = "PortalID";
            ddlLogTypePortalID.DataSource = pc.GetPortals();
            ddlLogTypePortalID.DataBind();

            ListItem i = new ListItem();
            i.Text = Localization.GetString( "All" );
            i.Value = "*";
            ddlLogTypePortalID.Items.Insert( 0, i );

            pnlEditLogTypeConfigInfo.Visible = true;
            pnlLogTypeConfigInfo.Visible = false;
            LogController l = new LogController();

            ArrayList arrLogTypeInfo;
            arrLogTypeInfo = l.GetLogTypeInfo();

            arrLogTypeInfo.Sort( new LogTypeSortFriendlyName() );

            ddlLogTypeKey.DataTextField = "LogTypeFriendlyName";
            ddlLogTypeKey.DataValueField = "LogTypeKey";
            ddlLogTypeKey.DataSource = arrLogTypeInfo;
            ddlLogTypeKey.DataBind();

            int[] items = new int[] {1, 2, 3, 4, 5, 10, 25, 100, 250, 500};
            ddlKeepMostRecent.Items.Clear();
            ddlKeepMostRecent.Items.Add( new ListItem( Localization.GetString( "All" ), "*" ) );
            foreach( int item in items )
            {
                if( item == 1 )
                {
                    ddlKeepMostRecent.Items.Add( new ListItem( item + Localization.GetString( "LogEntry", this.LocalResourceFile ), item.ToString() ) );
                }
                else
                {
                    ddlKeepMostRecent.Items.Add( new ListItem( item + Localization.GetString( "LogEntries", this.LocalResourceFile ), item.ToString() ) );
                }
            }

            int[] items2 = new int[] {1, 2, 3, 4, 5, 10, 25, 100, 250, 500, 1000};
            ddlThreshold.Items.Clear();
            foreach( int item in items2 )
            {
                if( item == 1 )
                {
                    ddlThreshold.Items.Add( new ListItem( item + Localization.GetString( "Occurance", this.LocalResourceFile ), item.ToString() ) );
                }
                else
                {
                    ddlThreshold.Items.Add( new ListItem( item + Localization.GetString( "Occurances", this.LocalResourceFile ), item.ToString() ) );
                }
            }

            ListItem j = new ListItem();
            j.Text = Localization.GetString( "All" );
            j.Value = "*";
            ddlLogTypeKey.Items.Insert( 0, j );
        }