public void OnDSUpdated(object result, CallbackEntry cbEntry, OpCode operationCode)
        {
            if (cbEntry != null)
            {
                AsyncCallbackInfo info = cbEntry.WriteBehindOperationCompletedCallback as AsyncCallbackInfo;
                if (info != null && (short)info.Callback != -1)
                {
                    Hashtable resTbl = result as Hashtable;
                    Hashtable newRes = null;
                    if (resTbl != null)
                    {
                        newRes = new Hashtable();
                        IDictionaryEnumerator ide = resTbl.GetEnumerator();
                        while (ide.MoveNext())
                        {
                            object val = ide.Value;
                            if (val != null && val is string)
                            {
                                newRes[ide.Key] = (DataSourceOpResult)Convert.ToInt32(val);
                            }
                            else
                            {
                                newRes[ide.Key] = ide.Value;
                            }
                        }
                    }

                    _parent.OnDataSourceUpdated((short)info.Callback, newRes as Hashtable, operationCode, true);
                }
            }
        }
Exemplo n.º 2
0
 public void OnDataSourceUpdated(short callbackID, Hashtable result, OpCode operationCode, bool notifyAsync)
 {
     _parent.OnDataSourceUpdated(callbackID, result, operationCode, notifyAsync);
 }