通过代码 c#/或禁用操作使选项卡消失
make a tab disappear by code c# / or action disabled
我想让 activity 选项卡从代码中消失(条件 caseClassid)...没有成功,我试图使操作无效,我没有任何错误,但它没有行了,屏幕是CR306000,谢谢!泽维尔 FFY
public class CRCaseMaint_Extension : PXGraphExtension<CRCaseMaint>
{
#region Event Handlers
protected void CRCase_RowSelected(PXCache cache, PXRowSelectedEventArgs e)
{
var row = (CRCase)e.Row;
if (row == null) return;
Boolean xm_valfinale=true;
if ((row.CaseClassID=="F") ||(row.CaseClassID=="D"))
{
xm_valfinale=false;
PXUIFieldAttribute.SetWarning<CRCase.subject>(cache, row, "Il est nécessaire de renseigner la bonne famille !");
}
Base.Activities.AllowInsert = xm_valfinale;
Base.Activities.AllowUpdate = xm_valfinale;
Base.Activities.AllowDelete = xm_valfinale;
}
}
您需要使用
Base.Activities.AllowSelect = xm_valfinale;
并在 ASPX 中的 PXTabItem 上设置
RepaintOnDemand="false"
我想让 activity 选项卡从代码中消失(条件 caseClassid)...没有成功,我试图使操作无效,我没有任何错误,但它没有行了,屏幕是CR306000,谢谢!泽维尔 FFY
public class CRCaseMaint_Extension : PXGraphExtension<CRCaseMaint>
{
#region Event Handlers
protected void CRCase_RowSelected(PXCache cache, PXRowSelectedEventArgs e)
{
var row = (CRCase)e.Row;
if (row == null) return;
Boolean xm_valfinale=true;
if ((row.CaseClassID=="F") ||(row.CaseClassID=="D"))
{
xm_valfinale=false;
PXUIFieldAttribute.SetWarning<CRCase.subject>(cache, row, "Il est nécessaire de renseigner la bonne famille !");
}
Base.Activities.AllowInsert = xm_valfinale;
Base.Activities.AllowUpdate = xm_valfinale;
Base.Activities.AllowDelete = xm_valfinale;
}
}
您需要使用
Base.Activities.AllowSelect = xm_valfinale;
并在 ASPX 中的 PXTabItem 上设置
RepaintOnDemand="false"