📄 frmcalendarman.vb
字号:
Public Class frmCalendarMan
Inherits 生产管理系统.frmBase
Public bClose As Boolean = False
Private gridMouseDownTime As DateTime = New DateTime
#Region " Windows 窗体设计器生成的代码 "
Public Sub New()
MyBase.New()
'该调用是 Windows 窗体设计器所必需的。
InitializeComponent()
'在 InitializeComponent() 调用之后添加任何初始化
End Sub
'窗体重写 dispose 以清理组件列表。
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Windows 窗体设计器所必需的
Private components As System.ComponentModel.IContainer
'注意: 以下过程是 Windows 窗体设计器所必需的
'可以使用 Windows 窗体设计器修改此过程。
'不要使用代码编辑器修改它。
Friend WithEvents DataSet11 As 生产管理系统.DataSet1
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents txbEndDate As System.Windows.Forms.TextBox
Friend WithEvents txbBegDate As System.Windows.Forms.TextBox
Friend WithEvents txbPlanDate As System.Windows.Forms.TextBox
Friend WithEvents txbDate As System.Windows.Forms.TextBox
Friend WithEvents txbRemark As System.Windows.Forms.TextBox
Friend WithEvents SqlSelectCommand1 As System.Data.SqlClient.SqlCommand
Friend WithEvents SqlDataAdapter1 As System.Data.SqlClient.SqlDataAdapter
Friend WithEvents SqlSelectCommand2 As System.Data.SqlClient.SqlCommand
Friend WithEvents SqlInsertCommand1 As System.Data.SqlClient.SqlCommand
Friend WithEvents SqlUpdateCommand1 As System.Data.SqlClient.SqlCommand
Friend WithEvents SqlDeleteCommand1 As System.Data.SqlClient.SqlCommand
Friend WithEvents SqlConnection1 As System.Data.SqlClient.SqlConnection
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.DataSet11 = New 生产管理系统.DataSet1
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.txbRemark = New System.Windows.Forms.TextBox
Me.Label8 = New System.Windows.Forms.Label
Me.txbEndDate = New System.Windows.Forms.TextBox
Me.Label7 = New System.Windows.Forms.Label
Me.txbBegDate = New System.Windows.Forms.TextBox
Me.Label6 = New System.Windows.Forms.Label
Me.txbPlanDate = New System.Windows.Forms.TextBox
Me.Label5 = New System.Windows.Forms.Label
Me.txbDate = New System.Windows.Forms.TextBox
Me.Label4 = New System.Windows.Forms.Label
Me.SqlSelectCommand1 = New System.Data.SqlClient.SqlCommand
Me.SqlDataAdapter1 = New System.Data.SqlClient.SqlDataAdapter
Me.SqlDeleteCommand1 = New System.Data.SqlClient.SqlCommand
Me.SqlConnection1 = New System.Data.SqlClient.SqlConnection
Me.SqlInsertCommand1 = New System.Data.SqlClient.SqlCommand
Me.SqlSelectCommand2 = New System.Data.SqlClient.SqlCommand
Me.SqlUpdateCommand1 = New System.Data.SqlClient.SqlCommand
CType(Me.DataSet11, System.ComponentModel.ISupportInitialize).BeginInit()
Me.GroupBox1.SuspendLayout()
Me.SuspendLayout()
'
'DataSet11
'
Me.DataSet11.DataSetName = "DataSet1"
Me.DataSet11.Locale = New System.Globalization.CultureInfo("zh-CN")
'
'GroupBox1
'
Me.GroupBox1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.GroupBox1.Controls.Add(Me.txbRemark)
Me.GroupBox1.Controls.Add(Me.Label8)
Me.GroupBox1.Controls.Add(Me.txbEndDate)
Me.GroupBox1.Controls.Add(Me.Label7)
Me.GroupBox1.Controls.Add(Me.txbBegDate)
Me.GroupBox1.Controls.Add(Me.Label6)
Me.GroupBox1.Controls.Add(Me.txbPlanDate)
Me.GroupBox1.Controls.Add(Me.Label5)
Me.GroupBox1.Controls.Add(Me.txbDate)
Me.GroupBox1.Controls.Add(Me.Label4)
Me.GroupBox1.Location = New System.Drawing.Point(208, 80)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(328, 193)
Me.GroupBox1.TabIndex = 4
Me.GroupBox1.TabStop = False
'
'txbRemark
'
Me.txbRemark.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.DataSet11, "工厂日历.备注"))
Me.txbRemark.Location = New System.Drawing.Point(192, 64)
Me.txbRemark.Multiline = True
Me.txbRemark.Name = "txbRemark"
Me.txbRemark.Size = New System.Drawing.Size(100, 104)
Me.txbRemark.TabIndex = 9
Me.txbRemark.Text = ""
'
'Label8
'
Me.Label8.Location = New System.Drawing.Point(192, 32)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(32, 16)
Me.Label8.TabIndex = 8
Me.Label8.Text = "备注"
'
'txbEndDate
'
Me.txbEndDate.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.DataSet11, "工厂日历.结束日期"))
Me.txbEndDate.Location = New System.Drawing.Point(72, 144)
Me.txbEndDate.Name = "txbEndDate"
Me.txbEndDate.TabIndex = 7
Me.txbEndDate.Text = ""
'
'Label7
'
Me.Label7.Location = New System.Drawing.Point(16, 152)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(56, 16)
Me.Label7.TabIndex = 6
Me.Label7.Text = "结束日期"
'
'txbBegDate
'
Me.txbBegDate.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.DataSet11, "工厂日历.开始日期"))
Me.txbBegDate.Location = New System.Drawing.Point(72, 104)
Me.txbBegDate.Name = "txbBegDate"
Me.txbBegDate.TabIndex = 5
Me.txbBegDate.Text = ""
'
'Label6
'
Me.Label6.Location = New System.Drawing.Point(16, 112)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(56, 16)
Me.Label6.TabIndex = 4
Me.Label6.Text = "开始日期"
'
'txbPlanDate
'
Me.txbPlanDate.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.DataSet11, "工厂日历.计划期"))
Me.txbPlanDate.Location = New System.Drawing.Point(72, 64)
Me.txbPlanDate.Name = "txbPlanDate"
Me.txbPlanDate.TabIndex = 3
Me.txbPlanDate.Text = ""
'
'Label5
'
Me.Label5.Location = New System.Drawing.Point(24, 72)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(56, 16)
Me.Label5.TabIndex = 2
Me.Label5.Text = "计划期"
'
'txbDate
'
Me.txbDate.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.DataSet11, "工厂日历.年份"))
Me.txbDate.Location = New System.Drawing.Point(72, 24)
Me.txbDate.Name = "txbDate"
Me.txbDate.TabIndex = 1
Me.txbDate.Text = ""
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(40, 32)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(32, 16)
Me.Label4.TabIndex = 0
Me.Label4.Text = "年份"
'
'SqlDataAdapter1
'
Me.SqlDataAdapter1.DeleteCommand = Me.SqlDeleteCommand1
Me.SqlDataAdapter1.InsertCommand = Me.SqlInsertCommand1
Me.SqlDataAdapter1.SelectCommand = Me.SqlSelectCommand2
Me.SqlDataAdapter1.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "工厂日历", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("年份", "年份"), New System.Data.Common.DataColumnMapping("计划期", "计划期"), New System.Data.Common.DataColumnMapping("开始日期", "开始日期"), New System.Data.Common.DataColumnMapping("结束日期", "结束日期"), New System.Data.Common.DataColumnMapping("备注", "备注")})})
Me.SqlDataAdapter1.UpdateCommand = Me.SqlUpdateCommand1
'
'SqlDeleteCommand1
'
Me.SqlDeleteCommand1.CommandText = "DELETE FROM 工厂日历 WHERE (年份 = @Original_年份) AND (计划期 = @Original_计划期) AND (备注 = @O" & _
"riginal_备注 OR @Original_备注 IS NULL AND 备注 IS NULL) AND (开始日期 = @Original_开始日期) A" & _
"ND (结束日期 = @Original_结束日期)"
Me.SqlDeleteCommand1.Connection = Me.SqlConnection1
Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_年份", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "年份", System.Data.DataRowVersion.Original, Nothing))
Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_计划期", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "计划期", System.Data.DataRowVersion.Original, Nothing))
Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_备注", System.Data.SqlDbType.VarChar, 255, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "备注", System.Data.DataRowVersion.Original, Nothing))
Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_开始日期", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "开始日期", System.Data.DataRowVersion.Original, Nothing))
Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_结束日期", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "结束日期", System.Data.DataRowVersion.Original, Nothing))
'
'SqlConnection1
'
Me.SqlConnection1.ConnectionString = "workstation id=CS;packet size=4096;integrated security=SSPI;data source=cs;persis" & _
"t security info=False;initial catalog=mrpbook"
'
'SqlInsertCommand1
'
Me.SqlInsertCommand1.CommandText = "INSERT INTO 工厂日历(年份, 计划期, 开始日期, 结束日期, 备注) VALUES (@年份, @计划期, @开始日期, @结束日期, @备注); " & _
"SELECT 年份, 计划期, 开始日期, 结束日期, 备注 FROM 工厂日历 WHERE (年份 = @年份) AND (计划期 = @计划期)"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -