public void StartOperation(String AdressAppServer) { WebReference.WebSDataBrCode BrServer = new WebReference.WebSDataBrCode(); BrServer.SoapVersion = System.Web.Services.Protocols.SoapProtocolVersion.Soap12; BrServer.Url = AdressAppServer; BrServer.BrHeaderValue = CBrHeader.GetHeader(); BrServer.Credentials = new NetworkCredential(CBrHeader.Login, CBrHeader.Password); DataTable result = BrServer.POST_EU_LIST_RZDN_AGR(label, Rzdn, TimeOperation); }
private void POST_EU_LIST_RZDN_AGR() { WebReference.WebSDataBrCode BrServer = new WebReference.WebSDataBrCode(); BrServer.SoapVersion = System.Web.Services.Protocols.SoapProtocolVersion.Soap12; BrServer.Url = set.AdressAppServer; BrServer.BrHeaderValue = CBrHeader.GetHeader(); BrServer.Credentials = new NetworkCredential(CBrHeader.Login, CBrHeader.Password); if (BufferToBD.ModeNetTerminalB) {//Если мы в Онлайне try { DataTable result = BrServer.POST_EU_LIST_RZDN_AGR(listEU.ToArray(), this.RZDN, null); dataGridEu.BackColor = Color.MediumAquamarine; OpenNETCF.Media.SystemSounds.Beep.Play(); } catch (System.Net.WebException ex) { dataGridEu.BackColor = Color.LemonChiffon; BufferToBD.ModeNetTerminalB = false; CLog.WriteException("QueueTaskEU.cs", "POST_EU_LIST_RZDN_AGR", ex.ToString()); //Отправляем в буфер BufferOper_POST_EU_LIST_RZDN_AGR Oper = new BufferOper_POST_EU_LIST_RZDN_AGR(this.RZDN, listEU.ToArray()); BufferToBD.BufferAdd(new BufferOperation(TypeClassBuffer.POST_EU_LIST_RZDN_AGR, Oper)); OpenNETCF.Media.SystemSounds.Beep.Play(); Thread.Sleep(100); OpenNETCF.Media.SystemSounds.Beep.Play(); } catch (System.Net.Sockets.SocketException ex) {//На случай если во время выполнения сломается связть dataGridEu.BackColor = Color.LemonChiffon; BufferToBD.ModeNetTerminalB = false; CLog.WriteException("WarehousePost.cs", "TaskMove", ex.ToString()); //Отправляем в буфер BufferOper_POST_EU_LIST_RZDN_AGR Oper = new BufferOper_POST_EU_LIST_RZDN_AGR(this.RZDN, listEU.ToArray()); BufferToBD.BufferAdd(new BufferOperation(TypeClassBuffer.POST_EU_LIST_RZDN_AGR, Oper)); OpenNETCF.Media.SystemSounds.Beep.Play(); Thread.Sleep(100); OpenNETCF.Media.SystemSounds.Beep.Play(); } } else {//Если мы в Офлайне BufferOper_POST_EU_LIST_RZDN_AGR Oper = new BufferOper_POST_EU_LIST_RZDN_AGR(this.RZDN, listEU.ToArray()); BufferToBD.BufferAdd(new BufferOperation(TypeClassBuffer.POST_EU_LIST_RZDN_AGR, Oper)); dataGridEu.BackColor = Color.LemonChiffon; OpenNETCF.Media.SystemSounds.Beep.Play(); Thread.Sleep(100); OpenNETCF.Media.SystemSounds.Beep.Play(); } }