I am using DAL+ methode to crete a module code but I got the folowing error on get function :
Object reference not set to an instance of an object.
I have file on my APP_Code folder module called EmissionController.vb as controller and a file under the DesktopModules folder ListEmission.ascx.vb for listing the emissions and i want get just one emission by GetEmissionHoraire methode
in my EmissionController.vb.vb I put the following code for the get methode ***
Public Function GetEmissionHoraire(ByVal horaireID As Integer, ByVal moduleId As Integer) As EmissionHoraireInfo
Return CType(CBO.FillObject(DotNetNuke.Data.DataProvider.Instance().ExecuteScalar("EmissionHoraireGet", horaireID, moduleId), GetType(EmissionHoraireInfo)), EmissionHoraireInfo)
End Function
in my EmissionHoraireInfo.vb I put the following code for the get methode ***
Dim EmissionController As New EmissionController
Dim EmissionHoraireInfo As New EmissionHoraireInfo
Dim emissionHoraireItem As EmissionHoraireInfo = EmissionController.GetEmissionHoraire(HoraireID, ModuleId)
Label1.Text = emissionHoraireItem.HeureDebut
Label2.Text = emissionHoraireItem.HeureFin
Label3.Text = emissionHoraireItem.JourSemaine
please for those who have a large experience to deal with DAL+ tell me where is the problem in my code and thank you