⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 accepttaskbook.aspx.vb

📁 一个很不错的实验室管理系统,用vb+sql编写,功能强大,界面美观
💻 VB
📖 第 1 页 / 共 4 页
字号:
                        & strAddress & "','" _
                        & txtTestObject.Text.Trim & "',1)"
                    Else
                        PubStrSql = "update acceptTaskbookNum set SHYCSH=" & AcceptNum _
                        & " where BXXH='" & txtIceModel.Text.Trim & "'" _
                        & " and SHYMD='" & txtTestObject.Text.Trim & "'" & " and DZH='" _
                        & strAddress & "'"
                    End If
                    If InStr(Trim(PubDataSet.Tables("taskbookobj").Rows(0)("testid")), "HR") = 0 Then
                        PubSqlCmd.CommandText = PubStrSql
                        PubSqlCmd.ExecuteNonQuery()
                    End If
                Else
                    Select Case txtTestObject.Text.Trim
                        Case "压机匹配"
                            PubStrSql = "select * from accepttaskbooknum where BXXH='" _
                            & txtIceModel.Text.Trim & "'" & " and SHYMD='" _
                            & txtTestObject.Text.Trim & "'" & " and DZH='" _
                            & strAddress & "'" & " and ZHGJGG='" _
                            & Trim(PubDataSet.Tables("MainPart").Rows(0)("GuiGe")) & "'"
                            tempString = "select * from accepttaskbooknum where BXXH='" _
                            & txtIceModel.Text.Trim & "'" & " and SHYMD='" _
                            & txtTestObject.Text.Trim & "'" & " and DZH='" _
                            & strAddress & "'"
                        Case "蒸发器\冷凝器改进"
                            PubStrSql = "select * from accepttaskbooknum where BXXH='" _
                            & txtIceModel.Text.Trim & "'" & " and SHYMD='" _
                            & txtTestObject.Text.Trim & "'" & " and DZH='" _
                            & strAddress & "'" _
                            & " and ZHGJGG='" _
                            & Trim(PubDataSet.Tables("MainPart").Rows(3)("GuiGe")) _
                            & Trim(PubDataSet.Tables("MainPart").Rows(5)("GuiGe")) _
                            & Trim(PubDataSet.Tables("MainPart").Rows(6)("GuiGe")) & "'"
                            tempString = "select * from accepttaskbooknum where BXXH='" _
                            & txtIceModel.Text.Trim & "'" & " and SHYMD='" _
                            & txtTestObject.Text.Trim & "'" & " and DZH='" _
                            & strAddress & "'"
                        Case "制冷剂"
                            PubStrSql = "select * from accepttaskbooknum where BXXH='" _
                            & txtIceModel.Text.Trim & "'" & " and SHYMD='" _
                            & txtTestObject.Text.Trim & "'" & " and DZH='" _
                            & strAddress & "'" _
                            & " and ZHGJGG='" _
                            & Trim(PubDataSet.Tables("TechPara").Rows(0)("Quantity")) & "'"
                            tempString = "select * from accepttaskbooknum where BXXH='" _
                            & txtIceModel.Text.Trim & "'" & " and SHYMD='" _
                            & txtTestObject.Text.Trim & "'" & " and DZH='" _
                            & strAddress & "'"
                        Case "发泡剂"
                            PubStrSql = "select * from accepttaskbooknum where BXXH='" _
                            & txtIceModel.Text.Trim & "'" & " and SHYMD='" _
                            & txtTestObject.Text.Trim & "'" & " and DZH='" _
                            & strAddress & "'" _
                            & " and ZHGJGG='" _
                            & Trim(PubDataSet.Tables("TechPara").Rows(8)("Quantity")) & "'"
                            tempString = "select * from accepttaskbooknum where BXXH='" _
                            & txtIceModel.Text.Trim & "'" & " and SHYMD='" _
                            & txtTestObject.Text.Trim & "'" & " and DZH='" _
                            & strAddress & "'"
                        Case "温控器"
                            PubStrSql = "select * from accepttaskbooknum where BXXH='" _
                            & txtIceModel.Text.Trim & "'" & " and SHYMD='" _
                            & txtTestObject.Text.Trim & "'" & " and DZH='" _
                            & strAddress & "'" _
                            & " and ZHGJGG='" _
                            & Trim(PubDataSet.Tables("MainPart").Rows(1)("GuiGe")) & "'"
                            tempString = "select * from accepttaskbooknum where BXXH='" _
                            & txtIceModel.Text.Trim & "'" & " and SHYMD='" _
                            & txtTestObject.Text.Trim & "'" & " and DZH='" _
                            & strAddress & "'"
                        Case "主控板"
                            PubStrSql = "select * from accepttaskbooknum where BXXH='" _
                            & txtIceModel.Text.Trim & "'" & " and SHYMD='" _
                            & txtTestObject.Text.Trim & "'" & " and DZH='" _
                            & strAddress & "'" _
                            & " and ZHGJGG='" _
                            & Trim(PubDataSet.Tables("MainPart").Rows(2)("GuiGe")) & "'"
                            tempString = "select * from accepttaskbooknum where BXXH='" _
                            & txtIceModel.Text.Trim & "'" & " and SHYMD='" _
                            & txtTestObject.Text.Trim & "'" & " and DZH='" _
                            & strAddress & "'"
                        Case Else
                            PubStrSql = "select * from accepttaskbooknum where BXXH='" _
                            & txtIceModel.Text.Trim & "'" & " and SHYMD='其它' and DZH='" _
                            & strAddress & "'"
                    End Select

                    If txtTestObject.Text.Trim = "压机匹配" Or _
                    txtTestObject.Text.Trim = "蒸发器\冷凝器改进" Or _
                    txtTestObject.Text.Trim = "制冷剂" Or _
                    txtTestObject.Text.Trim = "发泡剂" Or _
                    txtTestObject.Text.Trim = "温控器" Or _
                    txtTestObject.Text.Trim = "温控器" Then
                        PubDataAdapter.SelectCommand.CommandText = tempString
                        PubDataAdapter.Fill(PubDataSet, "ChangeNum")
                        ChangeNum = PubDataSet.Tables("ChangeNum").Rows.Count
                    End If

                    PubDataAdapter.SelectCommand.CommandText = PubStrSql
                    PubDataAdapter.Fill(PubDataSet, "AcceptNum")
                    If PubDataSet.Tables("AcceptNum").Rows.Count <> 0 Then
                        AcceptNum = PubDataSet.Tables("AcceptNum").Rows(0)("SHYCSH")
                        AcceptNum += 1
                    Else
                        AcceptNum = 1
                    End If
                    If PubDataSet.Tables("AcceptNum").Rows.Count = 0 Then
                        Select Case txtTestObject.Text.Trim
                            Case "压机匹配"
                                PubStrSql = "insert into AcceptTaskBookNum(BXXH,SHYMD,DZH," _
                                & "ZHGJGG,SHYCSH) values('" & txtIceModel.Text.Trim & "','" _
                                & txtTestObject.Text.Trim & "','" _
                                & strAddress & "','" _
                                & Trim(PubDataSet.Tables("MainPart").Rows(0)("GuiGe")) & "',1)"
                                ChangeNum += 1
                            Case "蒸发器\冷凝器改进"
                                PubStrSql = "insert into AcceptTaskBookNum(BXXH,SHYMD,DZH," _
                                & "ZHGJGG,SHYCSH) values('" & txtIceModel.Text.Trim & "','" _
                                & txtTestObject.Text.Trim & "','" _
                                & strAddress & "','" _
                                & Trim(PubDataSet.Tables("MainPart").Rows(3)("GuiGe")) _
                                & Trim(PubDataSet.Tables("MainPart").Rows(5)("GuiGe")) _
                                & Trim(PubDataSet.Tables("MainPart").Rows(6)("GuiGe")) & "',1)"
                                ChangeNum += 1
                            Case "制冷剂"
                                PubStrSql = "insert into AcceptTaskBookNum(BXXH,SHYMD,DZH," _
                                & "ZHGJGG,SHYCSH) values('" & txtIceModel.Text.Trim & "','" _
                                & txtTestObject.Text.Trim & "','" _
                                & strAddress & "','" _
                                & Trim(PubDataSet.Tables("TechPara").Rows(0)("Quantity")) & "',1)"
                                ChangeNum += 1
                            Case "发泡剂"
                                PubStrSql = "insert into AcceptTaskBookNum(BXXH,SHYMD,DZH," _
                                & "ZHGJGG,SHYCSH) values('" & txtIceModel.Text.Trim & "','" _
                                & txtTestObject.Text.Trim & "','" _
                                & strAddress & "','" _
                                & Trim(PubDataSet.Tables("TechPara").Rows(8)("Quantity")) & "',1)"
                                ChangeNum += 1
                            Case "温控器"
                                PubStrSql = "insert into AcceptTaskBookNum(BXXH,SHYMD,DZH," _
                                & "ZHGJGG,SHYCSH) values('" & txtIceModel.Text.Trim & "','" _
                                & txtTestObject.Text.Trim & "','" _
                                & strAddress & "','" _
                                & Trim(PubDataSet.Tables("MainPart").Rows(1)("GuiGe")) & "',1)"
                                ChangeNum += 1
                            Case "主控板"
                                PubStrSql = "insert into AcceptTaskBookNum(BXXH,SHYMD,DZH," _
                                & "ZHGJGG,SHYCSH) values('" & txtIceModel.Text.Trim & "','" _
                                & txtTestObject.Text.Trim & "','" _
                                & strAddress & "','" _
                                & Trim(PubDataSet.Tables("MainPart").Rows(2)("GuiGe")) & "',1)"
                                ChangeNum += 1
                            Case Else
                                PubStrSql = "insert into AcceptTaskBookNum(BXXH,SHYMD,DZH," _
                                & "ZHGJGG,SHYCSH) values('" & txtIceModel.Text.Trim _
                                & "','其它','" & strAddress _
                                & "','其它',1)"
                        End Select
                    Else
                        Select Case txtTestObject.Text.Trim
                            Case "压机匹配"
                                PubStrSql = "update acceptTaskbookNum set SHYCSH=" & AcceptNum _
                                & " where BXXH='" & txtIceModel.Text.Trim & "'" & " and SHYMD='" _
                                & txtTestObject.Text.Trim & "'" & " and DZH='" _
                                & strAddress & "'" & " and ZHGJGG='" _
                                & Trim(PubDataSet.Tables("MainPart").Rows(0)("GuiGe")) & "'"
                            Case "蒸发器\冷凝器改进"
                                PubStrSql = "update acceptTaskbookNum set SHYCSH=" & AcceptNum _
                                & " where BXXH='" & txtIceModel.Text.Trim & "'" & " and SHYMD='" _
                                & txtTestObject.Text.Trim & "'" & " and DZH='" _
                                & strAddress & "'" & " and ZHGJGG='" _
                                & Trim(PubDataSet.Tables("MainPart").Rows(3)("GuiGe")) _
                                & Trim(PubDataSet.Tables("MainPart").Rows(5)("GuiGe")) _
                                & Trim(PubDataSet.Tables("MainPart").Rows(6)("GuiGe")) & "'"
                            Case "制冷剂"
                                PubStrSql = "update acceptTaskbookNum set SHYCSH=" & AcceptNum _
                                & " where BXXH='" & txtIceModel.Text.Trim & "'" & " and SHYMD='" _
                                & txtTestObject.Text.Trim & "'" & " and DZH='" & strAddress _
                                & "'" & " and ZHGJGG='" _
                                & Trim(PubDataSet.Tables("TechPara").Rows(0)("Quantity")) & "'"
                            Case "发泡剂"
                                PubStrSql = "update acceptTaskbookNum set SHYCSH=" & AcceptNum _
                                & " where BXXH='" & txtIceModel.Text.Trim & "'" _
                                & " and SHYMD='" & txtTestObject.Text.Trim & "'" & " and DZH='" _
                                & strAddress & "'" & " and ZHGJGG='" _
                                & Trim(PubDataSet.Tables("TechPara").Rows(8)("Quantity")) & "'"
                            Case "温控器"
                                PubStrSql = "update acceptTaskbookNum set SHYCSH=" & AcceptNum _
                                & " where BXXH='" & txtIceModel.Text.Trim & "'" & " and SHYMD='" _
                                & txtTestObject.Text.Trim & "'" & " and DZH='" _
                                & strAddress & "'" & " and ZHGJGG='" _
                                & Trim(PubDataSet.Tables("MainPart").Rows(1)("GuiGe")) & "'"
                            Case "主控板"
                                PubStrSql = "update acceptTaskbookNum set SHYCSH=" & AcceptNum _
                                & " where BXXH='" & txtIceModel.Text.Trim & "'" _
                                & " and SHYMD='" & txtTestObject.Text.Trim & "'" & " and DZH='" _
                                & strAddress & "'" & " and ZHGJGG='" _
                                & Trim(PubDataSet.Tables("MainPart").Rows(2)("GuiGe")) & "'"
                            Case Else
                                PubStrSql = "update acceptTaskbookNum set SHYCSH=" & AcceptNum _
                                & " where BXXH='" & txtIceModel.Text.Trim & "'" _
                                & " and SHYMD='其它'" & " and DZH='" & strAddress & "'"
                        End Select
                    End If
                    If InStr(Trim(PubDataSet.Tables("taskbookobj").Rows(0)("testid")), "HR") = 0 Then
                        PubSqlCmd.CommandText = PubStrSql
                        PubSqlCmd.ExecuteNonQuery()
                    End If
                End If
            Else
                PubStrSql = "select * from accepttaskbooknum where BXXH='" _
                & txtIceModel.Text.Trim & "'" & " and SHYMD='其它' and DZH='" & strAddress & "'"
                PubDataAdapter.SelectCommand.CommandText = PubStrSql
                PubDataAdapter.Fill(PubDataSet, "AcceptNum")
                If PubDataSet.Tables("AcceptNum").Rows.Count <> 0 Then
                    AcceptNum = PubDataSet.Tables("AcceptNum").Rows(0)("SHYCSH")
                    AcceptNum += 1
                Else
                    AcceptNum = 1
                End If
                If PubDataSet.Tables("AcceptNum").Rows.Count = 0 Then

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -