我正在尝试编译以下代码,但继续得到相同的错误消息

时间:2017-11-13 09:28:32

标签: c#

using System;
using System.Collections.Generic;
using PX.Data;
using System.Collections;
using PX.Objects.AR;
using PX.Objects.CR;
using PX.Objects.CS;
using PX.Objects.GL;
using PX.Objects.IN;
using PX.Objects.CT;
using PX.Objects;
using PX.Objects.PM;

namespace PX.Objects.PM{}

public class 
ProjectBalanceEntry_Extension:PXGraphExtension<ProjectBalanceEntry>{}


  #region Event Handler


  public PXFilter<ProjectBalanceEntry.ProjectBalanceFilter>(Filter);
  [PXVirtualDAC]

  ProjectBalanceEntry row = e.Row as ProjectBalanceFilter;

  if (row != null)
    {
      Items.Cache.AllowInsert = row.ProjectID != null && row.AccountGroupID 
!= null;
    }

  if (Filter.Current == null)
        {
            Items.Cache = row.ProjectID != null && row.AccountGroupID != 
null;
        }

            PXSelectJoin<PMProjectStatus,
                InnerJoin<PMTask, On<PMTask.projectID, 
Equal<PMProjectStatus.projectID>>>, 
                Where<PMProjectStatus.projectID, 
Equal<Current<ProjectBalanceFilter.projectID>>, 
And<PMProjectStatus.accountGroupID, 
Equal<Current<ProjectBalanceFilter.accountGroupID>>>>,

              {
  if (project == null) project = Base.Project.Select();

  if (project != null && row != null)
 } 

             INItemSite itemsite = PXSelectJoin<INItemSite,
                InnerJoin<Location, On<Location.cSiteID, 
Equal<INItemSite.siteID>>>,
                Where<INItemSite.inventoryID, 
Equal<Required<INItemSite.inventoryID>>, And<Location.bAccountID, 
Equal<Required<Location.bAccountID>>>>>.Select(Base, row.InventoryID, 
project.CustomerID);

           if (itemsite != null)
    {
      e.NewValue = itemsite.LastCost;
    }


  e.Cancel = true;

 #endregion

验证此代码时出现以下错误:

  

验证二进制文件验证网站C:\ Program Files   (86)\ Acumatica   ERP \定制\ AcumaticaPUPKT11Validation \ AcumaticaPUPKT11Website   IIS APPPOOL.NET v4.5构建目录   '\ WebSiteValidationDomain \ App_RuntimeCode \'。   \ App_RuntimeCode \ ProjectBalanceEntry.cs(23):错误CS1518:预期   class,delegate,enum,interface或struct   \ App_RuntimeCode \ ProjectBalanceEntry.cs(29):错误CS1518:预期   class,delegate,enum,interface或struct   \ App_RuntimeCode \ ProjectBalanceEntry.cs(23):错误CS1518:预期   class,delegate,enum,interface或struct编译器时间,以秒为单位:   5.0554991验证失败。

1 个答案:

答案 0 :(得分:1)

当我确定您的意思是{}

时,您在几个地方{
namespace PX.Objects.PM{}

public class 
ProjectBalanceEntry_Extension:PXGraphExtension<ProjectBalanceEntry>{}

基本上你的花括号出现了一些非常错误(例如,查找/替换错误)。您可能需要恢复到早期版本的源代码。

此外,函数定义的语法错误:

  public PXFilter<ProjectBalanceEntry.ProjectBalanceFilter>(Filter);
  [PXVirtualDAC]

可能应该是

  [PXVirtualDAC]
  public PXFilter<ProjectBalanceEntry.ProjectBalanceFilter>(Filter)
  {