المشاركات : 567
المواضيع 206
الإنتساب : Jul 2019
السمعة :
14
الشكر: 371
تم شكره 559 مرات في 319 مشاركات
22-10-19, 04:42 PM
(آخر تعديل لهذه المشاركة : 22-10-19, 05:37 PM {2} بواسطة اليوم السابع .)
لدي فورم بها داتا جريد فيو وتكست بوكس واستخدم هذا الكود المخزن بالقيم والبيانات من أجل عند اضافه رقم 1 في التكست بوكس
والضغط علي زر تظهر البيانات المرتبطه برقم 1 في الداتا جريد فيو كما هو موضح في الكود ونفس العمليه عند اضافه رقم 2
اود ان افعل عند اضافه رقم
1
و رقم
2
بهذه الشكل في التكست بوكس يظهر البياانات المرتبطه للرقمين في الداتا جريد فيو فكيف افعل ذلك
كود :
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"
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 = " الأقصر"
المشاركات : 136
المواضيع 24
الإنتساب : Sep 2019
السمعة :
1
الشكر: 121
تم شكره 131 مرات في 73 مشاركات
تفضل اخي اتمنى يكون المطلوب
بس انا ما فهمت انت ليه ما بدك تحط قاعدة بيانات
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
المشاركات : 567
المواضيع 206
الإنتساب : Jul 2019
السمعة :
14
الشكر: 371
تم شكره 559 مرات في 319 مشاركات
(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 كيف يتم ذلك
المشاركات : 567
المواضيع 206
الإنتساب : Jul 2019
السمعة :
14
الشكر: 371
تم شكره 559 مرات في 319 مشاركات
(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 كيف يتم ذلك
.
المشاركات : 567
المواضيع 206
الإنتساب : Jul 2019
السمعة :
14
الشكر: 371
تم شكره 559 مرات في 319 مشاركات
(23-10-19, 03:22 AM) اليوم السابع كتب : (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 كيف يتم ذلك
.
المشاركات : 136
المواضيع 24
الإنتساب : Sep 2019
السمعة :
1
الشكر: 121
تم شكره 131 مرات في 73 مشاركات
تفضل اخي
انا انصحك باستخدام قاعدة بيانات ليسهل عليك الامر
PHP كود :
Dim ii As Integer = DataGridView1 . Rows . Count - 1 If TextBox1 . Text . Contains ( 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 = " الأقصر" Label1 . Text = TextBox1 . Lines . Count - 2 TextBox1 . Clear () TextBox1 . Select () ElseIf TextBox1 . Text . Contains ( 2 ) Then DataGridView1 . Rows . Add () DataGridView1 . Rows ( ii ). Cells ( 0 ). Value = 2 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 = " الأقصر" Label1 . Text = TextBox1 . Lines . Count - 1 TextBox1 . Clear () TextBox1 . Select () ElseIf TextBox1 . Text . Contains ( 1 ) 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" Label1 . Text = TextBox1 . Lines . Count - 1 TextBox1 . Clear () TextBox1 . Select () Else Label1 . Text = TextBox1 . Lines . Count End If
اخي يجب وضع 1و2 بهذا الشكل ليطلع بياناتهم
1
2
ما يكون في بيناتهن اي رقم
5
4
8
0
7
1
2
3
5
7
المشاركات : 567
المواضيع 206
الإنتساب : Jul 2019
السمعة :
14
الشكر: 371
تم شكره 559 مرات في 319 مشاركات
24-10-19, 05:32 PM
(آخر تعديل لهذه المشاركة : 24-10-19, 05:37 PM {2} بواسطة اليوم السابع .)
(24-10-19, 10:58 AM) AbdoDabak كتب : تفضل اخي
انا انصحك باستخدام قاعدة بيانات ليسهل عليك الامر
PHP كود :
Dim ii As Integer = DataGridView1 . Rows . Count - 1 If TextBox1 . Text . Contains ( 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 = " الأقصر" Label1 . Text = TextBox1 . Lines . Count - 2 TextBox1 . Clear () TextBox1 . Select () ElseIf TextBox1 . Text . Contains ( 2 ) Then DataGridView1 . Rows . Add () DataGridView1 . Rows ( ii ). Cells ( 0 ). Value = 2 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 = " الأقصر" Label1 . Text = TextBox1 . Lines . Count - 1 TextBox1 . Clear () TextBox1 . Select () ElseIf TextBox1 . Text . Contains ( 1 ) 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" Label1 . Text = TextBox1 . Lines . Count - 1 TextBox1 . Clear () TextBox1 . Select () Else Label1 . Text = TextBox1 . Lines . Count End If
اخي يجب وضع 1و2 بهذا الشكل ليطلع بياناتهم
1
2
ما يكون في بيناتهن اي رقم
5
4
8
0
7
1
2
3
5
7
شكرا اخي ولكن هذا الكود يظهر مجموع محتوي التكست بوكس بما فيهم الي متاح بيانتهم كما هو موضح
السهم المشار برقم 1 = رقم ليس له بيانات علي الداتا جريد فيو
السهم المشار برقم 2 = مجموع محتوي التكست بوكس انا اود ان يكون يحتوي علي عدد الارقام التي ليس لها بيانات يعني من المفترض يظهر رقم 1
السهم المشار برقم 3 = هو مجموع عدد محتوي التكست بوكس
السهم المشار برقم 4 = هو مجموع عدد الصفوف في الداتا جريد فيو
(24-10-19, 05:32 PM) اليوم السابع كتب : (24-10-19, 10:58 AM) AbdoDabak كتب : تفضل اخي
انا انصحك باستخدام قاعدة بيانات ليسهل عليك الامر
PHP كود :
Dim ii As Integer = DataGridView1 . Rows . Count - 1 If TextBox1 . Text . Contains ( 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 = " الأقصر" Label1 . Text = TextBox1 . Lines . Count - 2 TextBox1 . Clear () TextBox1 . Select () ElseIf TextBox1 . Text . Contains ( 2 ) Then DataGridView1 . Rows . Add () DataGridView1 . Rows ( ii ). Cells ( 0 ). Value = 2 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 = " الأقصر" Label1 . Text = TextBox1 . Lines . Count - 1 TextBox1 . Clear () TextBox1 . Select () ElseIf TextBox1 . Text . Contains ( 1 ) 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" Label1 . Text = TextBox1 . Lines . Count - 1 TextBox1 . Clear () TextBox1 . Select () Else Label1 . Text = TextBox1 . Lines . Count End If
اخي يجب وضع 1و2 بهذا الشكل ليطلع بياناتهم
1
2
ما يكون في بيناتهن اي رقم
5
4
8
0
7
1
2
3
5
7
شكرا اخي ولكن هذا الكود يظهر مجموع محتوي التكست بوكس بما فيهم الي متاح بيانتهم كما هو موضح
السهم المشار برقم 1 = رقم ليس له بيانات علي الداتا جريد فيو
السهم المشار برقم 2 = مجموع محتوي التكست بوكس انا اود ان يكون يحتوي علي عدد الارقام التي ليس لها بيانات يعني من المفترض يظهر رقم 1
السهم المشار برقم 3 = هو مجموع عدد محتوي التكست بوكس
السهم المشار برقم 4 = هو مجموع عدد الصفوف في الداتا جريد فيو
الملفات المرفقة
صورة/صور
المشاركات : 136
المواضيع 24
الإنتساب : Sep 2019
السمعة :
1
الشكر: 121
تم شكره 131 مرات في 73 مشاركات
24-10-19, 06:01 PM
(آخر تعديل لهذه المشاركة : 24-10-19, 06:21 PM {2} بواسطة AbdoDabak .)
اخي جرب هاد الكود
PHP كود :
Dim ii As Integer = DataGridView1 . Rows . Count - 1 If TextBox1 . Text . Contains ( 4 & vbCrLf ) Then TextBox1 . Text = TextBox1 . Text . Replace ( 4 & vbCrLf , "" ) DataGridView1 . Rows . Add () DataGridView1 . Rows ( ii ). Cells ( 0 ). Value = 4 DataGridView1 . Rows ( ii ). Cells ( 1 ). Value = "4" DataGridView1 . Rows ( ii ). Cells ( 2 ). Value = "+4" DataGridView1 . Rows ( ii ). Cells ( 3 ). Value = "4@yahoo.com" DataGridView1 . Rows ( ii ). Cells ( 4 ). Value = "4" Label1 . Text = TextBox1 . Lines . Count Button1 . PerformClick () ElseIf TextBox1 . Text . Contains ( 3 & vbCrLf ) Then TextBox1 . Text = TextBox1 . Text . Replace ( 3 & vbCrLf , "" ) DataGridView1 . Rows . Add () DataGridView1 . Rows ( ii ). Cells ( 0 ). Value = 3 DataGridView1 . Rows ( ii ). Cells ( 1 ). Value = "3" DataGridView1 . Rows ( ii ). Cells ( 2 ). Value = "+3" DataGridView1 . Rows ( ii ). Cells ( 3 ). Value = "3@yahoo.com" DataGridView1 . Rows ( ii ). Cells ( 4 ). Value = "3" Label1 . Text = TextBox1 . Lines . Count Button1 . PerformClick () ElseIf TextBox1 . Text . Contains ( 2 & vbCrLf ) Then TextBox1 . Text = TextBox1 . Text . Replace ( 2 & vbCrLf , "" ) DataGridView1 . Rows . Add () DataGridView1 . Rows ( ii ). Cells ( 0 ). Value = 2 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 = " الأقصر" Label1 . Text = TextBox1 . Lines . Count Button1 . PerformClick () ElseIf TextBox1 . Text . Contains ( 1 & vbCrLf ) Then TextBox1 . Text = TextBox1 . Text . Replace ( 1 & vbCrLf , "" ) Label1 . Text = TextBox1 . Lines . Count 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" Button1 . PerformClick () Else Label1 . Text = TextBox1 . Lines . Count MsgBox ( "لا يوجد بيانات للرقم الذي تطلبه" ) End If
ملاحظة : يجب اضافة سطر عند كتابة اخر رقم
المشاركات : 567
المواضيع 206
الإنتساب : Jul 2019
السمعة :
14
الشكر: 371
تم شكره 559 مرات في 319 مشاركات
(24-10-19, 06:01 PM) AbdoDabak كتب : اخي جرب هاد الكود
PHP كود :
Dim ii As Integer = DataGridView1 . Rows . Count - 1 If TextBox1 . Text . Contains ( 4 & vbCrLf ) Then TextBox1 . Text = TextBox1 . Text . Replace ( 4 & vbCrLf , "" ) DataGridView1 . Rows . Add () DataGridView1 . Rows ( ii ). Cells ( 0 ). Value = 4 DataGridView1 . Rows ( ii ). Cells ( 1 ). Value = "4" DataGridView1 . Rows ( ii ). Cells ( 2 ). Value = "+4" DataGridView1 . Rows ( ii ). Cells ( 3 ). Value = "4@yahoo.com" DataGridView1 . Rows ( ii ). Cells ( 4 ). Value = "4" Label1 . Text = TextBox1 . Lines . Count Button1 . PerformClick () ElseIf TextBox1 . Text . Contains ( 3 & vbCrLf ) Then TextBox1 . Text = TextBox1 . Text . Replace ( 3 & vbCrLf , "" ) DataGridView1 . Rows . Add () DataGridView1 . Rows ( ii ). Cells ( 0 ). Value = 3 DataGridView1 . Rows ( ii ). Cells ( 1 ). Value = "3" DataGridView1 . Rows ( ii ). Cells ( 2 ). Value = "+3" DataGridView1 . Rows ( ii ). Cells ( 3 ). Value = "3@yahoo.com" DataGridView1 . Rows ( ii ). Cells ( 4 ). Value = "3" Label1 . Text = TextBox1 . Lines . Count Button1 . PerformClick () ElseIf TextBox1 . Text . Contains ( 2 & vbCrLf ) Then TextBox1 . Text = TextBox1 . Text . Replace ( 2 & vbCrLf , "" ) DataGridView1 . Rows . Add () DataGridView1 . Rows ( ii ). Cells ( 0 ). Value = 2 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 = " الأقصر" Label1 . Text = TextBox1 . Lines . Count Button1 . PerformClick () ElseIf TextBox1 . Text . Contains ( 1 & vbCrLf ) Then TextBox1 . Text = TextBox1 . Text . Replace ( 1 & vbCrLf , "" ) Label1 . Text = TextBox1 . Lines . Count 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" Button1 . PerformClick () Else Label1 . Text = TextBox1 . Lines . Count MsgBox ( "لا يوجد بيانات للرقم الذي تطلبه" ) End If
ملاحظة : يجب اضافة سطر عند كتابة اخر رقم
شكرا اخي لي تعبك ولكن ما زالت يظهر مسدج انا اود ان يعمل كما شرحت لك لكن لو علي المسدج بوكس فالامر سهل
ولكن ليس هذا المطلوب
المشاركات : 136
المواضيع 24
الإنتساب : Sep 2019
السمعة :
1
الشكر: 121
تم شكره 131 مرات في 73 مشاركات
24-10-19, 06:41 PM
(آخر تعديل لهذه المشاركة : 24-10-19, 06:49 PM {2} بواسطة AbdoDabak .)
كيف يعني مسج بوكس
امسح اخر اربع اسطر من دون اخر سطر مارح يطلع مسج بوكس
ما هي اداة رقم 1 تيكست ام ليست