24-10-19, 06:38 PM
(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
ملاحظة : يجب اضافة سطر عند كتابة اخر رقم
شكرا اخي لي تعبك ولكن ما زالت يظهر مسدج انا اود ان يعمل كما شرحت لك لكن لو علي المسدج بوكس فالامر سهل
ولكن ليس هذا المطلوب

