毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 医学论文 >> 正文

医生处方系统论文+源程序 第20页

更新时间:2009-5-21:  来源:毕业论文
医生处方系统论文
End Sub
    Private Sub imAboutHelp_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles imAboutHelp.Click
        FormHelp.Show()
    End Sub
    Private Sub imUserManage_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles imUserManage.Click
        FormManage.Show()
    End Sub
    Private Sub tsmPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        FormPrint.Show()
    End Sub
End Class
-----------------------------------------------------------------------------------------------------------------------
                     代码3 FormBiographySet.vb窗体代码
-----------------------------------------------------------------------------------------------------------------------
Imports System.Data.SqlClient
Public Class FormBiographySet
        Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
        Dim dbobj As New ConnSqlServer.db
        Dim sql As String = "Insert into Strbiogrophy Values('" & Me.txtNo.Text & "','" & Me.txtName.Text & "','" & Me.txtAge.Text & "','" & Me.txtSex.Text & "','" & Me.txtTel.Text & "')"
        Dim strSql1 As String = "select Strno from Strbiogrophy where Strno = '" & Me.txtNo.Text & "'"
        Dim myReturn As DialogResult
        Dim dr As System.Data.SqlClient.SqlDataReader
        dr = dbobj.DataReader(strSql1)
        If Not dr.Read() Then
            If txtNo.Text <> "" And txtName.Text <> "" Then
                myReturn = Windows.Forms.MessageBox.Show("确定要添加资料吗?", "添加资料", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1)
                If myReturn = Windows.Forms.DialogResult.OK Then
                    dbobj.RunSql(sql)
                    MessageBox.Show("添加成功")
                End If
            Else
                MessageBox.Show("编号或姓名不能为空!")
            End If
        Else
            MessageBox.Show("此编号已存在")
        End If
    End Sub
    Private Sub btnCancle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancle.Click
        Me.txtNo.Text = ""
        Me.txtName.Text = ""
        Me.txtAge.Text = ""
        Me.txtSex.Text = ""
        Me.txtTel.Text = ""
    End Sub
End Class

-------------------------------------------------------------------------------------------------------
             代码4FormBiographySearch.vb窗体代码
-------------------------------------------------------------------------------------------------------
Imports System.Data.SqlClient
Public Class FormBiographySearch
    Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearch.Click
        Dim strSql As String = "select * from Strbiogrophy where Strname like '%" & Me.txtName.Text & "%'"
        Dim ds As New DataSet
        Dim strSql1 As String = "select Strname from Strbiogrophy where Strname like '%" & Me.txtName.Text & "%'"
        Dim dbobj As New ConnSqlServer.db
        Dim dr As System.Data.SqlClient.SqlDataReader
        dr = dbobj.DataReader(strSql1)
        If dr.Read() And Me.txtName.Text <> "" Then
            dbobj.ReturnDataSet(strSql, ds)
            Me.DataGridView1.DataSource = ds.Tables()
        Else
            MessageBox.Show("无此姓名!")
        End If
    End Sub
    Private Sub btnCancle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancle.Click
        Me.txtName.Text = ""
        Me.txtNo.Text = ""
        Me.txtAge.Text = ""
        Me.txtSex.Text = ""
        Me.txtTel.Text = ""
    End Sub
    Private Sub btnUpdata_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdata.Click
        Dim dbobj As New ConnSqlServer.db
        Dim Strno As String = txtNo.Text
        Dim strSql As String = "select * from Strbiogrophy"
        Dim ds As New DataSet
        Dim strSql1 As String = "select Strno from Strbiogrophy where Strno = '" & Me.txtNo.Text & "'"
        Dim myReturn As DialogResult
        Dim sql As String = "Update Strbiogrophy Set Strname='" & Me.txtName.Text & "', Strage='" & Me.txtAge.Text & "', Strsex='" & Me.txtSex.Text & "', Strtel='" & Me.txtTel.Text & "' where Strno='" & Strno & "'"
        Dim dr As System.Data.SqlClient.SqlDataReader
        dr = dbobj.DataReader(strSql1)
        If dr.Read() Then
                If txtNo.Text <> "" And txtName.Text <> "" Then
                myReturn = Windows.Forms.MessageBox.Show("确定要修改资料吗?", "修改资料", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1)
                If myReturn = Windows.Forms.DialogResult.OK Then
                    dbobj.RunSql(sql)
                    MessageBox.Show("修改成功")
                    dbobj.ReturnDataSet(strSql, ds)
                    Me.DataGridView1.DataSource = ds.Tables(0)
                End If
            Else
                MessageBox.Show("编号和姓名不能为空!")
            End If
        Else
            MessageBox.Show("无此编号")
        End If
    End Sub
    Private Sub FormBiographySearch_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        btnUpdata.Enabled = False
        btnDelete.Enabled = False
        Dim dbobj As New ConnSqlServer.db
        Dim strSql As String = "select * from Strbiogrophy"
        Dim ds As New DataSet
        dbobj.ReturnDataSet(strSql, ds)
        Me.DataGridView1.DataSource = ds.Tables(0)
    End Sub
    Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btndelete.Click
        Dim dbobj As New ConnSqlServer.db
        Dim Strno As String = txtNo.Text
        Dim sql As String = "Delete from Strbiogrophy where Strno='" & Strno & "'"
        Dim strSql As String = "select * from Strbiogrophy"
        Dim ds As New DataSet
        Dim strSql1 As String = "select Strno from Strbiogrophy where Strno = '" & Me.txtNo.Text & "'"
        Dim myReturn As DialogResult
        Dim dr As System.Data.SqlClient.SqlDataReader
        dr = dbobj.DataReader(strSql1)
        If dr.Read() Then
                If txtNo.Text <> "" Then
                myReturn = Windows.Forms.MessageBox.Show("确定要删除资料吗?", "删除资料", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1)
                If myReturn = Windows.Forms.DialogResult.OK Then
                    dbobj.RunSql(sql)
                    MessageBox.Show("删除成功")
                    dbobj.ReturnDataSet(strSql, ds)
                    Me.DataGridView1.DataSource = ds.Tables(0)
                    Me.txtName.Text = ""
                    Me.txtNo.Text = ""
                    Me.txtAge.Text = ""
                    Me.txtSex.Text = ""
                    Me.txtTel.Text = ""
                End If
            Else
                MessageBox.Show("编号不能为空!")
            End If
        Else

 << 上一页  [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]  ... 下一页  >> 

医生处方系统论文+源程序 第20页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。