Пример #1
0
		public void TestCreateTypeAndSnapshot()
		{
			var companyID = new Guid("e649e5e1-98c4-4601-a83c-4657028d0e17");
			var userID = new Guid("1b477f9a-1170-4a53-af28-12eec6fb1310");
			var ownerID = companyID;

			IImardaReport channel = ImardaProxyManager.Instance.IImardaReportProxy;
			var service = ImardaProxyManager.Instance.${Proxy};
				ChannelInvoker.Invoke(delegate(out IClientChannel channel)
				{
					channel = service as IC				var parameters = new ParamsForCreateLinkedReportType
				{
					CompanyID = companyID,
					UserID = userID,
					Name = "Travel",
					Version = "1",
					OwnerID = ownerID,
					ReportParameters = "hello|world"
				};

				GetItemResponse<ReportType> resp1 = channel.CreateLinkedReportType(parameters.AsGenericRequest());
				Assert.IsTrue(resp1 != null);
				Assert.IsTrue(resp1.Status);
				Assert.IsTrue(resp1.Item != null);

				Guid rtID = resp1.Item.ID;
				var req = new GenericRequest(rtID);
				GetItemResponse<Report> resp2 = channel.CreateSnapshot(req);
				Assert.IsTrue(resp2 != null);
				Assert.IsTrue(resp2.Status);
				Assert.IsTrue(resp2.Item != null);
				var report = resp2.Item;
				string url = report.GetReportURL("60.234.77.199");
				Process.Start(url);
			}
		}
Пример #2
0
		public void TestCreateLinkedReportType()
		{
			//GetItemResponse<ReportType> CreateLinkedReportType(GenericRequest req);

			var companyID = new Guid("e649e5e1-98c4-4601-a83c-4657028d0e17");
			var userID = new Guid("1b477f9a-1170-4a53-af28-12eec6fb1310");
			var ownerID = companyID;

			IImardaReport channel = ImardaProxyManager.Instance.IImardaReportProxy;
			var service = ImardaProxyManager.Instance.${Proxy};
				ChannelInvoker.Invoke(delegate(out IClientChannel channel)
				{
					channel = service as IC				var parameters = new ParamsForCreateLinkedReportType
				{
					CompanyID = companyID,
					UserID = userID,
					Name = "Travel",
					Version = "1",
					OwnerID = ownerID,
					ReportParameters = "hello|world"
				};

				GetItemResponse<ReportType> resp = channel.CreateLinkedReportType(parameters.AsGenericRequest());
				Assert.IsTrue(resp != null);
				Assert.IsTrue(resp.Status);
				Assert.IsTrue(resp.Item != null);
			}
		}