12-02-13, 11:05 PM
13-02-13, 11:10 AM
ارفق مثالك للتعديل عليه
14-02-13, 09:53 PM
هذا هو البرنامج مشكلتي الان في الاستعلام في البرنامج مع العلم انه غير متصل بقاعدة بيانات
مثلا استعلام عن الموظفين الذين يقل مرتبهم عن 1000
مثلا استعلام عن الموظفين الذين يقل مرتبهم عن 1000
Module Module1
Structure employees
Dim name As String
Dim address As String
Dim department As String
Dim salary As Double
End Structure
Sub Main()
Console.WriteLine("name address department salary")
Dim i, j As Integer
Dim a(2, 3) As employees
For i = 1 To 2
For j = 1 To 3
a(i, j).name = InputBox("enter the name")
a(i, j).address = InputBox("enter the address")
a(i, j).department = InputBox("enter the department")
a(i, j).salary = InputBox("enter the salary")
Next j
Next i
For i = 1 To 2
For j = 1 To 3
Console.WriteLine(a(i, j).name & " " & a(i, j).address & " " & a(i, j).department & " " & a(i, j).salary)
Console.ReadLine()
Next
Next
Dim evensQuery = From salary In employees
Where num Mod 2 = 0
Select num
For Each number In evensQuery
Console.Write(number & " ")
Next
End Sub
End Module
Structure employees
Dim name As String
Dim address As String
Dim department As String
Dim salary As Double
End Structure
Sub Main()
Console.WriteLine("name address department salary")
Dim i, j As Integer
Dim a(2, 3) As employees
For i = 1 To 2
For j = 1 To 3
a(i, j).name = InputBox("enter the name")
a(i, j).address = InputBox("enter the address")
a(i, j).department = InputBox("enter the department")
a(i, j).salary = InputBox("enter the salary")
Next j
Next i
For i = 1 To 2
For j = 1 To 3
Console.WriteLine(a(i, j).name & " " & a(i, j).address & " " & a(i, j).department & " " & a(i, j).salary)
Console.ReadLine()
Next
Next
Dim evensQuery = From salary In employees
Where num Mod 2 = 0
Select num
For Each number In evensQuery
Console.Write(number & " ")
Next
End Sub
End Module