-- 作者:菜鸟foxtable
-- 发布时间:2009/3/13 15:35:00
-- [求助]谁能帮我设计并发布一个简单的管理软件
本来状态栏在登陆时已经显示好的.
此主题相关图片如下:001.jpg
但是一执行某模式窗口按钮代码就消失了....郁闷..
此主题相关图片如下:002.jpg
Dim str As string = e.form.Controls("TextBox1").Value Dim str1 As string Dim dt As DataTable Dim d As string = date.today Dim cmd As New SQLCommand cmd.C If str is nothing Then MsgBox("请输入结算ID!",64,"提示") e.form.Controls("TextBox1").select() Else cmd.CommandText = "select 住院ID from [H_ZYXX] where 住院ID = \'" & str & "\'" str1 = cmd.ExecuteScalar() If str1 is nothing Then MsgBox("找不到此结算号!请重新输入!",64,"提示") e.form.Controls("TextBox1").Value = nothing e.form.Controls("TextBox1").select() Else cmd.CommandText = "select 住院ID from [H_JE] where 住院ID = \'" & str & "\'" str1 = cmd.ExecuteScalar() If str1 is nothing Then cmd.CommandText = "select 住院ID,项目,规格,类别,单位,单价,用量*天数 AS 用量,round(单价*用量*天数,2) AS 金额 from [H_YIZ] where 住院ID = \'" & str & "\'" dt = cmd.ExecuteReader() Dim g As New GroupTableBuilder("清单",dt) g.Groups.AddDef("住院ID") g.Groups.AddDef("类别") g.Groups.AddDef("项目") g.Groups.AddDef("规格") g.Groups.AddDef("单位") g.Groups.AddDef("单价") g.Totals.AddDef("用量") g.Totals.AddDef("金额") g.Build() dim f As New Filler f.SourceTable = DataTables("清单") f.SourceCols = "住院ID,类别,项目,规格,单位,单价,用量" f.DataTable = DataTables("结算") f.DataCols = "住院ID,类别,项目,规格,单位,单价,用量" f.Fill() DataTables("结算").Save() cmd.CommandText = "UPDATE [H_ZYXX] SET 结算日期 = \'" & d & "\', 状态 = 2 WHERE 住院ID = \'" & str & "\'" cmd.ExecuteNonQuery() cmd.CommandText = "UPDATE [H_YIZ] SET 状态 = 2 WHERE 住院ID = \'" & str & "\'" cmd.ExecuteNonQuery() e.form.Controls("TextBox1").Value = nothing MsgBox("结算成功!",64,"提示") DataTables("住院信息").Load() e.form.Close() Else MsgBox("请不要重复结算!",64,"提示") e.form.Controls("TextBox1").Value = nothing e.form.Controls("TextBox1").select() End If End If End If
|