Esempio n. 1
0
        public void Gbl_Test3()
        {
            IrbisConnection connection = Connection
                                         .ThrowIfNull("Connection");

            GblSettings settings = GblSettings.ForList
                                   (
                connection,
                "IBIS",
                new [] { 1, 2, 3 }
                                   )
                                   .SetFileName("@test");

            GblResult result = connection.GlobalCorrection(settings);

            string text = "Processed: "
                          + result.RecordsProcessed
                          + ", success: "
                          + result.RecordsSucceeded
                          + ", failed: "
                          + result.RecordsFailed
                          + ". "
                          + StringUtility.Join
                          (
                "| ",
                result.Protocol
                          )
                          .SafeSubstring(0, 70);

            Write(text);
        }
Esempio n. 2
0
        public void Gbl_Test2()
        {
            IrbisConnection connection = Connection
                                         .ThrowIfNull("Connection");

            string field3000 = string.Format
                               (
                "'{0}'",
                DateTime.Now
                               );

            GblStatement[] statements =
            {
                new GblStatement
                {
                    Command    = GblCode.Add,
                    Format1    = field3000,
                    Format2    = "XXXXXXXXXXX",
                    Parameter1 = "3000",
                    Parameter2 = "*"
                },
            };

            GblSettings settings = GblSettings.ForList
                                   (
                connection,
                "IBIS",
                new int[] { 1, 2, 3 },
                statements
                                   );

            GblResult result = connection
                               .GlobalCorrection(settings);

            string text = "Processed: "
                          + result.RecordsProcessed
                          + ", success: "
                          + result.RecordsSucceeded
                          + ", failed: "
                          + result.RecordsFailed
                          + ". "
                          + StringUtility.Join
                          (
                "| ",
                result.Protocol
                          )
                          .SafeSubstring(0, 70);

            Write(text);
        }