23-10-19, 01:02 AM
(22-10-19, 07:41 PM)AbdoDabak كتب :تفضل اخي اتمنى يكون المطلوببس انا ما فهمت انت ليه ما بدك تحط قاعدة بياناتPHP كود :
Dim ii As Integer = DataGridView1.Rows.Count - 1
If Val(TextBox1.Text) = 1 Then
DataGridView1.Rows.Add()
DataGridView1.Rows(ii).Cells(0).Value = Val(TextBox1.Text)
DataGridView1.Rows(ii).Cells(1).Value = "AhMed El-Qon"
DataGridView1.Rows(ii).Cells(2).Value = "+201010759698"
DataGridView1.Rows(ii).Cells(3).Value = "NON"
DataGridView1.Rows(ii).Cells(4).Value = "Sidi Salim, Kafr Ash Shaykh, Egypt"
TextBox1.Clear()
TextBox1.Select()
ElseIf Val(TextBox1.Text) = 2 Then
DataGridView1.Rows.Add()
DataGridView1.Rows(ii).Cells(0).Value = Val(TextBox1.Text)
DataGridView1.Rows(ii).Cells(1).Value = "Hossam Ibrahim"
DataGridView1.Rows(ii).Cells(2).Value = "+201202179000"
DataGridView1.Rows(ii).Cells(3).Value = "hhxx61@yahoo.com"
DataGridView1.Rows(ii).Cells(4).Value = " الأقصر"
TextBox1.Clear()
TextBox1.Select()
ElseIf TextBox1.Text = 1 & vbCrLf & 2 Then
DataGridView1.Rows.Add()
DataGridView1.Rows(ii).Cells(0).Value = 1
DataGridView1.Rows(ii).Cells(1).Value = "AhMed El-Qon"
DataGridView1.Rows(ii).Cells(2).Value = "+201010759698"
DataGridView1.Rows(ii).Cells(3).Value = "NON"
DataGridView1.Rows(ii).Cells(4).Value = "Sidi Salim, Kafr Ash Shaykh, Egypt"
DataGridView1.Rows.Add()
DataGridView1.Rows(ii + 1).Cells(0).Value = 2
DataGridView1.Rows(ii + 1).Cells(1).Value = "Hossam Ibrahim"
DataGridView1.Rows(ii + 1).Cells(2).Value = "+201202179000"
DataGridView1.Rows(ii + 1).Cells(3).Value = "hhxx61@yahoo.com"
DataGridView1.Rows(ii + 1).Cells(4).Value = " الأقصر"
TextBox1.Clear()
TextBox1.Select()
End If
شكرا اخي هذا هو المطلوب شكرا لك ولكن عندي استفسار اخر كيف اجعل البرنامج عند اضافه رقم مثلا
1
2
3
4
في التكست بوكس كده هيطلع البيانات المرتبطه برقم 1 و 2 في الداتا جريد فيو
وطبعا 3 و 4 ليس لهم بيانات اود عند اضافه رقم ليس لديه بيانات يظهر مجموع الارقام الذي ليس لها بيانات في الكود في ليبل مثلا 3 و 4 ليس لهم بيانات فيظهر رقم 2مجموع الحقلين وانت كانت الارقارم
1
2
3
4
5
و البيانات المتاحه لرقمين 1 و 2 فيظهر العدد 3 كيف يتم ذلك

