是否可以让图形和页面使用完全未绑定的 DAC?
当前在 4.20 中尝试此操作时,我收到以下错误消息:
Incorrect syntax near the keyword 'FROM'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near the keyword 'FROM'.
如果我在数据库中创建一个表并将我的 DAC 字段从 PXInt 更改为 PXDBInt,那么页面会加载,但是对于我正在尝试做的事情,我不需要实际存储数据。
DAC样本:
namespace Acumatica1
{
[PXPrimaryGraph(typeof(UnboundDataTest))]
[System.SerializableAttribute()]
public class UnboundDAC : PX.Data.IBqlTable
{
public abstract class unboundKey : PX.Data.IBqlField
{
}
protected int _UnboundKey;
[PXInt(IsKey = true)]
[PXUIField(Visible = false)]
public virtual int UnboundKey
{
get
{
return this._UnboundKey;
}
set
{
this._UnboundKey = value;
}
}
#region UnboundText
public abstract class unboundText : PX.Data.IBqlField
{
}
protected string _UnboundText;
[PXString]
[PXUIField(DisplayName = "Text")]
public virtual string UnboundText
{
get
{
return this._UnboundText;
}
set
{
this._UnboundText = value;
}
}
#endregion
}
}
图表样本:
public class UnboundDataTest: PXGraph<UnboundDataTest>
{
public PXSelect<UnboundDAC> UnboundInfo;
}