Ejemplo n.º 1
0
        public override bool SetDataObject(int nRow, int nCol, AFCoreEx.AFIDataList.Var_Data value)
        {
            if (nRow >= 0 && nRow < mnRow)
            {
                if (!mhtRecordVec.ContainsKey(nRow))
                {
                    AddRow(nRow);
                }

                AFIDataList valueList = (AFIDataList)mhtRecordVec[nRow];
                if (valueList.GetType(nCol) == value.nType)
                {
                    if (valueList.VarVal(nCol) != value)
                    {
                        AFCDataList oldValue = new AFCDataList();
                        AFCoreEx.AFIDataList.Var_Data xOld = valueList.VarVal(nCol);
                        oldValue.AddDataObject(ref xOld);

                        valueList.SetDataObject(nCol, value);

                        AFCDataList newValue = new AFCDataList();
                        AFCoreEx.AFIDataList.Var_Data xNew = valueList.VarVal(nCol);
                        newValue.AddDataObject(ref xNew);

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

                return(true);
            }

            return(false);
        }