Exemple #1
0
        public bool FlushSendBuffer()
        {
            try
            {
                if (currentBufferIndex > 0)
                {
                    PushCurrentBuffer();
                }

                if (!Env.IsMono)
                {
                    socket.Send(cmdBuffer);             //Optimized for Windows
                }
                else
                {
                    //Sendling IList<ArraySegment> Throws 'Message to Large' SocketException in Mono
                    foreach (var segment in cmdBuffer)
                    {
                        var buffer = segment.Array;
                        socket.Send(buffer, segment.Offset, segment.Count, SocketFlags.None);
                    }
                }
                ResetSendBuffer();
            }
            catch (SocketException ex)
            {
                cmdBuffer.Clear();
                return(HandleSocketException(ex));
            }
            return(true);
        }
Exemple #2
0
 public override void Close()
 {
     foreach (object @object in allResults)
     {
         Net.Vpc.Upa.Impl.Util.UPAUtils.Close(@object);
     }
     allResults.Clear();
 }
Exemple #3
0
        public void TestSyncMessage()
        {
            messages.Clear();

            LogDelegator.GetLocateDelegate()("file name");
            LogDelegator.GetLogDelegate()(Log.LV_DEBUG, "test message 1");
            LogDelegator.GetLogDelegate()(Log.LV_WARNING, "test message 2");

            System.Console.WriteLine(messages[0].Message);
        }
Exemple #4
0
 public virtual void Update()
 {
     System.Collections.Generic.ISet <string> visited = new System.Collections.Generic.HashSet <string>();
     persistSequenceGeneratorFields.Clear();
     updateSequenceGeneratorFields.Clear();
     insertExpressions.Clear();
     updateExpressions.Clear();
     System.Collections.Generic.IList <Net.Vpc.Upa.Field> fields1 = entity.GetFields();
     foreach (Net.Vpc.Upa.Field field in fields1)
     {
         visited.Remove(field.GetName());
         Net.Vpc.Upa.Impl.Persistence.FieldPersistenceInfo fieldPersistenceInfo = Net.Vpc.Upa.Impl.FwkConvertUtils.GetMapValue <string, Net.Vpc.Upa.Impl.Persistence.FieldPersistenceInfo>(fields, field.GetName());
         if (fieldPersistenceInfo == null)
         {
             fieldPersistenceInfo    = new Net.Vpc.Upa.Impl.Persistence.FieldPersistenceInfo();
             fields[field.GetName()] = fieldPersistenceInfo;
         }
         fieldPersistenceInfo.field            = field;
         fieldPersistenceInfo.persistenceStore = persistenceStore;
         fieldPersistenceInfo.Synchronize();
         if (fieldPersistenceInfo.persistFieldPersister != null)
         {
             persistSequenceGeneratorFields.Add(fieldPersistenceInfo);
         }
         if (fieldPersistenceInfo.updateFieldPersister != null)
         {
             updateSequenceGeneratorFields.Add(fieldPersistenceInfo);
         }
         if (fieldPersistenceInfo.insertExpression != null)
         {
             insertExpressions.Add(fieldPersistenceInfo);
         }
         if (fieldPersistenceInfo.updateExpression != null)
         {
             updateExpressions.Add(fieldPersistenceInfo);
         }
         if (field.GetDataType() is Net.Vpc.Upa.Types.ManyToOneType)
         {
             ((Net.Vpc.Upa.Impl.AbstractField)field).SetFieldPersister(new Net.Vpc.Upa.Impl.EntityTypeFieldPersister());
         }
         else if (Net.Vpc.Upa.Impl.Util.UPAUtils.IsPasswordTransform(Net.Vpc.Upa.Impl.Util.UPAUtils.GetTypeTransformOrIdentity(field)))
         {
             ((Net.Vpc.Upa.Impl.AbstractField)field).SetFieldPersister(new Net.Vpc.Upa.Impl.Transform.PasswordTypeFieldPersister());
         }
         else
         {
             ((Net.Vpc.Upa.Impl.AbstractField)field).SetFieldPersister(new Net.Vpc.Upa.Impl.SimpleFieldPersister());
         }
     }
     foreach (string r in visited)
     {
         fields.Remove(r);
     }
 }
Exemple #5
0
        /// <summary>
        /// 获取图片广告路径
        /// </summary>
        /// <returns></returns>
        private string GetAdvPath()
        {
            string strPath = string.Empty;

            System.Collections.Generic.IList <EyouSoft.Model.AdvStructure.AdvInfo> AdvListBanner = EyouSoft.BLL.AdvStructure.Adv.CreateInstance().GetAdvs(CityId, EyouSoft.Model.AdvStructure.AdvPosition.供求信息频道通栏banner);
            if (AdvListBanner != null && AdvListBanner.Count > 0)
            {
                strPath = Utils.GetImgOrFalash(AdvListBanner[0].ImgPath, AdvListBanner[0].RedirectURL);// string.Format("<a target=\"_blank\" title=\"{3}\" href=\"{0}\"><img src=\"{1}\" alt=\"{2}\" width=\"970\" height=\"70\"></a>", AdvListBanner[0].RedirectURL, Domain.FileSystem + AdvListBanner[0].ImgPath, AdvListBanner[0].Title, AdvListBanner[0].Title);
            }
            if (AdvListBanner != null)
            {
                AdvListBanner.Clear();
            }
            AdvListBanner = null;
            return(strPath);
        }
        public virtual bool CommitStructure() /* throws Net.Vpc.Upa.Exceptions.UPAException */
        {
            Net.Vpc.Upa.Persistence.EntityExecutionContext context = ((Net.Vpc.Upa.Impl.DefaultPersistenceUnit)persistenceUnit).CreateContext(Net.Vpc.Upa.Persistence.ContextOperation.CREATE_PERSISTENCE_NAME, null);
            Net.Vpc.Upa.Impl.FwkConvertUtils.ListSort(storage, structureCommitComparator);
            bool someCommit = false;

            foreach (Net.Vpc.Upa.Impl.Persistence.StructureCommit next in storage)
            {
                if (next.Commit(context))
                {
                    someCommit = true;
                }
            }
            storage.Clear();
            return(someCommit);
        }
 public virtual void Close() /* throws Net.Vpc.Upa.Exceptions.UPAException */
 {
     log.TraceEvent(System.Diagnostics.TraceEventType.Verbose, 60, Net.Vpc.Upa.Impl.FwkConvertUtils.LogMessageExceptionFormatter("PersistenceGroup {0} Closing", null, GetName()));
     lock (sessions) {
         foreach (Net.Vpc.Upa.Session next in sessions)
         {
             next.Close();
         }
         sessions.Clear();
     }
     lock (persistenceUnits) {
         foreach (Net.Vpc.Upa.PersistenceUnit persistenceUnit in (persistenceUnits).Values)
         {
             persistenceUnit.Close();
         }
         persistenceUnits.Clear();
     }
     closed = true;
     log.TraceEvent(System.Diagnostics.TraceEventType.Verbose, 60, Net.Vpc.Upa.Impl.FwkConvertUtils.LogMessageExceptionFormatter("PersistenceGroup {0} Closed", null, GetName()));
 }
Exemple #8
0
 /** Generate ParseException. */
 public ParseException GenerateParseException()
 {
     cc_expentries.Clear();
     bool[] la1tokens = new bool[9];
     if (cc_kind >= 0)
     {
         la1tokens[cc_kind] = true;
         cc_kind            = -1;
     }
     for (int i = 0; i < 0; i++)
     {
         if (cc_la1[i] == cc_gen)
         {
             for (int j = 0; j < 32; j++)
             {
                 if ((cc_la1_0[i] & (1 << j)) != 0)
                 {
                     la1tokens[j] = true;
                 }
             }
         }
     }
     for (int i = 0; i < 9; i++)
     {
         if (la1tokens[i])
         {
             cc_expentry    = new int[1];
             cc_expentry[0] = i;
             cc_expentries.Add(cc_expentry);
         }
     }
     int[][] exptokseq = new int[cc_expentries.Count][];
     for (int i = 0; i < cc_expentries.Count; i++)
     {
         exptokseq[i] = cc_expentries[i];
     }
     return(new ParseException(token, exptokseq, TokenImage));
 }
