ASP.NET 2.0 GUI generator templates (Adapter / C#) - Error compiling

Posts   
 
    
jesterJP
User
Posts: 30
Joined: 21-Nov-2007
# Posted on: 14-Jun-2008 04:39:17   

In the generated files ViewRelatedto<EntityName>.ascx.cs the following code has a compile error:


using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using SD.LLBLGen.Pro.ORMSupportClasses;
using DBASupport.LLBL.DAL.EntityClasses;
using DBASupport.LLBL.DAL.DatabaseSpecific;
using DBASupport.LLBL.DAL.FactoryClasses;

public partial class Controls_ViewRelatedToSoftwareInstanceHome : System.Web.UI.UserControl, IViewRelatedControl
{
    private PredicateExpression _filterToUse;

    protected void Page_Load(object sender, EventArgs e)
    {
        if(_filterToUse != null)
        {
            using(DataAccessAdapter adapter = new DataAccessAdapter())
            {
                SoftwareInstanceHomeEntity instance = (SoftwareInstanceHomeEntity)adapter.FetchNewEntity(new SoftwareInstanceHomeEntityFactory(), new RelationPredicateBucket(_filterToUse));
                if(instance != null)
                {
                    laOraclePatchesApplied.SetContainingEntity(instance, "OraclePatchesApplied");
                    laSoftwareInstance.SetContainingEntity(instance, "SoftwareInstance");
                    laOraclePatchesCollectionViaOraclePatchesApplied.SetContainingEntity(instance, "OraclePatchesCollectionViaOraclePatchesApplied");
                    laMachineCollectionViaSoftwareInstance.SetContainingEntity(instance, "MachineCollectionViaSoftwareInstance");
                    laProductVersionCollectionViaSoftwareInstance.SetContainingEntity(instance, "ProductVersionCollectionViaSoftwareInstance");

                }
            }
        }
    }


    /// <summary>
    /// Sets the filter to use for the control's entity fetch routine
    /// </summary>
    public PredicateExpression FilterToUse 
    {
        set { _filterToUse = value; }
    }
}


I am getting errors about references to anything beginning with la. For example:

**The name 'laOraclePatchesApplied' does not exist in the current context **

Is there something wrong with the templates?

Thanks...

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 14-Jun-2008 07:11:26   

Hi jesterJP,

LLBLGen version? VSNet version?

Please try reassigning the references to your GUI project (Specially the LLBLGen generated projects).

David Elizondo | LLBLGen Support Team
jesterJP
User
Posts: 30
Joined: 21-Nov-2007
# Posted on: 14-Jun-2008 15:39:33   

daelmo wrote:

LLBLGen version? VSNet version?

ASP.NET 2.0 GUI generator templates (Adapter / C#) - Build 06102008

LLBLGen 2.6 - Build June 6th

Other versions:

Microsoft Visual Studio 2005 Version 8.0.50727.762 (SP.050727-7600) Microsoft .NET Framework Version 2.0.50727

Installed Edition: Professional

Microsoft Visual C# 2005 77626-009-0000007-41173 Microsoft Visual C# 2005

Microsoft Visual Studio 2005 Professional Edition - ENU Service Pack 1 (KB926601)
This service pack is for Microsoft Visual Studio 2005 Professional Edition - ENU.

daelmo wrote:

Please try reassigning the references to your GUI project (Specially the LLBLGen generated projects).

I've done this, but I'm not sure what this will solve. I've searched all the generated files for other instances of laOraclePatchesApplied and it is not present in any other file, so I can't find where this variable is ever declared.

jesterJP
User
Posts: 30
Joined: 21-Nov-2007
# Posted on: 15-Jun-2008 18:53:53   

jesterJP wrote:

I've done this, but I'm not sure what this will solve. I've searched all the generated files for other instances of laOraclePatchesApplied and it is not present in any other file, so I can't find where this variable is ever declared.

Please ignore the previous statements. I have determined where laOraclePatchesApplied is being declared. I am working through several errors at the moment. I deleted the generated code and have started over. I am now working with the following errors:

The type or namespace name 'IViewRelatedControl' could not be found (are you missing a using directive or an assembly reference?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 15-Jun-2008 22:44:28   

Mmm. please make sure that the file Interfaces.cs is accessible and IViewRelatedControl interface as well.

David Elizondo | LLBLGen Support Team