protected override void OnStartup(StartupEventArgs e) { Properties.Settings App = new Properties.Settings(); // провереям подключение к WebService var client = new EDIWebServiceSoapClient("EDIWebServiceSoap"); string result = client.Relationships(App.LoginWebService, App.PasswordWebService, 1000).Res; client.Close(); if (!String.IsNullOrEmpty(SoapRequest.ResultWebRequest(result))) { MessageBox.Show(SoapRequest.ResultWebRequest(result), "Подключения к WebService", MessageBoxButton.OK, MessageBoxImage.Error); SettingWebSerice settingForm = new SettingWebSerice(); settingForm.ShowDialog(); // перезагружаем приложение System.Diagnostics.Process.Start(Application.ResourceAssembly.Location); Application.Current.Shutdown(); } // проверяем подключения к бд if (!StatusApp.CheckConnection()) { MessageBox.Show("Нет соединение с базой данных , проверьте параметры подключения или обратитесь к системному администратору ", "Cоединение с базой данных", MessageBoxButton.OK, MessageBoxImage.Hand); ConnectionDataBase.ChangeConnect(); } }
public static List <ComarchEDIGetDocOrderInfoBuyerFromXml_Result> InfoBuyer(string partnerIln, string documentType, string trackingId, string changeDocumentStatus = "R", string documentStandard = "XML") { EDIWebServiceSoapClient client = new EDIWebServiceSoapClient("EDIWebServiceSoap"); string docXML = client.Receive(App.LoginWebService, App.PasswordWebService, partnerIln, documentType, trackingId, documentStandard, changeDocumentStatus, 1000).Cnt; client.Close(); return(StoredProcedureItems.getInfoBuyer(docXML)); }
public static List <RelationshipsFromXml_Result> Relationships(string documentType = "ORDER") { EDIWebServiceSoapClient client = new EDIWebServiceSoapClient("EDIWebServiceSoap"); string docXML = client.Relationships(App.LoginWebService, App.PasswordWebService, 1000).Cnt; client.Close(); return(StoredProcedureItems.getDataRelationships(docXML, documentType)); }
public static List <ComarchEDIGetListMBFromXml_Result> DataListMBEx(string partnerIln, string documentType, string documentVersion, string dateFrom, string dateTo, string documentStatus = "A", string itemFrom = "1", string itemTo = "300", string documentStandard = "XML", string documentTest = "P") { EDIWebServiceSoapClient client = new EDIWebServiceSoapClient("EDIWebServiceSoap"); string docXML = client.ListMBEx(App.LoginWebService, App.PasswordWebService, partnerIln, documentType, documentVersion, documentStandard, documentTest, dateFrom, dateTo, itemFrom, itemTo, documentStatus, 1000).Cnt; client.Close(); return(StoredProcedureItems.getDataListMB(docXML)); }
public static string Send(string partnerIln, string documentType, string documentVersion, string controlNumber, string documentContent, string documentStandard = "XML", string documentTest = "P") { EDIWebServiceSoapClient client = new EDIWebServiceSoapClient("EDIWebServiceSoap"); string res = client.Send(App.LoginWebService, App.PasswordWebService, partnerIln, documentType, documentVersion, documentStandard, documentTest, controlNumber, documentContent, 5000).Res; client.Close(); return(res); }