Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
我所说的在狐哥作品中,怎么也找不到这个窗口界面,所有的窗口我到找过了,找不到,是否隐藏了,还是用其他方法做的。我在点击“建立新单”后,转入该窗口界面,我也仔细分析了此按钮的源程序,由于水平有限,还望大师继续指导!
下面是 “建立新单”按钮的执行程序:
Dim tm As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker2")
Dim cm As WinForm.ComboBox = e.form.Controls("ComboBox8")
Dim tx As WinForm.TextBox = e.Form.Controls("TextBox7")
Dim yw As WinForm.TextBox = e.Form.Controls("TextBox8")
If tx.value Is Nothing Then
MessageBox.Show("请选择委托公司!", "提示")
tx.Select()
Return
End If
If tm.value Is Nothing Then
MessageBox.Show("请录入截关日期!", "提示")
tm.Select()
Return
End If
If cm.value Is Nothing Then
MessageBox.Show("请录入运输方式!", "提示")
cm.Select()
Return
End If
Dim ym As String = format(tm.value,"yyMMdd")
Dim cmd1 As New SQLCommand
Dim cmd2 As New SQLCommand
Dim cmd3 As New SQLCommand
Dim Key As Integer
cmd1.C
cmd2.C
cmd3.C
cmd1.commandText = "Select [编号] From [编号] Where [日期] = #" & tm.value & "#"
Key = cmd1.ExecuteScalar()
cmd2.commandText = "Update [编号] Set [编号] = " & (Key + 1) & " Where [编号] = " & Key & " And [日期] = #" & tm.value & "#"
cmd3.commandText = "Select Count(*) From [编号] Where [日期] = #" & tm.value & "#"
If cmd3.ExecuteScalar = 0 Then
cmd3.commandtext = "Insert Into 编号 (日期, 编号) Values(#" & tm.value & "#,1)"
cmd3.ExecuteNonQuery
End If
Do
If cmd2.ExecuteNonQuery() > 0 Then
Exit Do
Else
Key = cmd1.ExecuteScalar()
cmd2.commandText = "Update [编号] Set [编号] = " & (Key + 1) & " Where [编号] = " & Key & " And [日期] = #" & tm.value & "#"
End If
Loop
Dim dr As Row = Tables("业务录入").AddNew()
Dim dv As DataRow = DataTables("员工管理").find("员工姓名 = '" & yw.value & "'")
If dr IsNot Nothing Then
dr("客户") = tx.value
dr("日期") = tm.value
dr("运输方式") = cm.value
dr("操作") = Vars("用户名")
dr("业务员") = yw.value
Dim dgs As DataRow = DataTables("登录").datarows(0)
If dgs IsNot Nothing Then
If Vars("运输方式") = "进口" Then
dr("工作号") = dgs("进口") & ym & Format(Key,"00")
ElseIf Vars("运输方式") = "空运" Then
dr("工作号") = dgs("空运") & ym & Format(Key,"00")
Else
dr("工作号") = dgs("海运") & ym & Format(Key,"00")
End If
End If
End If
tm.value = Nothing
cm.value = Nothing
tx.value = Nothing
yw.value = Nothing
Forms("单证").Controls("TabControl1").SelectedIndex = 1
DataTables("业务录入").save()
呀: Forms("单证").Controls("TabControl1").SelectedIndex = 1 这个不是吗
我喜欢笨办法,关于单证录入,我所有的页面均放在窗口单证中,并用多个页面来转换的.
你进入后,将SPLITCONTAINER1的停靠设为NONE,并将其拉小一点,再点TABCONTROL1,将其属性的锚定设一边,并将其高设小一点,就能看到了.
其实都在TABCONTROL1中