Exemple #1
0
        private bool DispatchMessage_Custom(DataRow dataRow, ref string strResponse)
        {
            string strFieldName      = GWDataDB.GetTableName(GWDataDB.GetTable(_entity.Context.ConfigMgr.Config.MessageDispatchConfig.TableName)) + "_" + _entity.Context.ConfigMgr.Config.MessageDispatchConfig.FieldName;
            string strConditionValue = dataRow[strFieldName].ToString();

            string[] valueSubscribers = _entity.Context.ConfigMgr.Config.MessageDispatchConfig.ValueSubscriber.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
            foreach (string str in valueSubscribers)
            {
                if (str.Equals(strConditionValue))
                {
                    return(DispatchMessage_Publish(dataRow));
                }
            }

            string[] valueResponsers = _entity.Context.ConfigMgr.Config.MessageDispatchConfig.ValueResponser.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
            foreach (string str in valueResponsers)
            {
                if (str.Equals(strConditionValue))
                {
                    return(DispatchMessage_Request(dataRow, ref strResponse));
                }
            }

            _entity.Context.Log.Write(LogType.Error, "Can not determine how to dispath the following dataset according to current configuration.");
            _entity.Context.Log.Write(LogType.Error, SerializeDataRowToXml(dataRow));

            strResponse = _entity.Context.ConfigMgr.Config.GetBrokerErrorMessageContent();
            return(false);
        }
Exemple #2
0
        private GWDataDBTable GetTable()
        {
            string str = _comboTable.SelectedItem as string;

            return(GWDataDB.GetTable(str));
        }
Exemple #3
0
        public GWDataDBTable GetTable()
        {
            string str = this.comboBoxTable.SelectedItem as string;

            return(GWDataDB.GetTable(str));
        }