📄 frmretrieve.vb
字号:
Public Class frmRetrieve
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
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
Friend WithEvents lblFirstName As System.Windows.Forms.Label
Friend WithEvents txtPassword As System.Windows.Forms.TextBox
Friend WithEvents lblEmail As System.Windows.Forms.Label
Friend WithEvents lblCustomerID As System.Windows.Forms.Label
Friend WithEvents txtLName As System.Windows.Forms.TextBox
Friend WithEvents txtEmail As System.Windows.Forms.TextBox
Friend WithEvents lblAddress As System.Windows.Forms.Label
Friend WithEvents txtID As System.Windows.Forms.TextBox
Friend WithEvents txtAddress As System.Windows.Forms.TextBox
Friend WithEvents lblPassword As System.Windows.Forms.Label
Friend WithEvents btnClose As System.Windows.Forms.Button
Friend WithEvents lblLastName As System.Windows.Forms.Label
Friend WithEvents txtFName As System.Windows.Forms.TextBox
Friend WithEvents lblCompany As System.Windows.Forms.Label
Friend WithEvents txtCompany As System.Windows.Forms.TextBox
Friend WithEvents btnRetrieve As System.Windows.Forms.Button
'Required by the Windows Form Designer
Private components As System.ComponentModel.Container
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.lblLastName = New System.Windows.Forms.Label()
Me.txtCompany = New System.Windows.Forms.TextBox()
Me.lblPassword = New System.Windows.Forms.Label()
Me.txtFName = New System.Windows.Forms.TextBox()
Me.txtAddress = New System.Windows.Forms.TextBox()
Me.lblAddress = New System.Windows.Forms.Label()
Me.lblFirstName = New System.Windows.Forms.Label()
Me.btnClose = New System.Windows.Forms.Button()
Me.lblCompany = New System.Windows.Forms.Label()
Me.txtPassword = New System.Windows.Forms.TextBox()
Me.txtID = New System.Windows.Forms.TextBox()
Me.lblCustomerID = New System.Windows.Forms.Label()
Me.txtLName = New System.Windows.Forms.TextBox()
Me.btnRetrieve = New System.Windows.Forms.Button()
Me.lblEmail = New System.Windows.Forms.Label()
Me.txtEmail = New System.Windows.Forms.TextBox()
Me.SuspendLayout()
'
'lblLastName
'
Me.lblLastName.AutoSize = True
Me.lblLastName.Location = New System.Drawing.Point(20, 194)
Me.lblLastName.Name = "lblLastName"
Me.lblLastName.Size = New System.Drawing.Size(62, 13)
Me.lblLastName.TabIndex = 8
Me.lblLastName.Text = "Last Name:"
'
'txtCompany
'
Me.txtCompany.Location = New System.Drawing.Point(88, 296)
Me.txtCompany.Name = "txtCompany"
Me.txtCompany.Size = New System.Drawing.Size(168, 20)
Me.txtCompany.TabIndex = 7
Me.txtCompany.Text = ""
'
'lblPassword
'
Me.lblPassword.AutoSize = True
Me.lblPassword.Location = New System.Drawing.Point(25, 130)
Me.lblPassword.Name = "lblPassword"
Me.lblPassword.Size = New System.Drawing.Size(57, 13)
Me.lblPassword.TabIndex = 4
Me.lblPassword.Text = "Password:"
'
'txtFName
'
Me.txtFName.Location = New System.Drawing.Point(88, 160)
Me.txtFName.Name = "txtFName"
Me.txtFName.Size = New System.Drawing.Size(168, 20)
Me.txtFName.TabIndex = 4
Me.txtFName.Text = ""
'
'txtAddress
'
Me.txtAddress.Location = New System.Drawing.Point(88, 224)
Me.txtAddress.Multiline = True
Me.txtAddress.Name = "txtAddress"
Me.txtAddress.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
Me.txtAddress.Size = New System.Drawing.Size(168, 57)
Me.txtAddress.TabIndex = 6
Me.txtAddress.Text = ""
'
'lblAddress
'
Me.lblAddress.AutoSize = True
Me.lblAddress.Location = New System.Drawing.Point(33, 227)
Me.lblAddress.Name = "lblAddress"
Me.lblAddress.Size = New System.Drawing.Size(49, 13)
Me.lblAddress.TabIndex = 10
Me.lblAddress.Text = "Address:"
'
'lblFirstName
'
Me.lblFirstName.AutoSize = True
Me.lblFirstName.Location = New System.Drawing.Point(19, 162)
Me.lblFirstName.Name = "lblFirstName"
Me.lblFirstName.Size = New System.Drawing.Size(63, 13)
Me.lblFirstName.TabIndex = 6
Me.lblFirstName.Text = "First Name:"
'
'btnClose
'
Me.btnClose.Location = New System.Drawing.Point(272, 296)
Me.btnClose.Name = "btnClose"
Me.btnClose.Size = New System.Drawing.Size(96, 23)
Me.btnClose.TabIndex = 8
Me.btnClose.Text = "Close"
'
'lblCompany
'
Me.lblCompany.AutoSize = True
Me.lblCompany.Location = New System.Drawing.Point(26, 296)
Me.lblCompany.Name = "lblCompany"
Me.lblCompany.Size = New System.Drawing.Size(56, 13)
Me.lblCompany.TabIndex = 12
Me.lblCompany.Text = "Company:"
'
'txtPassword
'
Me.txtPassword.Location = New System.Drawing.Point(88, 127)
Me.txtPassword.Name = "txtPassword"
Me.txtPassword.Size = New System.Drawing.Size(168, 20)
Me.txtPassword.TabIndex = 3
Me.txtPassword.Text = ""
'
'txtID
'
Me.txtID.Location = New System.Drawing.Point(88, 24)
Me.txtID.Name = "txtID"
Me.txtID.Size = New System.Drawing.Size(168, 20)
Me.txtID.TabIndex = 0
Me.txtID.Text = ""
'
'lblCustomerID
'
Me.lblCustomerID.AutoSize = True
Me.lblCustomerID.Location = New System.Drawing.Point(14, 27)
Me.lblCustomerID.Name = "lblCustomerID"
Me.lblCustomerID.Size = New System.Drawing.Size(68, 13)
Me.lblCustomerID.TabIndex = 0
Me.lblCustomerID.Text = "CustomerID:"
'
'txtLName
'
Me.txtLName.Location = New System.Drawing.Point(88, 192)
Me.txtLName.Name = "txtLName"
Me.txtLName.Size = New System.Drawing.Size(168, 20)
Me.txtLName.TabIndex = 5
Me.txtLName.Text = ""
'
'btnRetrieve
'
Me.btnRetrieve.Location = New System.Drawing.Point(272, 22)
Me.btnRetrieve.Name = "btnRetrieve"
Me.btnRetrieve.Size = New System.Drawing.Size(96, 23)
Me.btnRetrieve.TabIndex = 1
Me.btnRetrieve.Text = "Retrieve"
'
'lblEmail
'
Me.lblEmail.AutoSize = True
Me.lblEmail.Location = New System.Drawing.Point(42, 98)
Me.lblEmail.Name = "lblEmail"
Me.lblEmail.Size = New System.Drawing.Size(40, 13)
Me.lblEmail.TabIndex = 2
Me.lblEmail.Text = "E-mail:"
'
'txtEmail
'
Me.txtEmail.Location = New System.Drawing.Point(88, 95)
Me.txtEmail.Name = "txtEmail"
Me.txtEmail.Size = New System.Drawing.Size(168, 20)
Me.txtEmail.TabIndex = 2
Me.txtEmail.Text = ""
'
'frmRetrieve
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(376, 61)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.lblFirstName, Me.txtPassword, Me.lblEmail, Me.lblCustomerID, Me.txtLName, Me.btnRetrieve, Me.txtEmail, Me.lblAddress, Me.txtID, Me.txtAddress, Me.lblPassword, Me.btnClose, Me.lblLastName, Me.txtFName, Me.lblCompany, Me.txtCompany})
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "frmRetrieve"
Me.Text = "Get Customer Details"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click
Me.Close()
End Sub
Private Sub btnRetrieve_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRetrieve.Click
Try
Dim strEmail, strPassword, strFName, strLName, strAddress, strCompany As String
Dim cusCustomer As New Services.CustomerService()
cusCustomer.GetDetails(CInt(txtID.Text), strEmail, strPassword, strFName, strLName, _
strAddress, strCompany)
txtEmail.Text = strEmail
txtPassword.Text = strPassword
txtFName.Text = strFName
txtLName.Text = strLName
txtAddress.Text = strAddress
txtCompany.Text = strCompany
Me.Height = 352
Catch eException As Exception
MsgBox(eException.Message, , "Retrieve Failed")
End Try
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -