Esempio n. 1
0
        /// <summary>
        /// 此事件,在反写了源单值之后触发:同步反写“其它数量”
        /// </summary>
        /// <param name="e"></param>
        public override void AfterCommitAmount(AfterCommitAmountEventArgs e)
        {
            base.AfterCommitAmount(e);
            if (e.Rule.Id.EqualsIgnoreCase(writeBackRuleId))
            {
                // 取当前反写的源单行
                DynamicObject sourceActiveRow = e.SourceActiveRow;
                //取得“其它数量”字段
                var fieldSrc = e.SourceBusinessInfo.GetField(fldKeyOtherQtySrc);
                if (fieldSrc == null)
                {
                    return;
                }
                //取得“其它数量”原来的值
                var valFldSrc   = fieldSrc.GetFieldValue(sourceActiveRow);
                var otherQtyOld = valFldSrc != null?Convert.ToDecimal(valFldSrc) : 0;

                // 取本次反写的转出数量
                // 引用Kingdee.BOS.BusinessEntity.dll
                WSRow <Id> writeBackSourceRow = e.WriteBackSourceRow as WSRow <Id>;
                decimal    tranOutQty         = writeBackSourceRow.Val;

                //将转出数量累加后重新赋值
                fieldSrc.DynamicProperty.SetValue(sourceActiveRow, otherQtyOld + tranOutQty);
            }
        }
Esempio n. 2
0
    public SumOfAmounts(FileRow filerow, WSRow webrow)
    {
        _fileRow = filerow;
        _webRow  = webrow;

        Sum = _fileRow.AMOUNT + _webRow.AMOUNT;
    }
Esempio n. 3
0
 public void RemoveWSRow(WSRow row) {
     this.Rows.Remove(row);
 }
Esempio n. 4
0
 public void AddWSRow(WSRow row) {
     this.Rows.Add(row);
 }
Esempio n. 5
0
 public WSRowChangeEvent(WSRow row, global::System.Data.DataRowAction action) {
     this.eventRow = row;
     this.eventAction = action;
 }