تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[VB.NET] مشكلة حيرتنى فى شروط if المشروع مرفق
#6
جرب بهذه الطريقة
كود البحث
PHP كود :
   Private Function FindItem(ItemList As ListView.ListViewItemCollectionColumnIndex As IntegerSearchString As String) As Dictionary(Of IntegerBoolean)
 
       For Each Item As ListViewItem In ItemList
            If Item
.SubItems(ColumnIndex).Text SearchString Then
                Return 
New Dictionary(Of IntegerBooleanFrom {{Item.IndexTrue}}
 
           End If
 
       Next
        Return 
New Dictionary(Of IntegerBooleanFrom {{0False}}
 
   End Function 

حلقة الدوران مع الشرط

PHP كود :
       For Each itm As ListViewItem In listView1.Items
            If Not String
.IsNullOrEmpty(itm.SubItems(1).TextThen
                Dim Found 
As Dictionary(Of IntegerBoolean) = FindItem(ListView2.Items0itm.SubItems(1).Text)
 
               If Found.ContainsValue(TrueThen
                    itm
.SubItems(5).Text "No"
 
                   'رقم الاندكس تحصل عليه هنا
                    '
Found.Keys.ElementAt(0)
 
               Else
                    itm
.SubItems(3).Text ""
 
                   itm.SubItems(4).Text ""
 
                   itm.SubItems(5).Text "Yes"
 
                   itm.BackColor Color.DarkSlateBlue
                    itm
.ForeColor Color.DarkRed
                End 
If
 
           End If
 
       Next 


الملفات المرفقة صورة/صور
   
اللهم لك الحمد كما ينبغي لجلال وجهك و عظيم سلطانك
في حل و ترحال
الرد }}}
تم الشكر بواسطة: الماجيك مسعد , الماجيك مسعد


الردود في هذا الموضوع
RE: مشكلة حيرتنى فى شروط if المشروع مرفق - بواسطة ابو ليلى - 14-07-17, 03:50 AM


التنقل السريع :


يقوم بقرائة الموضوع: