📄 dailydataset.designer.vb
字号:
param.IsNullable = true
param.SourceColumn = "W_month"
Me._adapter.UpdateCommand.Parameters.Add(param)
param = New System.Data.SqlServerCe.SqlCeParameter
param.ParameterName = "@p3"
param.DbType = System.Data.DbType.Int32
param.IsNullable = true
param.SourceColumn = "w_day"
Me._adapter.UpdateCommand.Parameters.Add(param)
param = New System.Data.SqlServerCe.SqlCeParameter
param.ParameterName = "@p4"
param.IsNullable = true
param.SourceColumn = "Weather"
Me._adapter.UpdateCommand.Parameters.Add(param)
param = New System.Data.SqlServerCe.SqlCeParameter
param.ParameterName = "@p5"
param.DbType = System.Data.DbType.DateTime
param.IsNullable = true
param.SourceColumn = "R_time"
Me._adapter.UpdateCommand.Parameters.Add(param)
param = New System.Data.SqlServerCe.SqlCeParameter
param.ParameterName = "@p6"
param.IsNullable = true
param.SourceColumn = "M_daily"
Me._adapter.UpdateCommand.Parameters.Add(param)
param = New System.Data.SqlServerCe.SqlCeParameter
param.ParameterName = "@p7"
param.IsNullable = true
param.SourceColumn = "M_mood"
Me._adapter.UpdateCommand.Parameters.Add(param)
param = New System.Data.SqlServerCe.SqlCeParameter
param.ParameterName = "@p8"
param.DbType = System.Data.DbType.Int32
param.IsNullable = true
param.SourceColumn = "M_ID"
param.SourceVersion = System.Data.DataRowVersion.Original
Me._adapter.UpdateCommand.Parameters.Add(param)
End Sub
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Private Sub InitConnection()
Me._connection = New System.Data.SqlServerCe.SqlCeConnection
Me._connection.ConnectionString = ("Data Source =" _
+ (System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.GetName.CodeBase) + "\daily.sdf;"))
End Sub
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Private Sub InitCommandCollection()
Me._commandCollection = New System.Data.SqlServerCe.SqlCeCommand(0) {}
Me._commandCollection(0) = New System.Data.SqlServerCe.SqlCeCommand
Me._commandCollection(0).Connection = Me.Connection
Me._commandCollection(0).CommandText = "SELECT [W_year], [W_month], [w_day], [Weather], [R_time], [M_daily], [M_ID],[M_mo"& _
"od] FROM [Daily]"
Me._commandCollection(0).CommandType = System.Data.CommandType.Text
End Sub
<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)> _
Public Overloads Overridable Function Fill(ByVal dataTable As dailyDataSet.DailyDataTable) As Integer
Me.Adapter.SelectCommand = Me.CommandCollection(0)
If (Me.ClearBeforeFill = true) Then
dataTable.Clear
End If
Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
Return returnValue
End Function
<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.[Select], true)> _
Public Overloads Overridable Function GetData() As dailyDataSet.DailyDataTable
Me.Adapter.SelectCommand = Me.CommandCollection(0)
Dim dataTable As dailyDataSet.DailyDataTable = New dailyDataSet.DailyDataTable
Me.Adapter.Fill(dataTable)
Return dataTable
End Function
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Overloads Overridable Function Update(ByVal dataTable As dailyDataSet.DailyDataTable) As Integer
Return Me.Adapter.Update(dataTable)
End Function
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Overloads Overridable Function Update(ByVal dataSet As dailyDataSet) As Integer
Return Me.Adapter.Update(dataSet, "Daily")
End Function
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Overloads Overridable Function Update(ByVal dataRow As System.Data.DataRow) As Integer
Return Me.Adapter.Update(New System.Data.DataRow() {dataRow})
End Function
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Overloads Overridable Function Update(ByVal dataRows() As System.Data.DataRow) As Integer
Return Me.Adapter.Update(dataRows)
End Function
<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)> _
Public Overloads Overridable Function Delete(ByVal p1 As Integer) As Integer
Me.Adapter.DeleteCommand.Parameters(0).Value = CType(p1,Integer)
Dim previousConnectionState As System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
If ((Me.Adapter.DeleteCommand.Connection.State And System.Data.ConnectionState.Open) _
<> System.Data.ConnectionState.Open) Then
Me.Adapter.DeleteCommand.Connection.Open
End If
Try
Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
Return returnValue
Finally
If (previousConnectionState = System.Data.ConnectionState.Closed) Then
Me.Adapter.DeleteCommand.Connection.Close
End If
End Try
End Function
<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)> _
Public Overloads Overridable Function Insert(ByVal p1 As Integer, ByVal p2 As Integer, ByVal p3 As Integer, ByVal p4 As String, ByVal p5 As System.Nullable(Of Date), ByVal p6 As String, ByVal p7 As String) As Integer
Me.Adapter.InsertCommand.Parameters(0).Value = CType(p1,Integer)
Me.Adapter.InsertCommand.Parameters(1).Value = CType(p2,Integer)
Me.Adapter.InsertCommand.Parameters(2).Value = CType(p3,Integer)
If (p4 Is Nothing) Then
Me.Adapter.InsertCommand.Parameters(3).Value = System.DBNull.Value
Else
Me.Adapter.InsertCommand.Parameters(3).Value = CType(p4,String)
End If
If (p5.HasValue = true) Then
Me.Adapter.InsertCommand.Parameters(4).Value = CType(p5.Value,Date)
Else
Me.Adapter.InsertCommand.Parameters(4).Value = System.DBNull.Value
End If
If (p6 Is Nothing) Then
Me.Adapter.InsertCommand.Parameters(5).Value = System.DBNull.Value
Else
Me.Adapter.InsertCommand.Parameters(5).Value = CType(p6,String)
End If
If (p7 Is Nothing) Then
Me.Adapter.InsertCommand.Parameters(6).Value = System.DBNull.Value
Else
Me.Adapter.InsertCommand.Parameters(6).Value = CType(p7,String)
End If
Dim previousConnectionState As System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
If ((Me.Adapter.InsertCommand.Connection.State And System.Data.ConnectionState.Open) _
<> System.Data.ConnectionState.Open) Then
Me.Adapter.InsertCommand.Connection.Open
End If
Try
Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
Return returnValue
Finally
If (previousConnectionState = System.Data.ConnectionState.Closed) Then
Me.Adapter.InsertCommand.Connection.Close
End If
End Try
End Function
<System.Diagnostics.DebuggerNonUserCodeAttribute(), _
System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)> _
Public Overloads Overridable Function Update(ByVal p1 As Integer, ByVal p2 As Integer, ByVal p3 As Integer, ByVal p4 As String, ByVal p5 As System.Nullable(Of Date), ByVal p6 As String, ByVal p7 As String, ByVal p8 As Integer) As Integer
Me.Adapter.UpdateCommand.Parameters(0).Value = CType(p1,Integer)
Me.Adapter.UpdateCommand.Parameters(1).Value = CType(p2,Integer)
Me.Adapter.UpdateCommand.Parameters(2).Value = CType(p3,Integer)
If (p4 Is Nothing) Then
Me.Adapter.UpdateCommand.Parameters(3).Value = System.DBNull.Value
Else
Me.Adapter.UpdateCommand.Parameters(3).Value = CType(p4,String)
End If
If (p5.HasValue = true) Then
Me.Adapter.UpdateCommand.Parameters(4).Value = CType(p5.Value,Date)
Else
Me.Adapter.UpdateCommand.Parameters(4).Value = System.DBNull.Value
End If
If (p6 Is Nothing) Then
Me.Adapter.UpdateCommand.Parameters(5).Value = System.DBNull.Value
Else
Me.Adapter.UpdateCommand.Parameters(5).Value = CType(p6,String)
End If
If (p7 Is Nothing) Then
Me.Adapter.UpdateCommand.Parameters(6).Value = System.DBNull.Value
Else
Me.Adapter.UpdateCommand.Parameters(6).Value = CType(p7,String)
End If
Me.Adapter.UpdateCommand.Parameters(7).Value = CType(p8,Integer)
Dim previousConnectionState As System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
If ((Me.Adapter.UpdateCommand.Connection.State And System.Data.ConnectionState.Open) _
<> System.Data.ConnectionState.Open) Then
Me.Adapter.UpdateCommand.Connection.Open
End If
Try
Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
Return returnValue
Finally
If (previousConnectionState = System.Data.ConnectionState.Closed) Then
Me.Adapter.UpdateCommand.Connection.Close
End If
End Try
End Function
End Class
<System.ComponentModel.DesignerCategoryAttribute("code"), _
System.ComponentModel.DataObjectAttribute(true)> _
Partial Public Class Look_ConfigTableAdapter
Inherits System.ComponentModel.Component
Private WithEvents _adapter As System.Data.SqlServerCe.SqlCeDataAdapter
Private _connection As System.Data.SqlServerCe.SqlCeConnection
Private _commandCollection() As System.Data.SqlServerCe.SqlCeCommand
Private _clearBeforeFill As Boolean
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Sub New()
MyBase.New
Me.ClearBeforeFill = true
End Sub
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Private ReadOnly Property Adapter() As System.Data.SqlServerCe.SqlCeDataAdapter
Get
If (Me._adapter Is Nothing) Then
Me.InitAdapter
End If
Return Me._adapter
End Get
End Property
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Friend Property Connection() As System.Data.SqlServerCe.SqlCeConnection
Get
If (Me._connection Is Nothing) Then
Me.InitConnection
End If
Return Me._connection
End Get
Set
Me._connection = value
If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
Me.Adapter.InsertCommand.Connection = value
End If
If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
Me.Adapter.DeleteCommand.Connection = value
End If
If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
Me.Adapter.UpdateCommand.Connection = value
End If
Dim i As Integer = 0
Do While (i < Me.CommandCollection.Length)
If (Not (Me.CommandCollection(i)) Is Nothing) Then
CType(Me.CommandCollection(i),System.Data.SqlServerCe.SqlCeCommand).Connection = value
End If
i = (i + 1)
Loop
End Set
End Property
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Protected ReadOnly Property CommandCollection() As System.Data.SqlServerCe.SqlCeCommand()
Get
If (Me._commandCollection Is Nothing) Then
Me.InitCommandCollection
End If
Return Me._commandCollection
End Get
End Property
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Property ClearBeforeFill() As Boolean
Get
Return Me._clearBeforeFill
End Get
Set
Me._clearBeforeFill = value
End Set
End Property
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Private Sub InitAdapter()
Me._adapter = New System.Data.SqlServerCe.SqlCeDataAdapter
Dim tableMapping As System.Data.Common.DataTableMapping = New System.Data.Common.DataTableMapping
tableMapping.SourceTable = "Table"
tableMapping.DataSetTable = "Look_Config"
tableMapping.ColumnMappings.Add("Font", "Font")
tableMapping.ColumnMappings.Add("F_Size", "F_Size")
tableMapping.ColumnMappings.Add("Backcolor", "Backcolor")
Me._adapter.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -