تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[VB.NET] سؤال : عن الدالة الشرطية if
#1
السلام عليكم ورحمة الله


استفسار عن الدالة الشرطية if  

هل اللي اكتبه صحيح او لا

مثلا

كود :
        If nema = "khalid" Xor nema = "ahmed" And Not IsNumeric(Exchange_r.Text) Then

ال nema مسحوب من قاعدة البيانات

اذا الطلب على اسمين  
هل صحيح الكود التالي


كود :
If nema = "khalid" Xor nema = "ahmed" And Not IsNumeric(Exchange_r.Text) Then

XOR

او

كود :
        If nema = "khalid" and nema = "ahmed" And Not IsNumeric(Exchange_r.Text) Then

AND

او


كود :
        If nema = "khalid" or  nema = "ahmed" And Not IsNumeric(Exchange_r.Text) Then

OR



والسؤال الثاني مثلا هل في عدد معين للطلب او عادي يكون مثلا 5  او 6

كمثال

كود :
        If nema = "khalid" or  nema = "ahmed" or  nema = "mhhmed" or  nema = "salem" or  nema = "ali" And Not IsNumeric(Exchange_r.Text) Then
MsgBox("OK")
ElseIf nema = "khalid" or  nema = "ahmed" or  nema = "mhhmed" or  nema = "salem" or  nema = "ali" And IsNumeric(Exchange_r.Text) Then
MsgBox("NO")

ElseIf nema = "khalid" or  nema = "ahmed" or  nema = "mhhmed" or  nema = "salem" or  nema = "ali" And Exchange_r.Text Then
MsgBox("NO")

ElseIf nema = "khalid" or  nema = "ahmed" or  nema = "mhhmed" or  nema = "salem" or  nema = "ali" And UU_r.Text Then
MsgBox("NO")

ElseIf nema = "khalid" or  nema = "ahmed" or  nema = "mhhmed" or  nema = "salem" or  nema = "ali" And  GG.Text Then
MsgBox("NO")



ElseIf nema = "khalid" or  nema = "ahmed" or  nema = "mhhmed" or  nema = "salem" or  nema = "ali" And  EE.Text Then
MsgBox("NO")


ElseIf nema = "khalid" or  nema = "ahmed" or  nema = "mhhmed" or  nema = "salem" or  nema = "ali" And  GWWG.Text Then
MsgBox("NO")


End If


افيدوني بارك الله فيكم ما هي الكتابة الصحيحه 

وشكرا

هل طريقة في كتابة الكود صحيحه

كود :
If contestnx = "CQ 160 Meter" And Continentx = "AS" And WORKinfo.Continent.Text = "NA" Then
           Points.Text = "10"

       ElseIf contestnx = "CQ 160 Meter" And Continentx = "AS" And WORKinfo.Continent.Text = "SA" Then
           Points.Text = "10"

       ElseIf contestnx = "CQ 160 Meter" And Continentx = "AS" And WORKinfo.Continent.Text = "EU" Then
           Points.Text = "10"

       ElseIf contestnx = "CQ 160 Meter" And Continentx = "AS" And WORKinfo.Continent.Text = "OC" Then
           Points.Text = "10"

       ElseIf contestnx = "CQ 160 Meter" And Continentx = "AS" And WORKinfo.Continent.Text = "AS" Then
           Points.Text = "5"





       ElseIf contestnx = "CQ 160 Meter" And Continentx = "NA" And WORKinfo.Continent.Text = "NA" Then
           Points.Text = "5"

       ElseIf contestnx = "CQ 160 Meter" And Continentx = "NA" And WORKinfo.Continent.Text = "SA" Then
           Points.Text = "10"

       ElseIf contestnx = "CQ 160 Meter" And Continentx = "NA" And WORKinfo.Continent.Text = "EU" Then
           Points.Text = "10"

       ElseIf contestnx = "CQ 160 Meter" And Continentx = "NA" And WORKinfo.Continent.Text = "OC" Then
           Points.Text = "10"

       ElseIf contestnx = "CQ 160 Meter" And Continentx = "NA" And WORKinfo.Continent.Text = "AS" Then
           Points.Text = "10"




       ElseIf contestnx = "CQ 160 Meter" And Continentx = "SA" And WORKinfo.Continent.Text = "NA" Then
           Points.Text = "10"

       ElseIf contestnx = "CQ 160 Meter" And Continentx = "SA" And WORKinfo.Continent.Text = "SA" Then
           Points.Text = "5"

       ElseIf contestnx = "CQ 160 Meter" And Continentx = "SA" And WORKinfo.Continent.Text = "EU" Then
           Points.Text = "10"

       ElseIf contestnx = "CQ 160 Meter" And Continentx = "SA" And WORKinfo.Continent.Text = "OC" Then
           Points.Text = "10"

       ElseIf contestnx = "CQ 160 Meter" And Continentx = "SA" And WORKinfo.Continent.Text = "AS" Then
           Points.Text = "10"




       ElseIf contestnx = "CQ 160 Meter" And Continentx = "EU" And WORKinfo.Continent.Text = "NA" Then
           Points.Text = "10"

       ElseIf contestnx = "CQ 160 Meter" And Continentx = "EU" And WORKinfo.Continent.Text = "SA" Then
           Points.Text = "10"

       ElseIf contestnx = "CQ 160 Meter" And Continentx = "EU" And WORKinfo.Continent.Text = "EU" Then
           Points.Text = "5"

       ElseIf contestnx = "CQ 160 Meter" And Continentx = "EU" And WORKinfo.Continent.Text = "OC" Then
           Points.Text = "10"

       ElseIf contestnx = "CQ 160 Meter" And Continentx = "EU" And WORKinfo.Continent.Text = "AS" Then
           Points.Text = "10"



       ElseIf contestnx = "CQ 160 Meter" And Continentx = "OC" And WORKinfo.Continent.Text = "NA" Then
           Points.Text = "10"

       ElseIf contestnx = "CQ 160 Meter" And Continentx = "OC" And WORKinfo.Continent.Text = "SA" Then
           Points.Text = "10"

       ElseIf contestnx = "CQ 160 Meter" And Continentx = "OC" And WORKinfo.Continent.Text = "EU" Then
           Points.Text = "10"

       ElseIf contestnx = "CQ 160 Meter" And Continentx = "OC" And WORKinfo.Continent.Text = "OC" Then
           Points.Text = "5"

       ElseIf contestnx = "CQ 160 Meter" And Continentx = "OC" And WORKinfo.Continent.Text = "AS" Then
           Points.Text = "10"

       ElseIf contestnx = "CQ 160 Meter" And PFXX = WORKinfo.PFX.Text Then
           Points.Text = "2"

      End IF
الرد
تم الشكر بواسطة:


المواضيع المحتمل أن تكون متشابهة .
الموضوع : الكاتب الردود : المشاهدات : آخر رد
  [سؤال] سلام سؤال تحويل رابط حاتمي 5 104 16-05-19, 02:29 PM
آخر رد: elgokr
  سؤال بخصوص نقل بيانات faysal13_13@hotmail.com 1 89 27-04-19, 10:32 PM
آخر رد: saoud2
  [VB.NET] سؤال بخصوص فتح الشاشات khalid475 3 99 25-04-19, 09:18 PM
آخر رد: elgokr
  [VB.NET] سؤال بخصوص datetimepicker في الداتا جريد فيو jassim316 7 161 25-04-19, 09:28 AM
آخر رد: elgokr
  [VB.NET] سؤال بخصوص client server dubai.eig 3 100 23-04-19, 11:40 AM
آخر رد: elgokr
  سؤال حول تنسيق لون مربع نص المتألق9 3 108 19-04-19, 02:31 AM
آخر رد: المتألق9
  [نقاش] سؤال محير جداااااا وارجو المساعده faysal13_13@hotmail.com 6 134 18-04-19, 11:52 AM
آخر رد: اسامه الهرماوي
  سؤال بخصوص DOEVENTS ومشكله بالكود dametucorazon 5 183 15-04-19, 09:24 AM
آخر رد: elgokr
  سؤال حول TextBox مرتبط ب WebBrowser ارجو رد من الاخ DK-x وشكرا للاخ بدري حاتمي 4 111 09-04-19, 06:16 PM
آخر رد: حاتمي
  سؤال حول TextBox مرتبط ب WebBrowser حاتمي 6 214 09-04-19, 01:00 AM
آخر رد: حاتمي

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


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم