التنبيهات التالية ظهرت :
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 864 - File: showthread.php PHP 7.4.33 (Linux)
File Line Function
/showthread.php 864 errorHandler->error



تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[سؤال] سؤال بخصوص كود برمجي
#1
Star 
  مدرج كود لكيفيه اختيار عناصر من DataGridView و عرض بياناته في فورم اخر بالنقر المزدوج عليها من DataGridView ..
لم يشتغل معي .. اريد ان اعرف المشكله ان امكن ؟؟
 Private Sub DataGridView1_DoubleClick(sender As Object, e As EventArgs) Handles DataGridView1.DoubleClick
        If (DataGridView1.RowCount > 0) Then

            Dim sql As String = "select p_name,(select c_name from t_clinic where c_id=t_patiants.c_id)as c_name,(select D_name from t_doctor where D_id=t_patiants.d_id)as d_name,p_birthday  from t_patiants  '" + DataGridView1.CurrentRow.Cells(0).Value.ToString + "'"
            Dim cont As New SqlCommand(sql, Class1.con)
            Dim dr As SqlDataReader

            Class1.con.Open()
            Try
                dr = cont.ExecuteReader
                If dr.HasRows Then
                    dr.Read()
                    Form3.Show()
                    Form3.Button4.Enabled = True
                    Form3.Button1.Enabled = True
                    Form3.Button3.Enabled = False
                    Form3.Button5.Enabled = False
                    Form3.p_id = dr("d_id").ToString

                    Form3.TextBox1 = dr("p_name")
                    Form3.ComboBox2.Text = dr("c_name").ToString
                    Form3.ComboBox1.Text = dr("d_name").ToString
                    Form3.DateTimePicker1.Text = dr("p_birthday").ToString

                End If
            Catch ex As Exception
                MsgBox("error", MsgBoxStyle.Exclamation)
                MsgBox(ex.Message)
            End Try
            Class1.con.Close()
        End If
            End Sub
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
سؤال بخصوص كود برمجي - بواسطة huda mohmmed - 01-01-16, 02:36 AM
RE: سؤال بخصوص كود برمجي - بواسطة huda mohmmed - 01-01-16, 01:23 PM
RE: سؤال بخصوص كود برمجي - بواسطة huda mohmmed - 01-01-16, 10:38 PM


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم