Beispiel #1
0
        private async Task RequestFillNameStation(IEnumerable <Station> stations)
        {
            //DEBUG-- ЗАПРОС
            XmlRegularityShService xmlRegShService = new XmlRegularityShService();
            var station = new Station {
                EcpCode = 19600
            };
            var xmlRequest = xmlRegShService.GetRequestStationsName(stations);

            xmlRequest.Save(Path.Combine(Environment.CurrentDirectory, $"doc_{1111}.xml")); //DEBUG



            string address    = "http://10.17.224.85:810";
            string intetfaces = "GetPlacesInfo";
            // string intetfaces = "GetScheduleDynamic4Place";
            //string intetfaces = "GetTrainInfo";
            string uri     = $"{address}/{intetfaces}";
            var    xmlResp = await XmlTransaction.PostXmlTransaction(uri, xmlRequest);

            xmlResp.Save(Path.Combine(Environment.CurrentDirectory, $"doc_{2222}.xml")); //DEBUG


            ////DEBUG-- ОТВЕТ
            //var newRegSh = xmlRegShService.SetResponseStationsName(xmlResp, stations);
        }
Beispiel #2
0
        public async Task RequestRegulatorySchedule()
        {
            StatusRegSh = Status.LoadRegSh;

            //DEBUG-- ЗАПРОС
            XmlRegularityShService xmlRegShService = new XmlRegularityShService();
            var station = new Station {
                EcpCode = 19600
            };
            var xmlRequest = xmlRegShService.GetRequest(station);



            string address    = "http://10.17.224.85:810";
            string intetfaces = "GetScheduleNormative4Place";
            // string intetfaces = "GetScheduleDynamic4Place";
            //string intetfaces = "GetTrainInfo";
            string uri     = $"{address}/{intetfaces}";
            var    xmlResp = await XmlTransaction.PostXmlTransaction(uri, xmlRequest);



            //DEBUG-- ОТВЕТ
            //var doc = XDocument.Load(Path.Combine(Environment.CurrentDirectory, "xmlRespRegSh.xml"));
            var newRegSh = xmlRegShService.SetResponse(xmlResp, station);


            StatusRegSh = Status.ProcessingRegSh;
            await DbAcsessRegSh(newRegSh, uri);



            StatusRegSh = Status.SaveDbRegSh;


            StatusRegSh = Status.OkRegSh;
        }