📄 frmagent.vb
字号:
' Human Resources Management System (HRMS)
'
' Programmed by: Nura Tijjani Abubakar (ntagrafix@yahoo.com)
' Submitted to: Mr. Ravindran Kanapathy
'
' Oxford Brookes University (OBU)
' Final Year Project (November, 2007)
Imports System.Data
Imports System.Data.OleDb
Public Class frmAgent
Inherits System.Windows.Forms.Form
Dim oDetails As Details
Dim oValidation As New Validation
Dim oInsert As New Insert
Dim Operation As String 'To verify ADD or EDIT/UPDATE or DELETE
Dim cid As Integer
#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
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'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.
Friend WithEvents btnNew As System.Windows.Forms.Button
Friend WithEvents btnEdit As System.Windows.Forms.Button
Friend WithEvents btnSave As System.Windows.Forms.Button
Friend WithEvents btnClose As System.Windows.Forms.Button
Friend WithEvents pnlDetails As System.Windows.Forms.Panel
Friend WithEvents txtContact As System.Windows.Forms.TextBox
Friend WithEvents txtEmail As System.Windows.Forms.TextBox
Friend WithEvents txtFax As System.Windows.Forms.TextBox
Friend WithEvents txtMobile As System.Windows.Forms.TextBox
Friend WithEvents txtPhone As System.Windows.Forms.TextBox
Friend WithEvents txtPincode As System.Windows.Forms.TextBox
Friend WithEvents txtCity As System.Windows.Forms.TextBox
Friend WithEvents txtAddress As System.Windows.Forms.TextBox
Friend WithEvents txtName As System.Windows.Forms.TextBox
Friend WithEvents Label10 As System.Windows.Forms.Label
Friend WithEvents Label9 As System.Windows.Forms.Label
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents dgAgent As System.Windows.Forms.DataGrid
Friend WithEvents DataGridTableStyle1 As System.Windows.Forms.DataGridTableStyle
Friend WithEvents AName As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents Address As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents btnDelete As System.Windows.Forms.Button
Friend WithEvents btnCancel As System.Windows.Forms.Button
Friend WithEvents ID As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents City As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents ContactPerson As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents Phone As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents Pincode As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents Mobile As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents Fax As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents Email As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents DA As System.Data.OleDb.OleDbDataAdapter
Friend WithEvents OleDbConnection1 As System.Data.OleDb.OleDbConnection
Friend WithEvents Ds1 As HRMS.DS
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents OleDbConnection2 As System.Data.OleDb.OleDbConnection
Friend WithEvents OleDbSelectCommand1 As System.Data.OleDb.OleDbCommand
Friend WithEvents OleDbInsertCommand1 As System.Data.OleDb.OleDbCommand
Friend WithEvents OleDbUpdateCommand1 As System.Data.OleDb.OleDbCommand
Friend WithEvents OleDbDeleteCommand1 As System.Data.OleDb.OleDbCommand
Friend WithEvents OleDbConnection3 As System.Data.OleDb.OleDbConnection
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmAgent))
Me.btnNew = New System.Windows.Forms.Button
Me.btnEdit = New System.Windows.Forms.Button
Me.btnSave = New System.Windows.Forms.Button
Me.btnClose = New System.Windows.Forms.Button
Me.pnlDetails = New System.Windows.Forms.Panel
Me.txtContact = New System.Windows.Forms.TextBox
Me.Ds1 = New HRMS.DS
Me.txtEmail = New System.Windows.Forms.TextBox
Me.txtFax = New System.Windows.Forms.TextBox
Me.txtMobile = New System.Windows.Forms.TextBox
Me.txtPhone = New System.Windows.Forms.TextBox
Me.txtPincode = New System.Windows.Forms.TextBox
Me.txtCity = New System.Windows.Forms.TextBox
Me.txtAddress = New System.Windows.Forms.TextBox
Me.txtName = New System.Windows.Forms.TextBox
Me.Label10 = New System.Windows.Forms.Label
Me.Label9 = New System.Windows.Forms.Label
Me.Label8 = New System.Windows.Forms.Label
Me.Label7 = New System.Windows.Forms.Label
Me.Label6 = New System.Windows.Forms.Label
Me.Label5 = New System.Windows.Forms.Label
Me.Label4 = New System.Windows.Forms.Label
Me.Label3 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.dgAgent = New System.Windows.Forms.DataGrid
Me.DataGridTableStyle1 = New System.Windows.Forms.DataGridTableStyle
Me.ID = New System.Windows.Forms.DataGridTextBoxColumn
Me.AName = New System.Windows.Forms.DataGridTextBoxColumn
Me.Address = New System.Windows.Forms.DataGridTextBoxColumn
Me.City = New System.Windows.Forms.DataGridTextBoxColumn
Me.Pincode = New System.Windows.Forms.DataGridTextBoxColumn
Me.Phone = New System.Windows.Forms.DataGridTextBoxColumn
Me.Mobile = New System.Windows.Forms.DataGridTextBoxColumn
Me.Fax = New System.Windows.Forms.DataGridTextBoxColumn
Me.Email = New System.Windows.Forms.DataGridTextBoxColumn
Me.ContactPerson = New System.Windows.Forms.DataGridTextBoxColumn
Me.btnDelete = New System.Windows.Forms.Button
Me.btnCancel = New System.Windows.Forms.Button
Me.DA = New System.Data.OleDb.OleDbDataAdapter
Me.OleDbDeleteCommand1 = New System.Data.OleDb.OleDbCommand
Me.OleDbConnection3 = New System.Data.OleDb.OleDbConnection
Me.OleDbInsertCommand1 = New System.Data.OleDb.OleDbCommand
Me.OleDbSelectCommand1 = New System.Data.OleDb.OleDbCommand
Me.OleDbUpdateCommand1 = New System.Data.OleDb.OleDbCommand
Me.OleDbConnection2 = New System.Data.OleDb.OleDbConnection
Me.OleDbConnection1 = New System.Data.OleDb.OleDbConnection
Me.Label11 = New System.Windows.Forms.Label
Me.pnlDetails.SuspendLayout()
CType(Me.Ds1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.dgAgent, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'btnNew
'
Me.btnNew.BackColor = System.Drawing.Color.Chocolate
Me.btnNew.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnNew.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnNew.ForeColor = System.Drawing.Color.Black
Me.btnNew.Location = New System.Drawing.Point(166, 56)
Me.btnNew.Name = "btnNew"
Me.btnNew.TabIndex = 1
Me.btnNew.Text = "&New"
'
'btnEdit
'
Me.btnEdit.BackColor = System.Drawing.Color.Chocolate
Me.btnEdit.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnEdit.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnEdit.ForeColor = System.Drawing.Color.Black
Me.btnEdit.Location = New System.Drawing.Point(366, 56)
Me.btnEdit.Name = "btnEdit"
Me.btnEdit.TabIndex = 12
Me.btnEdit.Text = "&Edit"
'
'btnSave
'
Me.btnSave.BackColor = System.Drawing.Color.Chocolate
Me.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnSave.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnSave.ForeColor = System.Drawing.Color.Black
Me.btnSave.Location = New System.Drawing.Point(266, 56)
Me.btnSave.Name = "btnSave"
Me.btnSave.TabIndex = 11
Me.btnSave.Text = "&Save"
'
'btnClose
'
Me.btnClose.BackColor = System.Drawing.Color.Chocolate
Me.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnClose.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnClose.ForeColor = System.Drawing.Color.Black
Me.btnClose.Location = New System.Drawing.Point(339, 456)
Me.btnClose.Name = "btnClose"
Me.btnClose.Size = New System.Drawing.Size(128, 23)
Me.btnClose.TabIndex = 15
Me.btnClose.Text = "&Close Agent"
'
'pnlDetails
'
Me.pnlDetails.Controls.Add(Me.txtContact)
Me.pnlDetails.Controls.Add(Me.txtEmail)
Me.pnlDetails.Controls.Add(Me.txtFax)
Me.pnlDetails.Controls.Add(Me.txtMobile)
Me.pnlDetails.Controls.Add(Me.txtPhone)
Me.pnlDetails.Controls.Add(Me.txtPincode)
Me.pnlDetails.Controls.Add(Me.txtCity)
Me.pnlDetails.Controls.Add(Me.txtAddress)
Me.pnlDetails.Controls.Add(Me.txtName)
Me.pnlDetails.Controls.Add(Me.Label10)
Me.pnlDetails.Controls.Add(Me.Label9)
Me.pnlDetails.Controls.Add(Me.Label8)
Me.pnlDetails.Controls.Add(Me.Label7)
Me.pnlDetails.Controls.Add(Me.Label6)
Me.pnlDetails.Controls.Add(Me.Label5)
Me.pnlDetails.Controls.Add(Me.Label4)
Me.pnlDetails.Controls.Add(Me.Label3)
Me.pnlDetails.Controls.Add(Me.Label2)
Me.pnlDetails.Location = New System.Drawing.Point(43, 296)
Me.pnlDetails.Name = "pnlDetails"
Me.pnlDetails.Size = New System.Drawing.Size(720, 152)
Me.pnlDetails.TabIndex = 24
'
'txtContact
'
Me.txtContact.BackColor = System.Drawing.Color.White
Me.txtContact.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.txtContact.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.Ds1, "Agent.ContactPerson"))
Me.txtContact.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtContact.ForeColor = System.Drawing.Color.Black
Me.txtContact.Location = New System.Drawing.Point(104, 32)
Me.txtContact.Name = "txtContact"
Me.txtContact.ReadOnly = True
Me.txtContact.Size = New System.Drawing.Size(216, 20)
Me.txtContact.TabIndex = 3
Me.txtContact.Text = ""
'
'Ds1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -