Ejemplo n.º 1
0
        public override bool SetFloat(int nRow, int nCol, double value)
        {
            if (nRow >= 0 && nRow < mnRow)
            {
                if (!mhtRecordVec.ContainsKey(nRow))
                {
                    AddRow(nRow);
                }
                NFDataList valueList = (NFDataList)mhtRecordVec[nRow];
                if (valueList.GetType(nCol) == NFDataList.VARIANT_TYPE.VTYPE_FLOAT)
                {
                    if (valueList.FloatVal(nCol) - value > NFDataList.EPS_DOUBLE ||
                        valueList.FloatVal(nCol) - value < -NFDataList.EPS_DOUBLE)
                    {
                        NFDataList.TData oldValue = new NFDataList.TData(NFDataList.VARIANT_TYPE.VTYPE_FLOAT);
                        NFDataList.TData newValue = new NFDataList.TData(NFDataList.VARIANT_TYPE.VTYPE_FLOAT);

                        oldValue.Set(valueList.FloatVal(nCol));
                        newValue.Set(value);

                        valueList.SetFloat(nCol, value);

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

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