Beispiel #1
0
        public override bool SetDouble(int nRow, int nCol, double value)
        {
            if (nRow >= 0 && nRow < mnRow)
            {
                if (!mhtRecordVec.ContainsKey(nRow))
                {
                    AddRow(nRow);
                }

                AFIDataList valueList = (AFIDataList)mhtRecordVec[nRow];
                if (valueList.GetType(nCol) == AFIDataList.VARIANT_TYPE.VTYPE_DOUBLE)
                {
                    if (valueList.DoubleVal(nCol) - value > 0.01f ||
                        valueList.DoubleVal(nCol) - value < -0.01f)
                    {
                        AFCDataList oldValue = new AFCDataList();
                        oldValue.AddDouble(valueList.DoubleVal(nCol));

                        valueList.SetDouble(nCol, value);

                        AFCDataList newValue = new AFCDataList();
                        newValue.AddDouble(valueList.DoubleVal(nCol));

                        if (null != doHandleDel)
                        {
                            doHandleDel(mSelf, mstrRecordName, eRecordOptype.Updata, nRow, nCol, oldValue, newValue);
                        }
                    }
                }

                return(true);
            }
            return(false);
        }