ذخیره و بازیابی تمامی اطلاعات در XML وی بی دات نت

VB.net

توسط thearrow در 5 سال پیش
0 1.1k 6 5 سال پیش
thearrow
0

درود به کاربران ، مدیران و همراهان گرامی سافت افزار،

در اینجا قرار است که با یاری همدیگر ، کدهای ذخیره ی اطلاعات در فایل XML را در زبان وی بی دات نت آموزش دهیم.

چنانچه سوالی برای شما دوستان گرامی پیش آمد ، خواهشمندیم در تاپیک جداگانه آنرا بپرسید.

سپاس گذارم.

تمامی کدها بر پایه کلاس پشمک میباشد ، یعنی شما نیازمند به ایجاد کلاسی به کد زیر هستید :

Imports System.Xml

Public Class Pashmak
    Public Shared XmlDoc As XmlDocument
End Class

چرا من از یک کلاس خارجی برای اینکار استفاده میکنم؟ چون که این شکلی خیلی راحت میشود که از کدها در فرم های مختلف به صورت همزمان استفاده نمایید! پس Importـه مورد نیاز در کل این پروژه ها ،این ها میباشند :

Imports System.Xml
Imports System.IO

منبع : سافت افزار

کدنویس : رامتین جوکار کپی برداری از کدهای پایین فقط با ذکر نام سافت افزار قانونی و مجاز میباشد.

0

برای ذخیره ی TextBox ها کد زیر را به کار ببرید :

Pashmak.XmlDoc = New XmlDocument
        Dim XRootA As XmlElement = Pashmak.XmlDoc.CreateElement("TextBoxes")
        Dim txtbox1 As XmlElement = Pashmak.XmlDoc.CreateElement("textBox1")
        txtbox1.InnerText = textBox1.Text
        Dim txtbox2 As XmlElement = Pashmak.XmlDoc.CreateElement("textBox2")
        txtbox2.InnerText = textBox2.Text
        XRootA.AppendChild(txtbox1)
        XRootA.AppendChild(txtbox2)
        Pashmak.XmlDoc.AppendChild(XRootA)
        Dim sd As New SaveFileDialog With
        {
            .Filter = "SoftAfzar Database (*.db)|*.db"
        }
        sd.FileName = ("SoftAfzar Database" & New Random().Next)
        If (sd.ShowDialog = DialogResult.OK) Then
            Dim writer As New StreamWriter(sd.FileName)
            writer.Write(Pashmak.XmlDoc.InnerXml)
            writer.Close()
        End If

و همچنین برای بازیابی اطلاعات آن از کد زیر استفاده نمایید :

Dim od As New OpenFileDialog With
        {
            .Filter = "SoftAfzar Database (*.db)|*.db",
            .FileName = "SoftAfzar Database.db"
        }
        If (od.ShowDialog = DialogResult.OK) Then
            Dim loaddb As New StreamReader(od.FileName)
            Dim data As String = loaddb.ReadToEnd
            loaddb.Close()
            Pashmak.XmlDoc = New XmlDocument
            Try
                Pashmak.XmlDoc.LoadXml(data)
            Catch
                Return
            End Try
            Dim XnL As XmlNodeList = Pashmak.XmlDoc.ChildNodes
            Dim i As Integer
            For i = 0 To Pashmak.XmlDoc.ChildNodes.Count - 1
                Dim name As String = XnL.ItemOf(i).Name
                If ((Not name Is Nothing) AndAlso (name = "TextBoxes")) Then
                    Dim XnL2 As XmlNodeList = XnL.ItemOf(i).ChildNodes
                    Dim j As Integer
                    For j = 0 To XnL2.Count - 1
                        name = XnL2.ItemOf(j).Name
                        If (Not name Is Nothing) Then
                            If (name = "textBox1") Then
                                textBox1.Text = XnL2.ItemOf(j).InnerText
                            ElseIf (name = "textBox2") Then
                                textBox2.Text = XnL2.ItemOf(j).InnerText
                            End If
                        End If
                Continue For

            Next j
                End If
            Next i
        End If
0

برای ذخیره ی RadioButton ها کد زیر را به کار ببرید :

