public TableBaseInfo(DataBuffer parent, string name,string insType,string _updParams,string delAllType,string saveRev,string lrr,int use_broker_id)
        {
            this.parent=parent;
            this.name = name;
            this.insType = insType;
            this.use_broker_id = use_broker_id;
            // список параметров при update
            // если пустой то берем по умолчанию
            this.updParams = _updParams.Split(new char[] { ',' });
            if (_updParams.Trim()=="")
                this.updParams=new string[] {"replRev"};

            this.delAllType = delAllType;
            this.fields = parent.parent.TableSet.get_FieldList(this.name);
            this.fieldsArr = this.fields.Split(new char[] { ',' });
            this.saveRev = Convert.ToInt32(saveRev);
            this.resetRevOnChangeLiveNum = Convert.ToInt32(lrr);
            // generate hashtable types
            genFieldsTypes();
        }
Beispiel #2
0
        public MyStream(BaseStream parent,string fname,string sname,string prefix,string connStr,uint timeout)
        {
            this.parent = parent;
            this.StreamName = fname;
            this.full_name = fname;
            this.short_name = sname;
            this.prefix = prefix;
            this.timeout = timeout;

            CP2TableSet tableset = new CP2TableSetClass();
            tableset.InitFromIni2((this.parent.parent as MainForm).schemeIni, short_name);
            this.TableSet = tableset;
            this.buffer = new DataBuffer(this,this.full_name,connStr + ";Timeout=360;CommandTimeout=360;");

            this.StreamDataInserted+=new IP2DataStreamEvents_StreamDataInsertedEventHandler(this.DI);
            this.StreamDataDeleted+=new IP2DataStreamEvents_StreamDataDeletedEventHandler(this.DD);
            this.StreamDataUpdated+=new IP2DataStreamEvents_StreamDataUpdatedEventHandler(this.DU);
            this.StreamLifeNumChanged += new IP2DataStreamEvents_StreamLifeNumChangedEventHandler(this.lifeNumChanged);
            this.StreamDatumDeleted += new IP2DataStreamEvents_StreamDatumDeletedEventHandler(this.DUD);
        }