예제 #1
0
        public override bool SetFloat(int nRow, int nCol, double value)
        {
            if (nRow >= 0 && nRow < mnRow)
            {
                if (!mhtRecordVec.ContainsKey(nRow))
                {
                    AddRow(nRow);
                }
                NFIDataList valueList = (NFIDataList)mhtRecordVec[nRow];
                if (valueList.GetType(nCol) == NFIDataList.VARIANT_TYPE.VTYPE_FLOAT)
                {
                    if (valueList.FloatVal(nCol) - value > NFIDataList.EPS_DOUBLE ||
                        valueList.FloatVal(nCol) - value < -NFIDataList.EPS_DOUBLE)
                    {
                        NFIDataList.TData oldValue = new NFIDataList.TData(NFIDataList.VARIANT_TYPE.VTYPE_FLOAT);
                        NFIDataList.TData newValue = new NFIDataList.TData(NFIDataList.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);
        }