Exemplo n.º 1
0
    public static IEnumerable GetDebtsByPeriod(string accountID, DateTime b_period, DateTime e_period)
    {
        int i_owner = 1032; // код поставщика, выдаетс¤ администратором системы

        var    client = new ServiceIntegratorClient(new ServiceIntegrator(ServiceUrl.Url));
        string ticket = client.GetAuthorizationTicket(IdentityCredential.User, IdentityCredential.Password);

        var factory = new GetTRICDebtsByPeriodFactory(client);

        var xmlRoot = new XmlBuilder("Accounts");

        var accountElement = new XmlBuilder("Account");

        accountElement.AddAttribute("accountID", accountID);
        string b_period_str = b_period.ToString("dd.MM.yyyy");
        string e_period_str = e_period.ToString("dd.MM.yyyy");

        accountElement.AddAttribute("b_period", b_period_str);
        accountElement.AddAttribute("e_period", e_period_str);

        xmlRoot.AddElement(accountElement.Build());

        string xmlAccounts = xmlRoot.Build().ToString();

        var response = factory.Make(new object[] { i_owner, xmlAccounts }, ticket);

        return(response.Tables[0].Rows);
    }
Exemplo n.º 2
0
    public static IEnumerable GetLawsuits(int typeLawsuit) // 1-судебные приказы, 2-иски, 3-претензии
    {
        var    client = new ServiceIntegratorClient(new ServiceIntegrator(ServiceUrl.Url));
        string ticket = client.GetAuthorizationTicket(IdentityCredential.User, IdentityCredential.Password);

        var factory  = new GetTRICLawsuitsFactory(client);
        var response = factory.Make(new object[] { typeLawsuit }, ticket);

        return(response.Tables[0].Rows);
    }
Exemplo n.º 3
0
    public static IEnumerable GetDebtsTotal(int i_lschet)
    {
        var    client = new ServiceIntegratorClient(new ServiceIntegrator(ServiceUrl.Url));
        string ticket = client.GetAuthorizationTicket(IdentityCredential.User, IdentityCredential.Password);

        var factory = new GetTRICDebtsTotalFactory(client);

        string i_owner = "1032"; // код поставщика: "Тепло Тюмени - филиал ПАО СУЭНКО"

        var response = factory.Make(new object[] { i_owner, i_lschet }, ticket);

        return(response.Tables[0].Rows);
    }
Exemplo n.º 4
0
    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);
    }