hi All
am using vb2003, i need help on BLL and DAL
i have this class as my BLL
Public Class PropertyBLL
Private num_key As Integer
Private Extension As Integer
Private Cell_ID As Integer
Private Actual_Extent As Integer
Private Lis_key As String
Private Func_key As String
Private Geocode As String
Private Prop_Category_ID As Integer
Private Non_Discreet_Valid As Integer
Property Num_keyp() As Integer
Get
Num_keyp = num_key
End Get
Set(ByVal Value As Integer)
If Value.ToString > 4 Then
num_key = Value
Else
Throw New PropertyException("Num_key should be Four Digits.", "Num key")
End If
End Set
End Property
Property Extensionp() As Integer
Get
Extensionp = Extension
End Get
Set(ByVal Value As Integer)
If Value <= 0 Then
Throw New PropertyException("Extension Not Recognised.", "Extension")
Else
Extension = Value
End If
End Set
End Property
Property Cell_IDp() As Integer
Get
Cell_IDp = Cell_ID
End Get
Set(ByVal Value As Integer)
If Value <= 22 Then
Cell_ID = Value
Else
Throw New PropertyException( _
"Cell ID Not Recognised.", "Cell ID")
End If
End Set
End Property
Property Actual_Extentp() As Integer
Get
Actual_Extentp = Actual_Extent
End Get
Set(ByVal Value As Integer)
Actual_Extent = Value
End Set
End Property
Property Lis_keyp() As String
Get
Lis_keyp = Lis_key
End Get
Set(ByVal Value As String)
Lis_key = Value
End Set
End Property
Property Func_keyp() As String
Get
Func_keyp = Func_key
End Get
Set(ByVal Value As String)
Func_key = Value
End Set
End Property
Property Geocodep() As String
Get
Geocodep = Geocode
End Get
Set(ByVal Value As String)
Geocode = Value
End Set
End Property
Property Prop_Category_IDp() As Integer
Get
Prop_Category_IDp = Prop_Category_ID
End Get
Set(ByVal Value As Integer)
Prop_Category_ID = GetCategory(Func_key)
End Set
End Property
Property Non_Discreet_Validp() As Integer
Get
Non_Discreet_Validp = Non_Discreet_Valid
End Get
Set(ByVal Value As Integer)
Non_Discreet_Valid = 1
End Set
End Property
'Constrctor for my Class
Sub New()
Non_Discreet_Valid = 1
End Sub
Function GetCategory(ByVal Func_key As String)
If Func_key.Substring(5, 5) = "PV000" Then
Prop_Category_ID = 1
ElseIf Func_key.Substring(1, 5) = "PVDIF" Then
Prop_Category_ID = 2
ElseIf Func_key.Substring(1, 5) = "PVNTR" Then
Prop_Category_ID = 3
ElseIf Func_key.Substring(1, 5) = "GEOSS" Then
Prop_Category_ID = 12
ElseIf Func_key.Substring(1, 5) = "PVCLP" Then
Prop_Category_ID = 5
ElseIf Func_key.Substring(1, 5) = "PVWOP" Then
Prop_Category_ID = 4
Else
MessageBox.Show("We dont Have Any Functional Key like that", "Warning", MessageBoxButtons.OK)
End If
End Function
End Class
Public Class PropertyException
Inherits System.ApplicationException
Private mstrFieldInError As String
Sub New(ByVal strMessage As String, ByVal strFieldInError As String)
'set the Message for the New Exception
MyBase.New(strMessage)
mstrFieldInError = strFieldInError
End Sub
Public ReadOnly Property FieldInError() As String
Get
FieldInError = mstrFieldInError
End Get
End Property
End Class
The Class Validates fine.
After that i have Created the Component Class and i named it "PropertyDal", that where my sql will reside.
The Following Code is my DaL
Imports System.Data.SqlClient
Imports Property_ADD_ALL.Form1
Public Class PropertyDal
Inherits System.ComponentModel.Component
#Region " Component Designer generated code "
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
MyClass.New()
'Required for Windows.Forms Class Composition Designer support
Container.Add(Me)
End Sub
Public Sub New()
MyBase.New()
'This call is required by the Component Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Component 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 Component Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Component Designer
'It can be modified using the Component Designer.
'Do not modify it using the code editor.
Friend WithEvents SqlSelectCommand1 As System.Data.SqlClient.SqlCommand
Friend WithEvents SqlInsertCommand1 As System.Data.SqlClient.SqlCommand
Friend WithEvents SqlUpdateCommand1 As System.Data.SqlClient.SqlCommand
'Friend WithEvents SqlArchiveCommand1 As System.Data.SqlClient.SqlCommand
Friend WithEvents SqlConnection1 As System.Data.SqlClient.SqlConnection
Friend WithEvents da As System.Data.SqlClient.SqlDataAdapter
Friend WithEvents Ds As Property_ADD_ALL.ds
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.SqlSelectCommand1 = New System.Data.SqlClient.SqlCommand
Me.SqlInsertCommand1 = New System.Data.SqlClient.SqlCommand
Me.SqlUpdateCommand1 = New System.Data.SqlClient.SqlCommand
' Me.SqlArchiveCommand1 = New System.Data.SqlClient.SqlCommand
Me.SqlConnection1 = New System.Data.SqlClient.SqlConnection
Me.da = New System.Data.SqlClient.SqlDataAdapter
Me.Ds = New Property_ADD_ALL.ds
CType(Me.Ds, System.ComponentModel.ISupportInitialize).BeginInit()
'
'SqlSelectCommand1
'
Me.SqlSelectCommand1.Connection = Me.SqlConnection1
'
'SqlSelectCommand2
Me.SqlSelectCommand1.CommandText = "select Property_ID,Num_key,Extension,Cell_ID, " & _
" Actual_Extent,Lis_key,Func_key,Geocode,Prop_category_ID from Property"
Me.SqlSelectCommand1.Connection = Me.SqlConnection1
'SqlInsertCommand1
'
Me.SqlInsertCommand1.CommandText = "INSERT INTO PROPERTY(NUM_KEY, EXTENSION," & _
", CELL_ID, ACTUAL_EXTENT," & _
"PROP_CATEGORY_ID," & _
"LIS_KEY,FUNC_KEY," & _
" NON_DISCREET_VALID, GEOCODE) VALUES (@" & _
"@NUM_KEY, @EXTENSION, @CELL_ID," & _
" @ACTUAL_EXTENT," & _
" @PROP_CATEGORY_ID," & _
"@LIS_KEY, @FUNC_KEY," & _
"@NON_DISCREET_VALID" & _
"@GEOCODE); SELECT PROPERTY_ID, NUM_KEY, EXTENSION," & _
"CELL_ID,ACTUAL_EXTENT, " & _
" PROP_CATEGORY_ID" & _
",LIS_KEY, FUNC_KEY," & _
" NON_DISCREET_VALID, GEOCODE" & _
"FROM PROPERTY WHERE (PROPERTY_ID = @@IDENTITY)"
Me.SqlInsertCommand1.Connection = Me.SqlConnection1
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@NUM_KEY", System.Data.SqlDbType.VarChar, 10, "NUM_KEY"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@EXTENSION", System.Data.SqlDbType.Int, 4, "EXTENSION"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@CELL_ID", System.Data.SqlDbType.Int, 4, "CELL_ID"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Actual_Extent", System.Data.SqlDbType.Float, 4, "Actual_Extent"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@LIS_KEY", System.Data.SqlDbType.VarChar, 50, "LIS_KEY"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@FUNC_KEY", System.Data.SqlDbType.VarChar, 9, "FUNC_KEY"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@GEOCODE", System.Data.SqlDbType.VarChar, 15, "GEOCODE"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@PROP_CATEGORY_ID", System.Data.SqlDbType.Int, 4, "PROP_CATEGORY_ID"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@NON_DISCREET_VALID", System.Data.SqlDbType.Bit, 1, "NON_DISCREET_VALID"))
'SqlUpdateCommand1
'
Me.SqlUpdateCommand1.CommandText = "UPDATE PROPERTY SET NUM_KEY = @NUM_KEY, EXTENSION" & _
" = @EXTENSION,CELL_ID" & _
" = @CELL_ID, ACTUAL_EXTENT = @ACTUAL_EXTENT," & _
", PROP_CATEGORY_ID = @PROP_CATEGORY_ID" & _
" LIS_KEY = @LIS_KEY," & _
"FUNC_KEY = @FUNC_KEY," & _
"NON_DISCREETVALID = @NON_DISCREET_VALID, GEOCODE = @GEOCODE" & _
" WHERE (PROPERTY_ID = @Original_P" & _
"ROPERTY_ID)AND (ACTUAL_EXTENT = @Original_ACTUAL_EXTENT OR @Original_ACTUAL_EXTE" & _
"NT IS NULL AND ACTUAL_EXTENT IS NULL) AND (CELL_ID = @Original_CELL_ID OR @Original_CEL" & _
"L_ID IS NULL AND CELL_ID IS NULL) AND (E" & _
"XTENSION = @Original_EXTENSION OR @Original_EXTENSION IS NULL AND EXTENSION IS N" & _
"ULL) AND (FUNC_KEY = @Original_FUNC_KEY OR @Original_FUNC_KEY IS NULL AND FUNC_K" & _
"EY IS NULL) AND (FUNC_KEY_ORIG = @Original_FUNC_KEY_ORIG OR @Original_FUNC_KEY_O" & _
"RIG IS NULL AND FUNC_KEY_ORIG IS NULL) AND (GEOCODE = @Original_GEOCODE OR @Orig" & _
"inal_GEOCODE IS NULL AND GEOCODE IS NULL) AND (NON_DISCREET_VALID = @Original_NON_DISCREET_VALID OR @Original_NON_DISCRE" & _
"ET_VALID IS NULL AND NON_DISCREET_VALID IS NULL) AND (NUM_KEY = @Original" & _
"_NUM_KEY OR @Original_NUM_KEY IS NULL AND NUM_KEY IS NULL) AND" & _
" (PROP_CATEGORY_ID = @Original_PROP_CATEGORY_ID OR @Original_PROP_CATEGORY_ID IS" & _
" NULL AND PROP_CATEGORY_ID IS NULL); SELECT PROPERTY_ID, " & _
"NUM_KEY, EXTENSION, CELL_ID, ACTUAL_EXTENT, A" & _
" PR" & _
"OP_CATEGORY_ID, LIS_KEY, " & _
"FUNC_KEY," & _
", NON_DISCREET_VALID, GEOCODE FROM PROPERTY WHERE (PROPERTY_ID = @PROPERTY_" & _
"ID)"
Me.SqlUpdateCommand1.Connection = Me.SqlConnection1
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@NUM_KEY", System.Data.SqlDbType.VarChar, 10, "NUM_KEY"))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@EXTENSION", System.Data.SqlDbType.Int, 4, "EXTENSION"))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@CELL_ID", System.Data.SqlDbType.Int, 4, "CELL_ID"))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@ACTUAL_EXTENT", System.Data.SqlDbType.Float, 8, "ACTUAL_EXTENT"))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@PROP_CATEGORY_ID", System.Data.SqlDbType.Int, 4, "PROP_CATEGORY_ID"))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@LIS_KEY", System.Data.SqlDbType.VarChar, 50, "LIS_KEY"))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@FUNC_KEY", System.Data.SqlDbType.VarChar, 9, "FUNC_KEY"))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@NON_DISCREET_VALID", System.Data.SqlDbType.Bit, 1, "NON_DISCREET_VALID"))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@GEOCODE", System.Data.SqlDbType.VarChar, 15, "GEOCODE"))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_PROPERTY_ID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "PROPERTY_ID", System.Data.DataRowVersion.Original, Nothing))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_ACTUAL_EXTENT", System.Data.SqlDbType.Float, 8, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ACTUAL_EXTENT", System.Data.DataRowVersion.Original, Nothing))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_CELL_ID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "CELL_ID", System.Data.DataRowVersion.Original, Nothing))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_EXTENSION", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "EXTENSION", System.Data.DataRowVersion.Original, Nothing))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_FUNC_KEY", System.Data.SqlDbType.VarChar, 9, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "FUNC_KEY", System.Data.DataRowVersion.Original, Nothing))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_GEOCODE", System.Data.SqlDbType.VarChar, 15, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "GEOCODE", System.Data.DataRowVersion.Original, Nothing))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_LIS_KEY", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "LIS_KEY", System.Data.DataRowVersion.Original, Nothing))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_NON_DISCREET_VALID", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "NON_DISCREET_VALID", System.Data.DataRowVersion.Original, Nothing))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_NUM_KEY", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "NUM_KEY", System.Data.DataRowVersion.Original, Nothing))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_PROP_CATEGORY_ID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "PROP_CATEGORY_ID", System.Data.DataRowVersion.Original, Nothing))
Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@PROPERTY_ID", System.Data.SqlDbType.Int, 4, "PROPERTY_ID"))
'
'SqlDeleteCommand1
'This will Arhive the Property
' SqlArchiveCommand1.CommandText = "Update PROPERTY Set Archive_Date = GetDate, Archive_ID = 1 WHERE (PROPERTY_ID = @Original_PROPERTY_ID) "
'SqlArchiveCommand1.Connection = Me.SqlConnection1
' Me.SqlArchiveCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_PROPERTY_ID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "PROPERTY_ID", System.Data.DataRowVersion.Original, Nothing))
'Me.SqlArchiveCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_ARCHIVE_DATE", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ARCHIVE_DATE", System.Data.DataRowVersion.Original, Nothing))
'Me.SqlArchiveCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_ARCHIVE_USER_ID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ARCHIVE_USER_ID", System.Data.DataRowVersion.Original, Nothing))
'
'SqlConnection1
'
Me.SqlConnection1.ConnectionString = "user id=sde;Password=$$$$$$;data sou" & _
"rce=###########;persist security info=False;initial catalog=#########"
'
'da
'
' Me.da.UpdateCommand = Me.SqlArchiveCommand1
Me.da.InsertCommand = Me.SqlInsertCommand1
Me.da.SelectCommand = Me.SqlSelectCommand1
Me.da.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "PROPERTY", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("PROPERTY_ID", "PROPERTY_ID"), New System.Data.Common.DataColumnMapping("BASIS_AREA_ID", "BASIS_AREA_ID"), New System.Data.Common.DataColumnMapping("NUM_KEY", "NUM_KEY"), New System.Data.Common.DataColumnMapping("EXTENSION", "EXTENSION"), New System.Data.Common.DataColumnMapping("PROVINCE_ID", "PROVINCE_ID"), New System.Data.Common.DataColumnMapping("AUTHORITY_ID", "AUTHORITY_ID"), New System.Data.Common.DataColumnMapping("CELL_ID", "CELL_ID"), New System.Data.Common.DataColumnMapping("ACTIVE", "ACTIVE"), New System.Data.Common.DataColumnMapping("ACTUAL_EXTENT", "ACTUAL_EXTENT"), New System.Data.Common.DataColumnMapping("ATTRIB_CODE", "ATTRIB_CODE"), New System.Data.Common.DataColumnMapping("IMPROVED_VALUE", "IMPROVED_VALUE"), New System.Data.Common.DataColumnMapping("SITE_VALUE", "SITE_VALUE"), New System.Data.Common.DataColumnMapping("IMPROVEMENTS_VALUE", "IMPROVEMENTS_VALUE"), New System.Data.Common.DataColumnMapping("VALUES_EFFECTIVE", "VALUES_EFFECTIVE"), New System.Data.Common.DataColumnMapping("PROP_CATEGORY_ID", "PROP_CATEGORY_ID"), New System.Data.Common.DataColumnMapping("OLD_ICPROPERTY", "OLD_ICPROPERTY"), New System.Data.Common.DataColumnMapping("OLD_RECORD_TYPE", "OLD_RECORD_TYPE"), New System.Data.Common.DataColumnMapping("OLD_DESCRIPTION", "OLD_DESCRIPTION"), New System.Data.Common.DataColumnMapping("LIS_KEY", "LIS_KEY"), New System.Data.Common.DataColumnMapping("FUNC_KEY_ORIG", "FUNC_KEY_ORIG"), New System.Data.Common.DataColumnMapping("FUNC_KEY", "FUNC_KEY"), New System.Data.Common.DataColumnMapping("EAST_OF", "EAST_OF"), New System.Data.Common.DataColumnMapping("WEST_OF", "WEST_OF"), New System.Data.Common.DataColumnMapping("NORTH_OF", "NORTH_OF"), New System.Data.Common.DataColumnMapping("SOUTH_OF", "SOUTH_OF"), New System.Data.Common.DataColumnMapping("DENSITY", "DENSITY"), New System.Data.Common.DataColumnMapping("PROP_SOURCE_ID", "PROP_SOURCE_ID"), New System.Data.Common.DataColumnMapping("OLD_CODE", "OLD_CODE"), New System.Data.Common.DataColumnMapping("OLD_SUPPL_NO", "OLD_SUPPL_NO"), New System.Data.Common.DataColumnMapping("OLD_VALUER_USER_ID", "OLD_VALUER_USER_ID"), New System.Data.Common.DataColumnMapping("ADD_DATE", "ADD_DATE"), New System.Data.Common.DataColumnMapping("ADD_USER_ID", "ADD_USER_ID"), New System.Data.Common.DataColumnMapping("EDIT_DATE", "EDIT_DATE"), New System.Data.Common.DataColumnMapping("EDIT_USER_ID", "EDIT_USER_ID"), New System.Data.Common.DataColumnMapping("ARCHIVE_DATE", "ARCHIVE_DATE"), New System.Data.Common.DataColumnMapping("ARCHIVE_USER_ID", "ARCHIVE_USER_ID"), New System.Data.Common.DataColumnMapping("SPATIAL_ADD_DATE", "SPATIAL_ADD_DATE"), New System.Data.Common.DataColumnMapping("SPATIAL_ADD_USER_ID", "SPATIAL_ADD_USER_ID"), New System.Data.Common.DataColumnMapping("SPATIAL_EDIT_DATE", "SPATIAL_EDIT_DATE"), New System.Data.Common.DataColumnMapping("SPATIAL_EDIT_USER_ID", "SPATIAL_EDIT_USER_ID"), New System.Data.Common.DataColumnMapping("RATEABLE", "RATEABLE"), New System.Data.Common.DataColumnMapping("ROLL_REMARK", "ROLL_REMARK"), New System.Data.Common.DataColumnMapping("NON_DISCREET_ADD", "NON_DISCREET_ADD"), New System.Data.Common.DataColumnMapping("NON_DISCREET_VALID", "NON_DISCREET_VALID"), New System.Data.Common.DataColumnMapping("GEOCODE", "GEOCODE")})})
Me.da.UpdateCommand = Me.SqlUpdateCommand1
'
'Ds
'
Me.Ds.DataSetName = "ds"
Me.Ds.Locale = New System.Globalization.CultureInfo("en-ZA")
CType(Me.Ds, System.ComponentModel.ISupportInitialize).EndInit()
End Sub
#End Region
Public Function getDataset() As DataSet
'Fill the Dataset
da.Fill(Ds)
Return Ds
End Function
End Class
Am now Sure that the Data from the user in the Presentation Layer,does go to Business Layer in my BLL Class.Here is the code for a Button Save in my Form in the Presentation Layer.
Try
Dim objproperty As New PropertyBLL
objproperty.Num_keyp = txtNum_key.Text
objproperty.Extensionp = txtExtension.Text
objproperty.Cell_IDp = txtCell_ID.Text
objproperty.Actual_Extentp = txtActual_Extent.Text
objproperty.Lis_keyp = txtlis_key.Text
objproperty.Func_keyp = txtFunc_key.Text
objproperty.Geocodep = txtGeocode.Text
Catch Err As PropertyException
MessageBox.Show(Err.Message, "Property")
Select Case Err.FieldInError
Case "Num key"
With txtNum_key
.SelectAll()
.Focus()
End With
Case "Cell ID"
With txtCell_ID
.SelectAll()
.Focus()
End With
Case "Extension"
With txtExtension
.SelectAll()
.Focus()
End With
End Select
End Try
The Business Logic will validate the input from a user from the Presentation Layer. The thing i want to know is how does the Dal Collect the validated data from BLl and Execute it.
Please Post Explanation and Examplary code.
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|