تقييم الموضوع :
  • 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
الرد }}}
تم الشكر بواسطة:


المواضيع المحتمل أن تكون متشابهة .
الموضوع : الكاتب الردود : المشاهدات : آخر رد
  سؤال عن الاسمبلي و النيم سبيس justforit 0 106 07-12-25, 12:28 AM
آخر رد: justforit
  فائدة بخصوص التعامل مع علامات التنصيص مع {سؤال} justforit 4 277 02-11-25, 11:19 PM
آخر رد: justforit
  [نقاش] سؤال MetoDas 2 1,491 20-04-25, 10:21 PM
آخر رد: Kamil
  [سؤال] سؤال ترددت قبل نشرة:طابعة الباركود لماذا تطبع أكثر من ليبل فارغ قبل السليم dr.programming 1 513 20-04-25, 09:26 PM
آخر رد: Kamil
  سؤال لو سمحتم احبتى فى الله خالد كامل1 4 810 09-02-25, 12:02 AM
آخر رد: princelovelorn
  سؤال واستفسار خالد كامل1 1 404 04-02-25, 09:31 PM
آخر رد: aliday03
  سؤال فى تقرير كريستال خالد كامل1 0 397 04-02-25, 05:50 AM
آخر رد: خالد كامل1
Question [VB.NET] هناك سؤال يهم كل مبرمج الماذا برنامجك يظهر على بعض الشاشات اكثر دقه بشكل مصغر ومشوه Microformt 0 448 01-02-25, 03:48 PM
آخر رد: Microformt
  [سؤال] سؤال في الكونسول justforit 1 369 21-12-24, 02:57 PM
آخر رد: aljzazy
  سؤال عن طريقة التعامل مع الفاصلة العشرية المتألق9 2 523 28-09-24, 04:45 PM
آخر رد: المتألق9

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


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