ا سلام من یه پروژه بیمارستان خریدم . ولی از این قسمت کد سر در نمیارم میشه کمک کنید .
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Linq
Imports System.Text
Imports System.Windows.Forms
Imports System.Data.SqlClient

Namespace bimarestan
Partial Public Class Form2
Inherits Form
Public Sub New()
InitializeComponent()
End Sub

Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click

Dim connection_string As String = "Data Source=.\SQLEXPRESS;AttachDbFilename=""" & Application.StartupPath & "\kilinik.mdf"";Integrated Security=True;Connect Timeout=30;User Instance=True"
Using myconnection As New SqlConnection(connection_string)
Using mycommand As New SqlCommand()
myconnection.Open()
mycommand.Connection = myconnection
Dim q As String = "insert into bimran values('" & TextBox0.Text & "','" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "')"
mycommand.CommandText = q
mycommand.ExecuteNonQuery()
MessageBox.Show("اطلاعات با موفقیت در پایگاه ثبت شد")
TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
TextBox4.Clear()
TextBox5.Clear()
End Using
End Using
gridview()

End Sub
Public Sub gridview()
Dim connection_string As String = "Data Source=.\SQLEXPRESS;AttachDbFilename=""" & Application.StartupPath & "\kilinik.mdf"";Integrated Security=True;Connect Timeout=30;User Instance=True"
Using myconnection As New SqlConnection(connection_string)
Using mycommand As New SqlCommand()
myconnection.Open()
mycommand.Connection = myconnection
Dim q As String = "select * from bimran"
mycommand.CommandText = q
Dim myreader As SqlDataReader = mycommand.ExecuteReader()
DataGridView1.Rows.Clear()
If myreader.HasRows Then
Do While myreader.Read()
DataGridView1.Rows.Add(myreader(1).ToString(), myreader(2).ToString(), myreader(3).ToString(), myreader(4).ToString(), myreader(5).ToString(), myreader(6).ToString())
Loop

End If
End Using
End Using
End Sub

Private Sub Form2_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
gridview()
End Sub

Private Sub DataGridView1_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick

End Sub

Private Sub TextBox0_TextChanged(sender As Object, e As EventArgs) Handles TextBox0.TextChanged

End Sub
End Class
End Namespace
لطفا کمک کنید .
با تشکر .