Esempio n. 1
0
        public override bool SetFloat(int nRow, int nCol, float 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_FLOAT)
                {
                    if (valueList.FloatVal(nCol) - value > 0.01f ||
                        valueList.FloatVal(nCol) - value < -0.01f)
                    {
                        AFCDataList oldValue = new AFCDataList();
                        oldValue.AddFloat(valueList.FloatVal(nCol));

                        valueList.SetFloat(nCol, value);

                        AFCDataList newValue = new AFCDataList();
                        newValue.AddFloat(valueList.FloatVal(nCol));

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

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