需要显示一个区域的所有部分。我创建了新表单PMCContractAreasDialog。当我在合同表中单击特定合同行时,应打开新表单并显示一个区域的所有部分。总之,合同线上应该有相同的内容。但是每次我单击按钮时,表单都是空的。我想念什么吗?
[Form]
public class PMCContractAreasDialog extends FormRun
{
[FormObservable]
date currWorkingDate;
[FormObservable]
boolean commonAreasRead;
PMERentalObjectAreaValueCl tmpRentalAreaCl;
PMETmpRentalObjectArea tmpArea;
public void init ()
{
super();
pmcContractLine_ds.linkActive();
}
public void activate(boolean _active)
{
PMCContractArea contractArea;
AmountMST sumContractArea;
pmcContractLine_ds.readCommonAreas(pmcContractLine);
h1_h2.realValue(pmcContractLine_ds.h1_h2(pmcContractLine));
efa.realValue(pmcContractLine_ds.efa(pmcContractLine));
bfa.realValue(pmcContractLine_ds.bfa(pmcContractLine));
mfa.realValue(pmcContractLine_ds.mfa(pmcContractLine));
sumArea.realValue(h1_h2.realValue() + efa.realValue() + bfa.realValue() + mfa.realValue());
}
[DataSource]
class PMCContract
{
public int active()
{
int ret;
ret = super();
return ret;
}
}
[DataSource]
class PMCContractLine
{
public int active()
{
int ret;
ret = super();
return ret;
}
display PMEAreaCommonBuildingSum BFA(PMCContractLine _contractLine)
{
if (commonAreasRead)
{
if (_contractLine.RentalObjectId)
{
return PMERentalObjectAreaCl::getRentalObjectCommonAreaBuildingSum(_contractLine.RentalObjectId, currWorkingDate, tmpArea, false);
}
else
{
return 0;
}
}
return 0;
}
void readCommonAreas(PMCContractLine _contractLine)
{
if (!commonAreasRead)
{
if (pmcContractLine.RentalObjectId)
{
tmpRentalAreaCl = new PMERentalObjectAreaValueCl();
tmpRentalAreaCl.clear();
tmpRentalAreaCl.getRentalObjectAreas(_contractLine.RentalObjectId, PMGUser::find().currDate());
tmpArea.setTmpData(tmpRentalAreaCl.getTempTable());
commonAreasRead = true;
}
}
}
//BP Deviation Documented
display PMEAreaCommonSectionSum EFA(PMCContractLine _contractLine)
{
if (commonAreasRead)
{
if (_contractLine.RentalObjectId)
{
return PMERentalObjectAreaCl::getRentalObjectCommonAreaSectionSum(_contractLine.RentalObjectId, currWorkingDate, tmpArea, false);
}
else
{
return 0;
}
}
return 0;
}
//BP Deviation Documented
display PMEAreaTotal H1_H2(PMCContractLine _contractLine)
{
if (commonAreasRead)
{
if (_contractLine.RentalObjectId)
{
return PMERentalObjectAreaCl::getRentalObjectMainAreaSectionSum(_contractLine.RentalObjectId, currWorkingDate, tmpArea, false);
}
else
{
return 0;
}
}
return 0;
}
//BP Deviation Documented
display PMEAreaTotal MFA(PMCContractLine _contractLine)
{
if (commonAreasRead)
{
if (_contractLine.RentalObjectId)
{
return PMERentalObjectAreaCl::getRentalObjectCommonAreaFixedSum(_contractLine.RentalObjectId, currWorkingDate, tmpArea, false);
}
else
{
return 0;
}
}
return 0;
}
}
[DataSource]
class PMCContractArea
{
public void delete()
{
super();
this.updateLines();
}
public void write()
{
super();
this.updateLines();
}
void updateLines()
{
;
PMCContractArea::updateLineAreas(pmcContractArea.ContractId, pmcContractArea.RentalObjectId);
}
}
}