Compile Error: Type 'CompanyAdapter' is not defined

BINGO.Â
That

--- On Tue, 11/25/08, bw2868bond <bwalker@...> wrote:

From: bw2868bond <bwalker@...>
Subject: [Vantage] Re: Compile Error: Type 'CompanyAdapter' is not defined.
To: vantage@yahoogroups.com
Date: Tuesday, November 25, 2008, 11:27 AM






You most likely need to add the Company adapter dll files in the
customization - tools - assembly reference manager

Add both the AD and IF dll files for Company

--- In vantage@yahoogroups .com, Ahmet Erispaha <ahmeterispaha@ ...>
wrote:
>
> I'm trying to auto-generate part numbers for new parts and getting
a "Type 'Company Adapter' is not defined" error. I adapted this code
from a customization workshop which was originally written to create
customer numbers -- that customization, by the way works fine. (The
customization uses Number01 in the Company table to store the latest
number used.)
> Â
> I have the same "Imports" statements in both versions. I need help
understanding why the new customer customization recognizes
CompanyAdapter but the new part customization doesn't. Is there some
inherent connection between Company and Customer that is missing
between Company and Part?Â
> Â
> Here is the EpiViewNotification code for both:
> Â
> ***New customer***this one compiles
> Â Â Â Private Sub edvCustomer_ EpiViewNotificat ion(view As
EpiDataView, args As EpiNotifyArgs) Handles
edvCustomer. EpiViewNotificat ionÂ
> Â Â Â Â Â Â Â If (args.NotifyType = EpiTransaction. NotifyType. AddRow)
Then
> Â Â Â Â Â Â Â Â Â Â Â If (args.Row > -1) Then
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Dim compAdapt As CompanyAdapter = New CompanyAdapter
(CustomerEntryForm)
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.BOConnect ()
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Dim company As String =
CustomerEntryForm. Session.CompanyI D
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Dim ret As Boolean = compAdapt.GetByID( company)
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Dim newCustID As Integer =
compAdapt.CompanyDa ta.Tables( "Company" ).Rows(0) ("Number01" )
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â view.dataView( args.Row) ("CustID" ) = "Auto" +
newCustID.ToString( )
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â view.Notify( New EpiNotifyArgs( CustomerEntryFor m,
view.Row, view.Column) )
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â newCustID = newCustID + 1
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.CompanyDa ta.Tables( "Company" ).Rows
(0).BeginEdit( )
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.CompanyDa ta.Tables( "Company" ).Rows(0)
("Number01") = newCustID
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.CompanyDa ta.Tables( "Company" ).Rows
(0).EndEdit( )
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.Update( )
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.Dispose( )
> Â Â Â Â Â Â Â Â Â Â Â End If
> Â Â Â Â Â Â Â End If
> Â Â Â End Sub
>
> ***New part***this one doesn't
> Â Private Sub edvPart_EpiViewNoti fication( view As EpiDataView, args
As EpiNotifyArgs) Handles edvPart.EpiViewNoti fication
> Â Â If (args.NotifyType = EpiTransaction. NotifyType. AddRow) Then
> Â Â Â If (args.Row > -1) Then
> Â Â Â Â Â Â Â Â Â Â Â Â Dim compAdapt As CompanyAdapter = New CompanyAdapter
(PartForm)
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.BOConnect ()
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Dim company As String = PartForm.Session. CompanyID
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Dim ret As Boolean = compAdapt.GetByID( company)
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Dim newPartID As Integer =
compAdapt.CompanyDa ta.Tables( "Company" ).Rows(0) ("Number02" )
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â view.dataView( args.Row) ("PartNum" ) = "Auto" +
newPartID.ToString( )
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â view.Notify( New EpiNotifyArgs( PartForm, view.Row,
view.Column) )
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â newPartID = newPartID + 1
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.CompanyDa ta.Tables( "Company" ).Rows
(0).BeginEdit( )
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.CompanyDa ta.Tables( "Company" ).Rows(0)
("Number02") = newPartID
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.CompanyDa ta.Tables( "Company" ).Rows
(0).EndEdit( )
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.Update( )
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.Dispose( )
> Â Â
> Â Â Â End If
> Â Â End If
> Â End Sub
>
> Thanks,
> Â
> Ahmet Erispaha
> Â
>
>
>
>
> [Non-text portions of this message have been removed]
>


















[Non-text portions of this message have been removed]
I'm trying to auto-generate part numbers for new parts and getting a "Type 'Company Adapter' is not defined" error. I adapted this code from a customization workshop which was originally written to create customer numbers -- that customization, by the way works fine. (The customization uses Number01 in the Company table to store the latest number used.)
Â
I have the same "Imports" statements in both versions. I need help understanding why the new customer customization recognizes CompanyAdapter but the new part customization doesn't. Is there some inherent connection between Company and Customer that is missing between Company and Part?Â
Â
Here is the EpiViewNotification code for both:
Â
***New customer***this one compiles
   Private Sub edvCustomer_EpiViewNotification(view As EpiDataView, args As EpiNotifyArgs) Handles edvCustomer.EpiViewNotificationÂ
       If (args.NotifyType = EpiTransaction.NotifyType.AddRow) Then
           If (args.Row > -1) Then
               Dim compAdapt As CompanyAdapter = New CompanyAdapter(CustomerEntryForm)
               compAdapt.BOConnect()
               Dim company As String = CustomerEntryForm.Session.CompanyID
               Dim ret As Boolean = compAdapt.GetByID(company)
               Dim newCustID As Integer = compAdapt.CompanyData.Tables("Company").Rows(0)("Number01")
               view.dataView(args.Row)("CustID") = "Auto" + newCustID.ToString()
               view.Notify(New EpiNotifyArgs(CustomerEntryForm, view.Row, view.Column))
               newCustID = newCustID + 1
              Â
               compAdapt.CompanyData.Tables("Company").Rows(0).BeginEdit()
               compAdapt.CompanyData.Tables("Company").Rows(0)("Number01") = newCustID
               compAdapt.CompanyData.Tables("Company").Rows(0).EndEdit()
              Â
               compAdapt.Update()
               compAdapt.Dispose()
           End If
       End If
   End Sub

