Пример #1
0
        public void AddParameter()
        {
            var parameter = new ParameterInfoLocalizable(Parameters[0].Key, ParameterInfoType.EditableParameter, "", null, null);

            Parameters.Add(parameter);
            AvailableRemove = true;
        }
Пример #2
0
        private KeyValuePair <QueryKey, IList <ParameterInfoLocalizable> > ParseQuery(TemplateNodeQueryInfo queryInfo)
        {
            var queryParameters = new List <ParameterInfoLocalizable>();

            if (queryInfo is TemplateNodeSqlGuardQueryInfo)
            {
                var guardQueryInfo = queryInfo as TemplateNodeSqlGuardQueryInfo;

                queryParameters.Add(new ParameterInfoLocalizable(queryInfo.IdsHierarchy,
                                                                 ParameterInfoType.Attribute, "QueryCodeColumn", guardQueryInfo.QueryCodeColumn, null));
                queryParameters.Add(new ParameterInfoLocalizable(queryInfo.IdsHierarchy,
                                                                 ParameterInfoType.Attribute, "QueryObjectColumn", guardQueryInfo.QueryObjectColumn, null));
                queryParameters.Add(new ParameterInfoLocalizable(queryInfo.IdsHierarchy,
                                                                 ParameterInfoType.Attribute, "IncludedIssue", guardQueryInfo.IncludedIssue, null));
                queryParameters.Add(new ParameterInfoLocalizable(queryInfo.IdsHierarchy,
                                                                 ParameterInfoType.Attribute, "ExcludedIssue", guardQueryInfo.ExcludedIssue, null));
                queryParameters.Add(new ParameterInfoLocalizable(queryInfo.IdsHierarchy,
                                                                 ParameterInfoType.Attribute, "AddSummary", guardQueryInfo.AddSummary.ToString(), null));
            }

            foreach (ParameterValue paramValue in queryInfo.ParameterValues)
            {
                ParameterInfoLocalizable paramInfo = new ParameterInfoLocalizable(
                    queryInfo.IdsHierarchy,
                    ParameterInfoType.Parameter,
                    paramValue.Name,
                    paramValue.StringValue,
                    paramValue.UserValue,
                    paramValue.Locales
                    );

                queryParameters.Add(paramInfo);
            }

            return(new KeyValuePair <QueryKey, IList <ParameterInfoLocalizable> >(
                       new QueryKey(queryInfo), queryParameters));
        }
Пример #3
0
		private KeyValuePair<QueryKey, IList<ParameterInfoLocalizable>> ParseQuery(TemplateNodeQueryInfo queryInfo)
		{
			var queryParameters = new List<ParameterInfoLocalizable>();

			if (queryInfo is TemplateNodeSqlGuardQueryInfo)
			{
				var guardQueryInfo = queryInfo as TemplateNodeSqlGuardQueryInfo;

				queryParameters.Add(new ParameterInfoLocalizable(queryInfo.IdsHierarchy,
					ParameterInfoType.Attribute, "QueryCodeColumn", guardQueryInfo.QueryCodeColumn, null));
				queryParameters.Add(new ParameterInfoLocalizable(queryInfo.IdsHierarchy,
					ParameterInfoType.Attribute, "QueryObjectColumn", guardQueryInfo.QueryObjectColumn, null));
				queryParameters.Add(new ParameterInfoLocalizable(queryInfo.IdsHierarchy,
					ParameterInfoType.Attribute, "IncludedIssue", guardQueryInfo.IncludedIssue, null));
				queryParameters.Add(new ParameterInfoLocalizable(queryInfo.IdsHierarchy,
					ParameterInfoType.Attribute, "ExcludedIssue", guardQueryInfo.ExcludedIssue, null));
				queryParameters.Add(new ParameterInfoLocalizable(queryInfo.IdsHierarchy,
					ParameterInfoType.Attribute, "AddSummary", guardQueryInfo.AddSummary.ToString(), null));
			}

			foreach (ParameterValue paramValue in queryInfo.ParameterValues)
			{
				ParameterInfoLocalizable paramInfo = new ParameterInfoLocalizable(
					queryInfo.IdsHierarchy,
					ParameterInfoType.Parameter,
					paramValue.Name,
					paramValue.StringValue,
					paramValue.UserValue,
					paramValue.Locales
				);

				queryParameters.Add(paramInfo);
			}

			return new KeyValuePair<QueryKey, IList<ParameterInfoLocalizable>>(
				new QueryKey(queryInfo),queryParameters);
		}
Пример #4
0
		public void AddParameter()
		{
			var parameter = new ParameterInfoLocalizable(Parameters[0].Key, ParameterInfoType.EditableParameter, "", null, null);

			Parameters.Add(parameter);
			AvailableRemove = true;
		}