Exemple #1
0
        static void Main(string[] args)
        {
            DateTime[] dtarr = new DateTime[24];
            DateTime   dt    = new DateTime();

            dt = DateTime.Now;
            List <Lines> lines = new List <Lines>();

            lines = GetAllLines();
            foreach (var item in lines)
            {
                for (int i = 0; i < dtarr.Length; i++)
                {
                    dt = dt.AddMinutes(5);

                    try
                    {
                        ServiceRequestStructure Request = new ServiceRequestStructure();
                        Request.RequestorRef            = new ParticipantRefStructure();
                        Request.RequestorRef.Value      = RequestorRef;
                        Request.RequestTimestamp        = dt;
                        Request.MessageIdentifier       = new MessageQualifierStructure();
                        Request.MessageIdentifier.Value = "11111700:12223351669188:4684";

                        StopMonitoringRequestStructure smrs = new StopMonitoringRequestStructure();
                        smrs.version                     = "IL2.7";
                        smrs.RequestTimestamp            = DateTime.Now;
                        smrs.Language                    = "he";
                        smrs.LineRef                     = new LineRefStructure();
                        smrs.LineRef.Value               = item.Line_ID;//line number
                        smrs.MessageIdentifier           = new MessageQualifierStructure();
                        smrs.MessageIdentifier.Value     = "55";
                        smrs.MonitoringRef               = new MonitoringRefStructure();
                        smrs.MonitoringRef.Value         = item.Dest_Station_ID;//"06109" jerusalm  //"36112" bat yam
                        smrs.MaximumStopVisits           = "30";
                        smrs.PreviewInterval             = "PT60M";
                        smrs.StartTime                   = DateTime.Now;
                        smrs.MinimumStopVisitsPerLine    = "1";
                        Request.StopMonitoringRequest    = new StopMonitoringRequestStructure[1];
                        Request.StopMonitoringRequest[0] = smrs;

                        Siri_sm_demo.ServiceReference1.SOAPPortClient SS = new SOAPPortClient();

                        ServiceDeliveryStructure Response = new ServiceDeliveryStructure();
                        Response = SS.GetStopMonitoringService(Request);

                        int bp = 0;

                        Print_sm_response.print_sm_respone(Response, connection.ToString());
                    }
                    catch (Exception ex)
                    {
                        Console.ReadKey();
                        throw new Exception("Execption adding account. " + ex.Message);
                    }
                }
            }
        }
Exemple #2
0
        static void Main(string[] args)
        {
            ServiceRequestStructure Request = new ServiceRequestStructure();

            Request.RequestorRef            = new ParticipantRefStructure();
            Request.RequestorRef.Value      = RequestorRef;
            Request.RequestTimestamp        = DateTime.Now;
            Request.MessageIdentifier       = new MessageQualifierStructure();
            Request.MessageIdentifier.Value = "11111700:12223351669188:4684";

            StopMonitoringRequestStructure smrs = new StopMonitoringRequestStructure();

            smrs.version                     = "IL2.7";
            smrs.RequestTimestamp            = DateTime.Now;
            smrs.Language                    = "he";
            smrs.MessageIdentifier           = new MessageQualifierStructure();
            smrs.MessageIdentifier.Value     = "55";
            smrs.MonitoringRef               = new MonitoringRefStructure();
            smrs.MonitoringRef.Value         = "32902";
            smrs.MaximumStopVisits           = "30";
            smrs.PreviewInterval             = "PT60M";
            smrs.MinimumStopVisitsPerLine    = "1";
            Request.StopMonitoringRequest    = new StopMonitoringRequestStructure[1];
            Request.StopMonitoringRequest[0] = smrs;

            try
            {
                Siri_sm_demo.ServiceReference1.SOAPPortClient SS = new SOAPPortClient();
                // SiriServices SS = new SiriServices();
                ServiceDeliveryStructure Response = new ServiceDeliveryStructure();
                Response = SS.GetStopMonitoringService(Request);

                int bp = 0;
                // Console.WriteLine(Response.ErrorCondition.Description.Value);
                Print_sm_response.print_sm_respone(Response, connection.ToString());
                Console.ReadKey();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
                Console.ReadKey();
                // throw;
            }
            // Insert_Insert_siri_stations();
        }