public void SetUp() { // пользователя и пароль можно получить у администратора Гелиос string user = IdentityCredential.User; string password = IdentityCredential.Password; this.columnNamesInResponse = "cod_pl,i_people,FIO,d_born,isMain,PlaceBorn,b_period,e_period,periodName"; this.client = ServiceIntegratorClientFactory.Make(WebServiceUrl.Url); this.ticket = this.client.GetAuthorizationTicket(user, password); this.factory = new GetTRICLivingsFactory(client); }
public static IEnumerable GetLivings(string accountID, int b_period, int e_period) { var client = new ServiceIntegratorClient(new ServiceIntegrator(ServiceUrl.Url)); string ticket = client.GetAuthorizationTicket(IdentityCredential.User, IdentityCredential.Password); var factory = new GetTRICLivingsFactory(client); var xmlRoot = new XmlBuilder("Accounts"); var accountElement = new XmlBuilder("Account"); accountElement.AddAttribute("accountID", accountID); accountElement.AddAttribute("b_period", b_period); accountElement.AddAttribute("e_period", e_period); xmlRoot.AddElement(accountElement.Build()); string xmlAccounts = xmlRoot.Build().ToString(); var response = factory.Make(new object[] { xmlAccounts, 3 }, ticket); return(response.Tables[0].Rows); }