标签:style blog color io ar for art div sp
应用场景:额度冲减
siebel中实现先占用后清除功能,需要清除前一次写入的值。
if(quotaId != ""){ with(bcQuota){ SetViewMode(AllView); ActivateField("Id"); ActivateField("Available Amount"); ActivateField("Occupation Amount"); ClearToQuery(); searchExpr = "[Id] = ‘" + quotaId + "‘"; SetSearchExpr(searchExpr); ExecuteQuery(ForwardOnly); if(FirstRecord()) { availAmount = ToNumber(GetFieldValue("Available Amount")); occupAmount = ToNumber(GetFieldValue("Occupation Amount")); //availAmount = availAmount + Math.abs(sumCSP-sumNRC); var minResult = Math.abs(sumCSP-sumNRC); if((occupAmount-minResult)< 0.0000001){ //TheApplication().RaiseErrorText(occupAmount +"------" +minResult); occupAmount = 0; }else{ occupAmount = occupAmount-minResult; } //SetFieldValue("Available Amount",availAmount); SetFieldValue("Occupation Amount",occupAmount); WriteRecord(); }//end if }//end with }
标签:style blog color io ar for art div sp
原文地址:http://www.cnblogs.com/Flamo/p/3965761.html