Beispiel #1
0
		public void ConvertToString_ValueShouldBeStringEmpty()
		{
			BasicParameter b = new BasicParameter();
			b.ParameterName = "name1";
			Assert.IsNotNull(b);
			Assert.AreEqual("name1",b.ParameterName);
		}
Beispiel #2
0
		public void CreateParameter_ValueShouldBeNull()
		{
			BasicParameter b = new BasicParameter();
			b.ParameterName = "name1";
			Assert.IsNotNull(b);
			Assert.AreEqual("name1",b.ParameterName);
			Assert.AreEqual(null,b.ParameterValue);
		}
Beispiel #3
0
        private static void SetReportParam(IReportModel model, BasicParameter param)
        {
            var p = model.ReportSettings.ParameterCollection.Find(param.ParameterName);

            if (p != null)
            {
                p.ParameterValue = param.ParameterValue;
            }
        }
        private static void SetReportParam(IReportModel model, BasicParameter param)
        {
            Console.WriteLine("ReportEngine:SetReportParameters");
            var p = model.ReportSettings.ParameterCollection.Find(param.ParameterName);

            if (p != null)
            {
                p.ParameterValue = param.ParameterValue;
            }
        }
        internal static void CheckForParameters(IReportModel model, ReportParameters reportParameters)
        {
            if (reportParameters != null)
            {
                if (reportParameters.SortColumnCollection.Count > 0)
                {
                    model.ReportSettings.SortColumnCollection.AddRange(reportParameters.SortColumnCollection);
                }

                if (reportParameters.SqlParameters.Count > 0)
                {
                    foreach (BasicParameter bp in reportParameters.SqlParameters)
                    {
                        BasicParameter p = model.ReportSettings.ParameterCollection.Find(bp.ParameterName);
                        if (p != null)
                        {
                            p.ParameterValue = bp.ParameterValue;
                        }
                    }
                }
            }
        }
Beispiel #6
0
		public void ParameterWithnameAndValue()
		{
			BasicParameter b = new BasicParameter("par1","value1");
			Assert.AreEqual("par1",b.ParameterName);
			Assert.AreEqual("value1",b.ParameterValue);
		}
Beispiel #7
0
		public void CreateEmptyParameter()
		{
			BasicParameter b = new BasicParameter();
			Assert.IsNotNull(b);
		}
Beispiel #8
0
		private void SetParams (BasicParameter p)
		{
				string s = String.Format(System.Globalization.CultureInfo.CurrentCulture,
				                         "{0}[{1}]",p.ParameterName,p.ParameterValue);
				ParameterNode node = new ParameterNode(s,columnIcon);
				this.nodeParams.Nodes.Add(node);
		}
Beispiel #9
0
		private static void SetReportParam (IReportModel model,BasicParameter param)
		{
			var p = model.ReportSettings.ParameterCollection.Find(param.ParameterName);
			if (p != null) {
				p.ParameterValue = param.ParameterValue;
			}
		}
Beispiel #10
0
		private static void SetReportParam (IReportModel model,BasicParameter param)
		{
			Console.WriteLine("ReportEngine:SetReportParameters");
			var p = model.ReportSettings.ParameterCollection.Find(param.ParameterName);
			if (p != null) {
				p.ParameterValue = param.ParameterValue;
			}
		}