Exemple #9
0
        static void Main(string[] args)
        {
            List <double> lst = new List <double>();


            System.Collections.Generic.IList <double> ilst = lst;

            Console.WriteLine(ilst.Remove(2));
            ilst.RemoveAt(0);


            ilst.Add(1);

            Console.WriteLine(ilst.Remove(1));
            Console.WriteLine(ilst.Remove(3));
            ilst.RemoveAt(0);
            ilst.RemoveAt(2);


            ilst.Clear();



            ilst.Add(1);
            ilst.Add(2);
            ilst.Add(3);

            Console.WriteLine(ilst.Remove(1));
            Console.WriteLine(ilst.Remove(3));
            ilst.RemoveAt(0);
            ilst.RemoveAt(2);

            ilst.RemoveAt(0);



            Console.ReadLine();
        }
        void Update_SEN0188_NotifyChangeState(IPropertySet Outputpropertys)
        {
            bool   doactFilledFingerLib = false;
            bool   doactFilledSensorId  = false;
            Object Valout;
            Int16  state = -1;

            if (Outputpropertys.TryGetValue("FingerPrint.CMDState", out Valout))
            {
                if (Valout != null)
                {
                    state = (Int16)Valout;
                }
            }

            if (Outputpropertys.TryGetValue("FingerPrint.CMD", out Valout))
            {
                if (Valout != null)
                {
                    Int32 CMD = (Int32)Valout;

                    if (CMD == Connector_SEN0188_CMDs.getFingerPrintCmd("_doFingerSensorInitialize"))
                    {
                        if (state == 0)
                        {
                            doactFilledFingerLib            = true;
                            doactFilledSensorId             = true;
                            m_Environment.SensorInitialized = true;
                        }
                    }
                    else if (CMD == Connector_SEN0188_CMDs.getFingerPrintCmd("_doFingerRegistration") || CMD == Connector_SEN0188_CMDs.getFingerPrintCmd("_doFingerAutoRegistration"))
                    {
                        if (Outputpropertys.TryGetValue("FingerPrint.RegististrationState", out Valout))
                        {
                            if (Valout != null)
                            {
                                Int32 regState = (Int32)Valout;
                                if (regState >= 5)
                                {
                                    if (Outputpropertys.TryGetValue("FingerPrint.Registration_FingerID", out Valout))
                                    {
                                        UInt16 PageId = (UInt16)Valout;
                                        if (state == 0)
                                        {
                                            if (Outputpropertys.TryGetValue("FingerPrint.CHARUpLoad", out Valout))
                                            {
                                                if (Valout != null)
                                                {
                                                    byte[] array = Valout as byte[];
                                                    if (array != null)
                                                    {
                                                        DBDataSet dataset = m_SEN0188SQLite.getDatabyId(PageId);
                                                        if (dataset != null)
                                                        {
                                                            dataset.FingerTemplate = array;

                                                            if (SensorIDValue.Text.Length > 0)
                                                            {
                                                                dataset.SensorId = System.Text.Encoding.UTF8.GetBytes(SensorIDValue.Text);
                                                            }


                                                            this.m_SEN0188SQLite.UpdateFingerTemplateDataSet(dataset);
                                                            DataSets.SelectedItem = dataset;
                                                            doactFilledFingerLib  = true;
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }

                    else if (CMD == Connector_SEN0188_CMDs.getFingerPrintCmd("_doFingerDeleteId"))
                    {
                        if (state == 0)
                        {
                            doactFilledFingerLib = true;
                        }
                    }
                    else if (CMD == Connector_SEN0188_CMDs.getFingerPrintCmd("_doFingerAutoVerifiying"))
                    {
                        if (state == 0)
                        {
                            if (Outputpropertys.TryGetValue("FingerPrint.FingerID", out Valout))
                            {
                                if (Valout != null)
                                {
                                    UInt16 fingerId = (UInt16)Valout;
                                    if (Outputpropertys.TryGetValue("FingerPrint.Search_MatchScore", out Valout))
                                    {
                                        UInt16    MatchScore = (UInt16)Valout;
                                        DBDataSet dataset    = m_SEN0188SQLite.getDatabyId(fingerId);
                                        if (dataset != null)
                                        {
                                            if (MatchScore > dataset.MatchScore)
                                            {
                                                dataset.MatchScore = MatchScore;
                                                this.m_SEN0188SQLite.UpdateMatchScoreDataSet(dataset);
                                            }
                                            DataSets.SelectedItem = dataset;
                                        }
                                        else
                                        {
                                            DataSets.SelectedItem = null;
                                        }
                                    }
                                }
                            }
                        }
                    }
                    else if (CMD == Connector_SEN0188_CMDs.getFingerPrintCmd("_doFingerCharDownLoad"))
                    {
                        if (state == 0)
                        { // dowwload succesfull
                            if (Outputpropertys.TryGetValue("FingerPrint.Registration_FingerID", out Valout))
                            {
                                UInt16 FingerId = (UInt16)Valout;
                                if (state == 0)
                                {
                                    DBDataSet dataset = m_SEN0188SQLite.getDatabyId(FingerId);
                                    if (dataset != null)
                                    {
                                        DataSets.SelectedItem = dataset;
                                        doactFilledFingerLib  = true;
                                    }
                                    else
                                    {
                                        DataSets.SelectedItem = null;
                                    }
                                }
                            }
                        }
                    }
                    else if (CMD == Connector_SEN0188_CMDs.getFingerPrintCmd("_doFingerWriteSensorID"))// write Sensor-ID
                    {
                        if (state == 0)
                        { // dowwload succesfull
                            doactFilledSensorId = true;
                        }
                    }
                }
            }



            if (doactFilledSensorId)
            {
                //   m_SensorId.Clear();
                if (Outputpropertys.TryGetValue("FingerPrint.SensorID", out Valout))
                {
                    if (Valout != null)
                    {
                        byte[] array = Valout as byte[];
                        if (array != null)
                        {
                            /*
                             * for (uint i = 0; i < array.Length; i++)
                             * {
                             *  m_SensorId.Add(array[i]);
                             * }
                             */
                            SensorIDValue.Text = System.Text.Encoding.UTF8.GetString(array, 0, array.Length);
                        }
                    }
                }
            }

            if (doactFilledFingerLib)
            {
                m_FilledFingerLib.Clear();
                if (Outputpropertys.TryGetValue("FingerPrint.FilledFingerLib", out Valout))
                {
                    if (Valout != null)
                    {
                        UInt32[] array = Valout as UInt32[];
                        if (array != null)
                        {
                            for (uint i = 0; i < array.Length; i++)
                            {
                                m_FilledFingerLib.Add(array[i]);
                            }
                        }
                    }
                }
            }

            if (Outputpropertys.TryGetValue("FingerPrint.CMDTextState", out Valout))
            {
                String cmd = Valout as String;
                if (cmd != null)
                {
                    SensorCmdState.Text = cmd;
                }
            }
        }
Exemple #11
0
 public virtual Net.Vpc.Upa.Expressions.GroupCriteria Clear()
 {
     fields.Clear();
     return(this);
 }
Exemple #12
0
        /// <summary>
        /// Main layout method
        /// </summary>
        /// <param name="width">Width to calculate the layout with</param>
        /// <param name="axis">0 for horizontal axis, 1 for vertical</param>
        /// <param name="layoutInput">If true, sets the layout input for the axis. If false, sets child position for axis</param>
        public float SetLayout(float width, int axis, bool layoutInput)
        {
            var groupHeight = rectTransform.rect.height;

            // Width that is available after padding is subtracted
            var workingWidth = rectTransform.rect.width - padding.left - padding.right;

            // Accumulates the total height of the rows, including spacing and padding.
            var yOffset = IsLowerAlign ? (float)padding.bottom : (float)padding.top;

            var currentRowWidth  = 0f;
            var currentRowHeight = 0f;

            for (var i = 0; i < rectChildren.Count; i++)
            {
                // LowerAlign works from back to front
                var index = IsLowerAlign ? rectChildren.Count - 1 - i : i;

                var child = rectChildren[index];

                var childWidth  = LayoutUtility.GetPreferredSize(child, 0);
                var childHeight = LayoutUtility.GetPreferredSize(child, 1);

                var childFlexibleWidth = LayoutUtility.GetFlexibleSize(child, 0);
                if (childFlexibleWidth > 0f)
                {
                    childWidth = workingWidth;
                }

                // Max child width is layout group with - padding
                childWidth = Mathf.Min(childWidth, workingWidth);

                // If adding this element would exceed the bounds of the row,
                // go to a new line after processing the current row
                if (currentRowWidth + childWidth > workingWidth)
                {
                    currentRowWidth -= Spacing;

                    // Process current row elements positioning
                    if (!layoutInput)
                    {
                        var h = CalculateRowVerticalOffset(groupHeight, yOffset, currentRowHeight);
                        LayoutRow(_rowList, currentRowWidth, currentRowHeight, workingWidth, padding.left, h, axis);
                    }

                    // Clear existing row
                    _rowList.Clear();

                    // Add the current row height to total height accumulator, and reset to 0 for the next row
                    yOffset += currentRowHeight;
                    yOffset += Spacing;

                    currentRowHeight = 0;
                    currentRowWidth  = 0;
                }

                currentRowWidth += childWidth;
                _rowList.Add(child);

                // We need the largest element height to determine the starting position of the next line
                if (childHeight > currentRowHeight)
                {
                    currentRowHeight = childHeight;
                }

                currentRowWidth += Spacing;
            }

            if (!layoutInput)
            {
                var h = CalculateRowVerticalOffset(groupHeight, yOffset, currentRowHeight);

                // Layout the final row
                LayoutRow(_rowList, currentRowWidth, currentRowHeight, workingWidth, padding.left, h, axis);
            }

            _rowList.Clear();

            // Add the last rows height to the height accumulator
            yOffset += currentRowHeight;
            yOffset += IsLowerAlign ? padding.top : padding.bottom;

            if (layoutInput)
            {
                if (axis == 1)
                {
                    SetLayoutInputForAxis(yOffset, yOffset, -1, axis);
                }
            }

            return(yOffset);
        }
Exemple #13
0
 public virtual Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledSelect RemoveAllFields()
 {
     Invalidate();
     fields.Clear();
     return(this);
 }
Exemple #14
0
 public virtual Net.Vpc.Upa.Expressions.Select ClearFields()
 {
     fields.Clear();
     return(this);
 }
 protected internal virtual void ProtectedClear()
 {
     expressions.Clear();
 }
Exemple #16
0
        // Build flyout completely in C#
        // Need complex logic for bookmarks, and mixing XAML+C# is a big pain
        private void LibraryItemFlyout_Opening(object sender, object e)
        {
            MenuFlyout flyout = (MenuFlyout)sender;

            System.Collections.Generic.IList <MenuFlyoutItemBase> items = flyout.Items;

            items.Clear();

            MenuFlyoutItem copyItem = new MenuFlyoutItem()
            {
                Icon = new SymbolIcon(Symbol.Copy),
                Text = "Copy URL"
            };

            copyItem.Click += CopyURLMenuItem_Click;
            items.Add(copyItem);

            MenuFlyoutItem showInfoItem = new MenuFlyoutItem()
            {
                Icon = new SymbolIcon(Symbol.Zoom),
                Text = "Show Info"
            };

            showInfoItem.Click += ShowItemInfo;
            items.Add(showInfoItem);

            MenuFlyoutItem deleteMenuItem = new MenuFlyoutItem()
            {
                Icon = new SymbolIcon(Symbol.Delete),
                Text = "Delete"
            };

            deleteMenuItem.Click += DeleteMenuItem_Click;
            items.Add(deleteMenuItem);

            items.Add(new MenuFlyoutSeparator());

            LibraryItem item = GetSelectedLibraryItem();

            if (item == null)
            {
                flyout.Items.Add(new MenuFlyoutItem()
                {
                    IsEnabled = false, Text = "Error: selected library item null"
                });
                return;
            }

            if (!item.Bookmarks.Any())
            {
                flyout.Items.Add(new MenuFlyoutItem()
                {
                    IsEnabled = false, Text = "No bookmarks yet"
                });
                return;
            }

            System.Collections.Generic.List <Bookmark> orderedBookmarks = item.Bookmarks.OrderBy(b => b.Position).ToList();
            // Put the first few bookmarks directly in the first menu, only spill to a submenu if there are lots of bookmarks
            System.Collections.Generic.List <Bookmark> firstFew = orderedBookmarks.Take(4).ToList();

            foreach (Bookmark bookmark in firstFew)
            {
                flyout.Items.Add(flyoutItem(item, bookmark));
            }

            if (orderedBookmarks.Count > firstFew.Count)
            {
                MenuFlyoutSubItem bookmarks = new MenuFlyoutSubItem()
                {
                    Icon = new SymbolIcon(Symbol.Bookmarks),
                    Text = $"All Bookmarks ({item.Bookmarks.Count})",
                };

                foreach (Bookmark bookmark in item.Bookmarks.OrderBy(b => b.Position))
                {
                    bookmarks.Items.Add(flyoutItem(item, bookmark));
                }
                flyout.Items.Add(bookmarks);
            }

            MenuFlyoutItem flyoutItem(LibraryItem item, Bookmark bookmark)
            {
                MenuFlyoutItem bookmarkItem = new MenuFlyoutItem()
                {
                    Icon = new FontIcon {
                        FontFamily = new FontFamily("Segoe UI Emoji"), Glyph = bookmark.Emoji ?? "🎵"
                    },
                    Text = bookmark.Position.ToString(@"hh\:mm\:ss")
                };

                bookmarkItem.Click += async(s, e) => { await ViewModel.PlayBookmark(item, bookmark); };
                return(bookmarkItem);
            }
        }
Exemple #17
0
 public void clear()
 {
     _list.Clear();
 }
Exemple #18
0
 public virtual void RemoveAll()
 {
     elements.Clear();
 }
Exemple #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Supplier site = (Supplier)this.Master;

            if (site != null)
            {
                site.MenuIndex = 2;
            }
            if (!IsPostBack)
            {
                #region 景点新闻
                Viewpoint.TopNumber  = 7;
                Viewpoint.TopicArea  = EyouSoft.Model.CommunityStructure.TopicAreas.景区新闻;
                Viewpoint.TopicClass = EyouSoft.Model.CommunityStructure.TopicClass.行业资讯;
                #endregion

                #region 旅行社新闻
                Travel.TopNumber  = 7;
                Travel.TopicArea  = EyouSoft.Model.CommunityStructure.TopicAreas.旅行社;
                Travel.TopicClass = EyouSoft.Model.CommunityStructure.TopicClass.行业资讯;
                #endregion

                #region 酒店新闻
                Hotel.TopicArea  = EyouSoft.Model.CommunityStructure.TopicAreas.酒店新闻;
                Hotel.TopNumber  = 7;
                Hotel.TopicClass = EyouSoft.Model.CommunityStructure.TopicClass.行业资讯;
                #endregion

                #region 政策解读
                Policy.TopicArea  = EyouSoft.Model.CommunityStructure.TopicAreas.政策解读;
                Policy.TopNumber  = 8;
                Policy.TopicClass = EyouSoft.Model.CommunityStructure.TopicClass.行业资讯;
                #endregion

                #region 成功故事
                Success.TopicArea  = EyouSoft.Model.CommunityStructure.TopicAreas.成功故事;
                Success.TopNumber  = 10;
                Success.TopicClass = EyouSoft.Model.CommunityStructure.TopicClass.行业资讯;
                #endregion

                #region 绑定新闻,资讯列表
                EyouSoft.IBLL.CommunityStructure.IInfoArticle         IBll  = EyouSoft.BLL.CommunityStructure.InfoArticle.CreateInstance();
                EyouSoft.Model.CommunityStructure.InfoArticle         model = null;
                IList <EyouSoft.Model.CommunityStructure.InfoArticle> list  = null;

                #region 绑定新闻
                model = new EyouSoft.Model.CommunityStructure.InfoArticle();
                model = IBll.GetHeadInfo(EyouSoft.Model.CommunityStructure.TopicClass.行业资讯, EyouSoft.Model.CommunityStructure.TopicAreas.新闻资讯);
                if (model != null)
                {
                    lbNews.Text        = string.Format("<a href='/SupplierInfo/ArticleInfo.aspx?Id={0}' title=\"{2}\">{1}</a>", model.ID, model.TitleColor.Length == 0 ? Utils.GetText(model.ArticleTitle, 22) : string.Format("<font color='{0}'>{1}</font>", model.TitleColor, Utils.GetText(model.ArticleTitle, 22)), model.ArticleTitle);
                    lbNewsContent.Text = Utils.GetText(StringValidate.LoseHtml(model.ArticleText), 75, true);
                    ltnews.Text        = string.Format("<a href=\"/SupplierInfo/ArticleInfo.aspx?Id={0}\"><span class=\"ff0000\">阅读全文>></span></a>", model.ID);
                }
                model = null;

                list = new List <EyouSoft.Model.CommunityStructure.InfoArticle>();
                list = IBll.GetTopNumList(12, EyouSoft.Model.CommunityStructure.TopicClass.行业资讯, EyouSoft.Model.CommunityStructure.TopicAreas.新闻资讯, null, string.Empty);
                rpNews.DataSource = list;
                rpNews.DataBind();
                list = null;
                #endregion

                #region 绑定资讯
                model = new EyouSoft.Model.CommunityStructure.InfoArticle();
                model = IBll.GetHeadInfo(EyouSoft.Model.CommunityStructure.TopicClass.行业资讯, EyouSoft.Model.CommunityStructure.TopicAreas.行业动态);
                if (model != null)
                {
                    lbInfo.Text        = string.Format("<a href='/SupplierInfo/ArticleInfo.aspx?Id={0}' title=\"{2}\">{1}</a>", model.ID, model.TitleColor.Length == 0 ? Utils.GetText(model.ArticleTitle, 22) : string.Format("<font color='{0}'>{1}</font>", model.TitleColor, Utils.GetText(model.ArticleTitle, 22)), model.ArticleTitle);
                    lbinfoContent.Text = Utils.GetText(StringValidate.LoseHtml(model.ArticleText), 70, true);
                    ltinfo.Text        = string.Format("<a href=\"/SupplierInfo/ArticleInfo.aspx?Id={0}\"><span class=\"ff0000\">阅读全文>></span></a>", model.ID);
                }
                model = null;

                list = new List <EyouSoft.Model.CommunityStructure.InfoArticle>();
                list = IBll.GetTopNumList(13, EyouSoft.Model.CommunityStructure.TopicClass.行业资讯, EyouSoft.Model.CommunityStructure.TopicAreas.行业动态, null, string.Empty);
                rpInfo.DataSource = list;
                rpInfo.DataBind();
                list = null;
                #endregion

                IBll = null;
                #endregion

                #region 最新行业资讯
                CommonTopic1.PartType   = UserPublicCenter.SupplierInfo.UserControl.CommonTopicControl.PartTypes.资讯;
                CommonTopic1.TopicType  = UserPublicCenter.SupplierInfo.UserControl.CommonTopicControl.TopicTypes.软文广告列表;
                CommonTopic1.TopicClass = EyouSoft.Model.CommunityStructure.TopicClass.行业资讯;
                //CommonTopic1.TopicArea = EyouSoft.Model.CommunityStructure.TopicAreas.行业动态;
                #endregion

                #region  业之星访谈
                CommonTopic2.PartType   = UserPublicCenter.SupplierInfo.UserControl.CommonTopicControl.PartTypes.业之星访谈;
                CommonTopic2.TopicType  = UserPublicCenter.SupplierInfo.UserControl.CommonTopicControl.TopicTypes.图文广告列表;
                CommonTopic2.TopicArea  = EyouSoft.Model.CommunityStructure.TopicAreas.业之星;
                CommonTopic2.TopicClass = EyouSoft.Model.CommunityStructure.TopicClass.行业资讯;
                CommonTopic2.CurrCityId = CityId;
                //CommonTopic2.TopicClass = null;
                //CommonTopic2.TopicArea = null;
                #endregion

                #region  业学堂
                CommonTopic3.PartType  = UserPublicCenter.SupplierInfo.UserControl.CommonTopicControl.PartTypes.业学堂;
                CommonTopic3.TopicType = UserPublicCenter.SupplierInfo.UserControl.CommonTopicControl.TopicTypes.软文广告列表;
                #endregion

                #region 图片新闻
                CommonTopic4.PartType   = UserPublicCenter.SupplierInfo.UserControl.CommonTopicControl.PartTypes.资讯;
                CommonTopic4.TopicType  = UserPublicCenter.SupplierInfo.UserControl.CommonTopicControl.TopicTypes.图文广告列表;
                CommonTopic4.TopicClass = EyouSoft.Model.CommunityStructure.TopicClass.行业资讯;
                #endregion

                #region 旗帜广告

                System.Collections.Generic.IList <EyouSoft.Model.AdvStructure.AdvInfo> AdvListBanner = EyouSoft.BLL.AdvStructure.Adv.CreateInstance().GetAdvs(CityId, EyouSoft.Model.AdvStructure.AdvPosition.供求信息频道行业资讯旗帜广告);
                if (AdvListBanner != null && AdvListBanner.Count > 0)
                {
                    ltrAdv.Text = string.Format("<a target=\"_blank\" title=\"{3}\" href=\"{0}\"><img src=\"{1}\" alt=\"{2}\" width=\"250\" height=\"85\"></a>", AdvListBanner[0].RedirectURL, Domain.FileSystem + AdvListBanner[0].ImgPath, AdvListBanner[0].Title, AdvListBanner[0].Title);
                }
                if (AdvListBanner != null)
                {
                    AdvListBanner.Clear();
                }
                AdvListBanner = null;

                #endregion
            }
        }
 public virtual void Clear()
 {
     _selectedList.Clear();
 }