?? 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 + -