I have TM_OTPLANData class inherit from dataset class. My TM_OTPLANData class has fixed column.
In data access layer, I have Bind Method, which connect to database to extract data, i fill entire data into TM_OTPlanData object and return that object.(Number of Column Data extract from database different from number of column in TM_OTPLanData)
In GUI Layer, i declared a instance of TM_OTPLANData class and initiate it with the Bind Method and error has occured. Error Message as below:
Value of type 'IVIS.IVISCommon.Collection.TM_OTPLANData' cannot be converted to 'IVIS.IVISCommon.Collection.TM_OTPLANData'. Type mismatch could be due to the mixing of a file reference with a project reference to assembly 'IVISCommon'. Try replacing the file reference to 'IVISCommon.dll' in project '2_Overtime_IVISOT303.ascx' with a project reference to 'IVISCommon'.
My program run normally as i expected. Please explain for me to understand that problem. I don't like seeing that message when compile my website. Please help me.
My TM_OTPLANData as follow:
Imports
System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Runtime.Serialization
Namespace IVIS.IVISCommon.Collection
Public Class TM_OTPLANData:Inherits DataSet
Public Const OTID As String = "OTID"
Public Const CREATORID As String = "CREATORID"
Public Const PROJECTID As String = "PROJECTID"
Public Const CREATEDDATE As String = "CREATEDDATE"
Public Const BEGINDATE As String = "BEGINDATE"
Public Const ENDDATE As String = "ENDDATE"
Public Const ISCOMPLETEPLANAPPROVAL As String = "ISCOMPLETEPLANAPPROVAL"
Public Const ISCOMPLETEDACTUALAPPROVAL As String = "ISCOMPLETEDACTUALAPPROVAL"
Public Const PLANNOTE As String = "PLANNOTE"
Public Const ISCANCELED As String = "ISCANCELED"
Public Sub New()
' Create the tables in the dataset
BuildDataTables()
End Sub
Private Sub BuildDataTables()
Dim table As DataTable = New DataTable(IVISConst.TBL_TM_OTPLAN)
With table.Columns
.Add(TM_OTPLANData.OTID, GetType(System.Int64))
.Add(TM_OTPLANData.CREATORID, GetType(System.String))
.Add(TM_OTPLANData.PROJECTID, GetType(System.Int64))
.Add(TM_OTPLANData.CREATEDDATE, GetType(System.DateTime))
.Add(TM_OTPLANData.BEGINDATE, GetType(System.DateTime))
.Add(TM_OTPLANData.ENDDATE, GetType(System.DateTime))
.Add(TM_OTPLANData.ISCOMPLETEPLANAPPROVAL, GetType(System.Boolean))
.Add(TM_OTPLANData.ISCOMPLETEDACTUALAPPROVAL, GetType(System.Boolean))
.Add(TM_OTPLANData.PLANNOTE, GetType(System.String))
.Add(TM_OTPLANData.ISCANCELED, GetType(System.Boolean))
End With
Me.Tables.Add(table)
End Sub
End Class
End Namespace
Thanks and best regard