***New part***this one doesn't
 Private Sub edvPart_EpiViewNotification(view As EpiDataView, args As EpiNotifyArgs) Handles edvPart.EpiViewNotification
  If (args.NotifyType = EpiTransaction.NotifyType.AddRow) Then
   If (args.Row > -1) Then
            Dim compAdapt As CompanyAdapter = New CompanyAdapter(PartForm)
               compAdapt.BOConnect()
               Dim company As String = PartForm.Session.CompanyID
               Dim ret As Boolean = compAdapt.GetByID(company)
               Dim newPartID As Integer = compAdapt.CompanyData.Tables("Company").Rows(0)("Number02")
               view.dataView(args.Row)("PartNum") = "Auto" + newPartID.ToString()
               view.Notify(New EpiNotifyArgs(PartForm, view.Row, view.Column))
               newPartID = newPartID + 1
              Â
               compAdapt.CompanyData.Tables("Company").Rows(0).BeginEdit()
               compAdapt.CompanyData.Tables("Company").Rows(0)("Number02") = newPartID
               compAdapt.CompanyData.Tables("Company").Rows(0).EndEdit()
              Â
               compAdapt.Update()
               compAdapt.Dispose()
 Â
   End If
  End If
 End Sub

Thanks,
Â
Ahmet Erispaha
Â




[Non-text portions of this message have been removed]
You most likely need to add the Company adapter dll files in the
customization - tools - assembly reference manager

Add both the AD and IF dll files for Company

--- In vantage@yahoogroups.com, Ahmet Erispaha <ahmeterispaha@...>
wrote:
>
> I'm trying to auto-generate part numbers for new parts and getting
a "Type 'Company Adapter' is not defined" error. I adapted this code
from a customization workshop which was originally written to create
customer numbers -- that customization, by the way works fine. (The
customization uses Number01 in the Company table to store the latest
number used.)
> Â
> I have the same "Imports" statements in both versions. I need help
understanding why the new customer customization recognizes
CompanyAdapter but the new part customization doesn't. Is there some
inherent connection between Company and Customer that is missing
between Company and Part?Â
> Â
> Here is the EpiViewNotification code for both:
> Â
> ***New customer***this one compiles
> Â Â Â Private Sub edvCustomer_EpiViewNotification(view As
EpiDataView, args As EpiNotifyArgs) Handles
edvCustomer.EpiViewNotificationÂ
> Â Â Â Â Â Â Â If (args.NotifyType = EpiTransaction.NotifyType.AddRow)
Then
> Â Â Â Â Â Â Â Â Â Â Â If (args.Row > -1) Then
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Dim compAdapt As CompanyAdapter = New CompanyAdapter
(CustomerEntryForm)
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.BOConnect()
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Dim company As String =
CustomerEntryForm.Session.CompanyID
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Dim ret As Boolean = compAdapt.GetByID(company)
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Dim newCustID As Integer =
compAdapt.CompanyData.Tables("Company").Rows(0)("Number01")
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â view.dataView(args.Row)("CustID") = "Auto" +
newCustID.ToString()
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â view.Notify(New EpiNotifyArgs(CustomerEntryForm,
view.Row, view.Column))
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â newCustID = newCustID + 1
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.CompanyData.Tables("Company").Rows
(0).BeginEdit()
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.CompanyData.Tables("Company").Rows(0)
("Number01") = newCustID
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.CompanyData.Tables("Company").Rows
(0).EndEdit()
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.Update()
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.Dispose()
> Â Â Â Â Â Â Â Â Â Â Â End If
> Â Â Â Â Â Â Â End If
> Â Â Â End Sub
>
> ***New part***this one doesn't
> Â Private Sub edvPart_EpiViewNotification(view As EpiDataView, args
As EpiNotifyArgs) Handles edvPart.EpiViewNotification
> Â Â If (args.NotifyType = EpiTransaction.NotifyType.AddRow) Then
> Â Â Â If (args.Row > -1) Then
> Â Â Â Â Â Â Â Â Â Â Â Â Dim compAdapt As CompanyAdapter = New CompanyAdapter
(PartForm)
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.BOConnect()
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Dim company As String = PartForm.Session.CompanyID
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Dim ret As Boolean = compAdapt.GetByID(company)
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Dim newPartID As Integer =
compAdapt.CompanyData.Tables("Company").Rows(0)("Number02")
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â view.dataView(args.Row)("PartNum") = "Auto" +
newPartID.ToString()
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â view.Notify(New EpiNotifyArgs(PartForm, view.Row,
view.Column))
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â newPartID = newPartID + 1
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.CompanyData.Tables("Company").Rows
(0).BeginEdit()
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.CompanyData.Tables("Company").Rows(0)
("Number02") = newPartID
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.CompanyData.Tables("Company").Rows
(0).EndEdit()
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.Update()
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â compAdapt.Dispose()
> Â Â
> Â Â Â End If
> Â Â End If
> Â End Sub
>
> Thanks,
> Â
> Ahmet Erispaha
> Â
>
>
>
>
> [Non-text portions of this message have been removed]
>