public void insertRecord(recordContainer rec) { lock (xlock) { this.buffer.Add(rec); this.parent.parent.parent.listSteams_SetValue(this.parent.full_name, "qc", this.buffer.Count.ToString()); } }
private void DU(CP2DataStream stream, string tableName, long id, CP2Record rec) { Hashtable hashtable = new Hashtable(); TableBaseInfo tb = (this.buffer.tables[tableName] as TableBaseInfo); if (tb != null) { for (int i = 0; i < tb.fieldsArr.Length; i++) { hashtable.Add(tb.fieldsArr[i],rec.GetValAsString(tb.fieldsArr[i])); } recordContainer r = new recordContainer(tableName, hashtable, "update", id); buffer.insertRecord(r); } }
private void DUD(CP2DataStream stream, string tableName, long id) { Hashtable hashtable = new Hashtable(); TableBaseInfo tb = (this.buffer.tables[tableName] as TableBaseInfo); if (tb != null) { recordContainer r = new recordContainer(tableName, null, "delete_less", id); this.buffer.insertRecord(r); } }
private void DI(CP2DataStream stream, string tableName, CP2Record rec) { /*if (tableName == "common") { string t = rec.GetValAsVariant("isin_id").ToString(); if (t == "194834") parent.parent.logMsg("to queue :" + rec.GetValAsVariant("best_buy").ToString()); }*/ Hashtable hashtable = new Hashtable(); TableBaseInfo tb = (this.buffer.tables[tableName] as TableBaseInfo); if (tb != null) { for (int i = 0; i < tb.fieldsArr.Length; i++) { hashtable.Add(tb.fieldsArr[i],rec.GetValAsString(tb.fieldsArr[i])); } recordContainer r = new recordContainer(tableName, hashtable, "insert", 0); this.buffer.insertRecord(r); } }