Pashmak.XmlDoc = New XmlDocument
        Dim XRootA As XmlElement = Pashmak.XmlDoc.CreateElement("RadioButton")
        Dim radiobtn1 As XmlElement = Pashmak.XmlDoc.CreateElement("radioButton1")
        radiobtn1.InnerText = radioButton1.Checked.ToString
        Dim radiobtn2 As XmlElement = Pashmak.XmlDoc.CreateElement("radioButton2")
        radiobtn2.InnerText = radioButton2.Checked.ToString
        XRootA.AppendChild(radiobtn1)
        XRootA.AppendChild(radiobtn2)
        Pashmak.XmlDoc.AppendChild(XRootA)
        Dim od As New SaveFileDialog With
        {
            .Filter = "SoftAfzar Database (*.db)|*.db"
        }
        od.FileName = ("SoftAfzar Database" & New Random().Next)
        If (od.ShowDialog = DialogResult.OK) Then
            Dim writer As New StreamWriter(od.FileName)
            writer.Write(Pashmak.XmlDoc.InnerXml)
            writer.Close()
        End If

و همچنین برای بازیابی اطلاعات آن از کد زیر استفاده نمایید :

Dim od As New OpenFileDialog With
        {
            .Filter = "SoftAfzar Database (*.db)|*.db",
            .FileName = "SoftAfzar Database.db"
        }
        If (od.ShowDialog = DialogResult.OK) Then
            Dim loaddb As New StreamReader(od.FileName)
            Dim data As String = loaddb.ReadToEnd
            loaddb.Close()
            Pashmak.XmlDoc = New XmlDocument
            Try
                Pashmak.XmlDoc.LoadXml(data)
            Catch
                Return
            End Try
            Dim XnL As XmlNodeList = Pashmak.XmlDoc.ChildNodes
            Dim i As Integer
            For i = 0 To Pashmak.XmlDoc.ChildNodes.Count - 1
                Dim name As String = XnL.ItemOf(i).Name
                If ((Not name Is Nothing) AndAlso (name = "RadioButton")) Then
                    Dim XnL2 As XmlNodeList = XnL.ItemOf(i).ChildNodes
                    Dim j As Integer
                    For j = 0 To XnL2.Count - 1
                        name = XnL2.ItemOf(j).Name
                        If (Not name Is Nothing) Then
                            If (name = "radioButton1") Then
                                radioButton1.Checked = Boolean.Parse(XnL2.ItemOf(j).InnerText)
                            ElseIf (name = "radioButton2") Then
                                radioButton2.Checked = Boolean.Parse(XnL2.ItemOf(j).InnerText)
                            End If
                        End If
                Continue For

            Next j
                End If
            Next i
        End If
0

برای ذخیره ی CheckBoxها کد زیر را به کار ببرید :

Pashmak.XmlDoc = New XmlDocument
        Dim XRootA As XmlElement = Pashmak.XmlDoc.CreateElement("CheckBoxes")
        Dim chbox1 As XmlElement = Pashmak.XmlDoc.CreateElement("checkBox1")
        chbox1.InnerText = checkBox1.Checked.ToString
        Dim chbox2 As XmlElement = Pashmak.XmlDoc.CreateElement("checkBox2")
        chbox2.InnerText = checkBox2.Checked.ToString
        XRootA.AppendChild(chbox1)
        XRootA.AppendChild(chbox2)
        Pashmak.XmlDoc.AppendChild(XRootA)
        Dim sd As New SaveFileDialog With
        {
            .Filter = "SoftAfzar Database (*.db)|*.db"
        }
        sd.FileName = ("SoftAfzar Database" & New Random().Next)
        If (sd.ShowDialog = DialogResult.OK) Then
            Dim writer As New StreamWriter(sd.FileName)
            writer.Write(Pashmak.XmlDoc.InnerXml)
            writer.Close()
        End If

و همچنین برای بازیابی اطلاعات آن از کد زیر استفاده نمایید :

Dim od As New OpenFileDialog With
        {
            .Filter = "SoftAfzar Database (*.db)|*.db",
            .FileName = "SoftAfzar Database.db"
        }
        If (od.ShowDialog = DialogResult.OK) Then
            Dim loaddb As New StreamReader(od.FileName)
            Dim data As String = loaddb.ReadToEnd
            loaddb.Close()
            Pashmak.XmlDoc = New XmlDocument
            Try
                Pashmak.XmlDoc.LoadXml(data)
            Catch
                Return
            End Try
            Dim XnL As XmlNodeList = Pashmak.XmlDoc.ChildNodes
            Dim i As Integer
            For i = 0 To Pashmak.XmlDoc.ChildNodes.Count - 1
                Dim name As String = XnL.ItemOf(i).Name
                If ((Not name Is Nothing) AndAlso (name = "CheckBoxes")) Then
                    Dim XnL2 As XmlNodeList = XnL.ItemOf(i).ChildNodes
                    Dim j As Integer
                    For j = 0 To XnL2.Count - 1
                        name = XnL2.ItemOf(j).Name
                        If (Not name Is Nothing) Then
                            If (name = "checkBox1") Then
                                checkBox1.Checked = Boolean.Parse(XnL2.ItemOf(j).InnerText)
                            ElseIf (name = "checkBox2") Then
                                checkBox2.Checked = Boolean.Parse(XnL2.ItemOf(j).InnerText)
                            End If
                        End If
                        Continue For

                    Next j
                End If
            Next i
        End If
0

برای ذخیره ی ListBoxها کد زیر را به کار ببرید :

Pashmak.XmlDoc = New XmlDocument
        Dim listBoxP As XmlElement = Pashmak.XmlDoc.CreateElement("ListBoxes")
        Dim i As Integer
        For i = 0 To Me.listBox1.Items.Count - 1
            Dim Item As XmlElement = Pashmak.XmlDoc.CreateElement("Item")
            Item.InnerText = listBox1.Items.Item(i).ToString
            listBoxP.AppendChild(Item)
        Next i
        Pashmak.XmlDoc.AppendChild(listBoxP)
        Dim sd As New SaveFileDialog With
        {
            .Filter = "SoftAfzar Database (*.db)|*.db"
        }
        sd.FileName = ("SoftAfzar Database" & New Random().Next)
        If (sd.ShowDialog = DialogResult.OK) Then
            Dim writer As New StreamWriter(sd.FileName)
            writer.Write(Pashmak.XmlDoc.InnerXml)
            writer.Close()
        End If

و همچنین برای بازیابی اطلاعات آن از کد زیر استفاده نمایید :

Dim od As New OpenFileDialog With
        {
            .Filter = "SoftAfzar Database (*.db)|*.db",
            .FileName = "SoftAfzar Database.db"
        }
        If (od.ShowDialog = DialogResult.OK) Then
            Dim loaddb As New StreamReader(od.FileName)
            Dim data As String = loaddb.ReadToEnd
            loaddb.Close()
            Pashmak.XmlDoc = New XmlDocument
            Try
                Pashmak.XmlDoc.LoadXml(data)
            Catch
                Return
            End Try
            Dim XnL As XmlNodeList = Pashmak.XmlDoc.ChildNodes
            Dim i As Integer
            For i = 0 To Pashmak.XmlDoc.ChildNodes.Count - 1
                Dim name As String = XnL.ItemOf(i).Name
                If ((Not name Is Nothing) AndAlso (name = "ListBoxes")) Then
                    Dim XnL2 As XmlNodeList = XnL.ItemOf(i).ChildNodes
                    Dim j As Integer
                    For j = 0 To XnL2.Count - 1
                        name = XnL2.ItemOf(j).Name
                        If ((Not name Is Nothing) AndAlso (name = "Item")) Then
                            listBox1.Items.Add(XnL2.ItemOf(j).InnerText)
                        End If
                    Next j
                End If
            Next i
        End If
0

برای ذخیره ی DataGridView ها کد زیر را به کار ببرید :

Pashmak.XmlDoc = New XmlDocument
        Dim XRootA As XmlElement = Pashmak.XmlDoc.CreateElement("Pashmak")
        Dim XRootB As XmlElement = Pashmak.XmlDoc.CreateElement("Softafzar")
        Dim XItems As XmlElement = Pashmak.XmlDoc.CreateElement("Items")
        Dim i As Integer
        For i = 0 To (dataGridView1.Rows.Count - 1) - 1
            Dim XItem As XmlElement = Pashmak.XmlDoc.CreateElement("Item")
            Dim XCLM1 As XmlElement = Pashmak.XmlDoc.CreateElement("Column1")
            Dim XCLM2 As XmlElement = Pashmak.XmlDoc.CreateElement("Column2")
            XCLM1.InnerText = dataGridView1.Rows.Item(i).Cells.Item(0).Value.ToString
            XCLM2.InnerText = dataGridView1.Rows.Item(i).Cells.Item(1).Value.ToString
            XItem.AppendChild(XCLM1)
            XItem.AppendChild(XCLM2)
            XItems.AppendChild(XItem)
        Next i
        XRootB.AppendChild(XItems)
        XRootA.AppendChild(XRootB)
        Pashmak.XmlDoc.AppendChild(XRootA)
        Dim sd As New SaveFileDialog With
        {
            .Filter = "SoftAfzar Database (*.db)|*.db"
        }
        sd.FileName = ("SoftAfzar Database" & New Random().Next)
        Dim fileName As String = ""
        If (sd.ShowDialog = DialogResult.OK) Then
            Dim writer As New StreamWriter(sd.FileName)
            writer.Write(Pashmak.XmlDoc.InnerXml)
            fileName = sd.FileName
            label1.Text = ("Database Saved on" & ChrW(10) & fileName)
            writer.Close()
        End If

و همچنین برای بازیابی اطلاعات آن از کد زیر استفاده نمایید :

Dim od As New OpenFileDialog With
        {
             .Filter = "SoftAfzar Database (*.db)|*.db",
             .FileName = "SoftAfzar Database.db"
        }
        If (od.ShowDialog = DialogResult.OK) Then
            Dim loaddb As New StreamReader(od.FileName)
            Dim data As String = loaddb.ReadToEnd
            loaddb.Close()
            Pashmak.XmlDoc = New XmlDocument
            Try
                Pashmak.XmlDoc.LoadXml(data)
            Catch
                Return
            End Try
            If ((Not Pashmak.XmlDoc Is Nothing) AndAlso (Pashmak.XmlDoc.InnerXml <> "")) Then
                Dim XmlRoot As XmlNode = Pashmak.XmlDoc.GetElementsByTagName("Pashmak").ItemOf(0)
                Dim i As Integer
                For i = 0 To XmlRoot.ChildNodes.Count - 1
                    Dim XmlRChild As XmlNode = XmlRoot.ChildNodes.ItemOf(i)
                    Dim name As String = XmlRChild.Name
                    If (((Not name Is Nothing) AndAlso (name = "Softafzar")) AndAlso ((Not XmlRChild.SelectSingleNode("//Pashmak/Softafzar/Items") Is Nothing) AndAlso (Not XmlRChild.SelectSingleNode("//Pashmak/Softafzar/Items/Item") Is Nothing))) Then
                        Dim ItemsList As XmlNodeList = XmlRChild.SelectNodes("//Pashmak/Softafzar/Items/Item")
                        Dim j As Integer
                        For j = 0 To ItemsList.Count - 1
                            Dim A As String = ""
                            Dim B As String = ""
                            Dim k As Integer
                            For k = 0 To ItemsList.ItemOf(j).ChildNodes.Count - 1
                                If (ItemsList.ItemOf(j).ChildNodes.ItemOf(k).Name = "Column1") Then
                                    A = ItemsList.ItemOf(j).ChildNodes.ItemOf(k).InnerText
                                ElseIf (ItemsList.ItemOf(j).ChildNodes.ItemOf(k).Name = "Column2") Then
                                    B = ItemsList.ItemOf(j).ChildNodes.ItemOf(k).InnerText
                                End If
                            Next k
                            dataGridView1.Rows.Add(A, B)
                        Next j
                    End If
                Next i
            End If
        End If
0

برای ذخیره سازی تنظیمات در یک فایل واحد از کدهای زیر استفاده نمایید :

Dim num As Integer
        Pashmak.XmlDoc = New XmlDocument
        Dim XRootA As XmlElement = Pashmak.XmlDoc.CreateElement("Pashmak")
        Dim XRootB As XmlElement = Pashmak.XmlDoc.CreateElement("Softafzar")
        Dim XItems As XmlElement = Pashmak.XmlDoc.CreateElement("Items")
        For num = 0 To (dataGridView1.Rows.Count - 1) - 1
            Dim XItem As XmlElement = Pashmak.XmlDoc.CreateElement("Item")
            Dim XCLM1 As XmlElement = Pashmak.XmlDoc.CreateElement("Column1")
            Dim XCLM2 As XmlElement = Pashmak.XmlDoc.CreateElement("Column2")
            XCLM1.InnerText = dataGridView1.Rows.Item(num).Cells.Item(0).Value.ToString
            XCLM2.InnerText = dataGridView1.Rows.Item(num).Cells.Item(1).Value.ToString
            XItem.AppendChild(XCLM1)
            XItem.AppendChild(XCLM2)
            XItems.AppendChild(XItem)
        Next num
        XRootB.AppendChild(XItems)
        XRootA.AppendChild(XRootB)


        Dim listBoxP As XmlElement = Pashmak.XmlDoc.CreateElement("ListBoxes")
        For num = 0 To listBox1.Items.Count - 1
            Dim Item As XmlElement = Pashmak.XmlDoc.CreateElement("Item")
            Item.InnerText = listBox1.Items.Item(num).ToString
            listBoxP.AppendChild(Item)
        Next num
        XRootA.AppendChild(listBoxP)


        Dim XRootC As XmlElement = Pashmak.XmlDoc.CreateElement("TextBoxes")
        Dim txtbox1 As XmlElement = Pashmak.XmlDoc.CreateElement("textBox1")
        txtbox1.InnerText = textBox1.Text
        Dim txtbox2 As XmlElement = Pashmak.XmlDoc.CreateElement("textBox2")
        txtbox2.InnerText = textBox2.Text
        XRootC.AppendChild(txtbox1)
        XRootC.AppendChild(txtbox2)
        XRootA.AppendChild(XRootC)


        Dim XRootD As XmlElement = Pashmak.XmlDoc.CreateElement("RadioButton")
        Dim radiobtn1 As XmlElement = Pashmak.XmlDoc.CreateElement("radioButton1")
        radiobtn1.InnerText = radioButton1.Checked.ToString
        Dim radiobtn2 As XmlElement = Pashmak.XmlDoc.CreateElement("radioButton2")
        radiobtn2.InnerText = radioButton2.Checked.ToString
        XRootD.AppendChild(radiobtn1)
        XRootD.AppendChild(radiobtn2)
        XRootA.AppendChild(XRootD)


        Dim XRootE As XmlElement = Pashmak.XmlDoc.CreateElement("CheckBoxes")
        Dim chbox1 As XmlElement = Pashmak.XmlDoc.CreateElement("checkBox1")
        chbox1.InnerText = checkBox1.Checked.ToString
        Dim chbox2 As XmlElement = Pashmak.XmlDoc.CreateElement("checkBox2")
        chbox2.InnerText = checkBox2.Checked.ToString
        XRootE.AppendChild(chbox1)
        XRootE.AppendChild(chbox2)
        XRootA.AppendChild(XRootE)
        Pashmak.XmlDoc.AppendChild(XRootA)


        Dim sd As New SaveFileDialog With
        {
            .Filter = "SoftAfzar Database (*.db)|*.db"
        }
        sd.FileName = ("SoftAfzar Database" & New Random().Next)
        Dim fileName As String = ""
        If (sd.ShowDialog = DialogResult.OK) Then
            Dim writer As New StreamWriter(sd.FileName)
            writer.Write(Pashmak.XmlDoc.InnerXml)
            fileName = sd.FileName
            label1.Text = ("Database Saved on" & ChrW(10) & fileName)
            writer.Close()
        End If

همچنین برای بازیابی آنها ، از کد زیر استفاده کنید :

Dim od As New OpenFileDialog With
        {
              .Filter = "SoftAfzar Database (*.db)|*.db",
              .FileName = "SoftAfzar Database.db"
        }
        If (od.ShowDialog = DialogResult.OK) Then
            Dim loaddb As New StreamReader(od.FileName)
            Dim data As String = loaddb.ReadToEnd
            loaddb.Close()
            Pashmak.XmlDoc = New XmlDocument
            Try
                Pashmak.XmlDoc.LoadXml(data)
            Catch
                Return
            End Try
            If ((Not Pashmak.XmlDoc Is Nothing) AndAlso Not (Pashmak.XmlDoc.InnerXml = "")) Then
                Dim XmlRChild As XmlNode = Pashmak.XmlDoc.GetElementsByTagName("Pashmak").ItemOf(0)
                Dim i As Integer
                For i = 0 To XmlRChild.ChildNodes.Count - 1
                    Dim list2 As XmlNodeList
                    Dim num2 As Integer
                    Dim innerText As String
                    Dim num3 As Integer
                    Dim node2 As XmlNode = XmlRChild.ChildNodes.ItemOf(i)
                    Dim name As String = node2.Name
                    If (Not name Is Nothing) Then
                        If Not (name = "Softafzar") Then
                            If (name = "ListBoxes") Then
                                If (Not node2.SelectSingleNode("//Pashmak/ListBoxes/Item") Is Nothing) Then
                                    list2 = node2.SelectNodes("//Pashmak/ListBoxes/Item")
                                    num2 = 0
                                    Do While (num2 < list2.Count)
                                        innerText = ""
                                        For num3 = 0 To list2.ItemOf(num2).ChildNodes.Count - 1
                                            innerText = list2.ItemOf(num2).ChildNodes.ItemOf(num3).InnerText
                                        Next num3
                                        listBox1.Items.Add(innerText)
                                        num2 += 1
                                    Loop
                                End If
                                Continue For
                            End If
                            If (name = "TextBoxes") Then
                                If (Not node2.SelectSingleNode("//Pashmak/TextBoxes") Is Nothing) Then
                                    list2 = node2.ChildNodes
                                    num2 = 0
                                    Do While (num2 < list2.Count)
                                        name = list2.ItemOf(num2).Name
                                        If (Not name Is Nothing) Then
                                            If (name = "textBox1") Then
                                                textBox1.Text = list2.ItemOf(num2).InnerText
                                            ElseIf (name = "textBox2") Then
                                                textBox2.Text = list2.ItemOf(num2).InnerText

                                            Else
                                            End If
                                        End If
                                        num2 += 1
                                    Loop
                                End If
                                Continue For
                            End If
                            If (name = "RadioButton") Then
                                If (Not node2.SelectSingleNode("//Pashmak/RadioButton") Is Nothing) Then
                                    list2 = node2.ChildNodes
                                    num2 = 0
                                    Do While (num2 < list2.Count)
                                        name = list2.ItemOf(num2).Name
                                        If (Not name Is Nothing) Then
                                            If (name = "radioButton1") Then
                                                radioButton1.Checked = Boolean.Parse(list2.ItemOf(num2).InnerText)
                                            ElseIf (name = "radioButton2") Then
                                                radioButton2.Checked = Boolean.Parse(list2.ItemOf(num2).InnerText)

                                            End If
                                        End If
                                        num2 += 1
                                    Loop
                                End If
                                Continue For
                            End If
                            If (name = "CheckBoxes") Then
                                If (Not node2.SelectSingleNode("//Pashmak/CheckBoxes") Is Nothing) Then
                                    list2 = node2.ChildNodes
                                    For num2 = 0 To list2.Count - 1
                                        name = list2.ItemOf(num2).Name
                                        If (Not name Is Nothing) Then
                                            If (name = "checkBox1") Then
                                                checkBox1.Checked = Boolean.Parse(list2.ItemOf(num2).InnerText)
                                            ElseIf (name = "checkBox2") Then
                                                checkBox2.Checked = Boolean.Parse(list2.ItemOf(num2).InnerText)

                                            End If
                                        End If
                                        Continue For
                                    Next num2
                                End If
                                Continue For
                            End If
                        ElseIf ((Not node2.SelectSingleNode("//Pashmak/Softafzar/Items") Is Nothing) AndAlso (Not node2.SelectSingleNode("//Pashmak/Softafzar/Items/Item") Is Nothing)) Then
                            list2 = node2.SelectNodes("//Pashmak/Softafzar/Items/Item")
                            num2 = 0
                            Do While (num2 < list2.Count)
                                innerText = ""
                                Dim str3 As String = ""
                                num3 = 0
                                Do While (num3 < list2.ItemOf(num2).ChildNodes.Count)
                                    If (list2.ItemOf(num2).ChildNodes.ItemOf(num3).Name = "Column1") Then
                                        innerText = list2.ItemOf(num2).ChildNodes.ItemOf(num3).InnerText
                                    ElseIf (list2.ItemOf(num2).ChildNodes.ItemOf(num3).Name = "Column2") Then
                                        str3 = list2.ItemOf(num2).ChildNodes.ItemOf(num3).InnerText
                                    End If
                                    num3 += 1
                                Loop
                                dataGridView1.Rows.Add(New Object() {innerText, str3})
                                num2 += 1
                            Loop
                        End If
                    End If
                    Continue For
                Next i
            End If
        End If

منبع : سافت افزار

کدنویس : رامتین جوکار کپی برداری از کدهای بالا فقط با ذکر نام سافت افزار قانونی و مجاز میباشد.

خوش آمدید

برای طرح سوال، ایجاد بحث و فعالیت در سایت نیاز است ابتدا وارد حساب کاربری خود شوید. در صورتی که هنوز عضو سایت نیستید میتوانید در عرض تنها چند ثانیه ثبت نام کنید.

لطفا ابتدا لاگین کنید