private void btn_Kaydet_Click(object sender, EventArgs e) { try { Cursor.Current = Cursors.WaitCursor; WS_Kontrol.service SRV = new WS_Kontrol.service(); SRV.Url = Utility.getWsUrl("zktmobil_kontrol"); SRV.Credentials = ProgramGlobalData.g_credential; WS_Kontrol.ZktmobilSaveTag Tag = new WS_Kontrol.ZktmobilSaveTag(); WS_Kontrol.ZktmobilTag[] items = new WS_Kontrol.ZktmobilTag[dtEtiket.Rows.Count]; for (int i = 0; i < dtEtiket.Rows.Count; i++) { WS_Kontrol.ZktmobilTag item = new WS_Kontrol.ZktmobilTag(); item.IAdet = Convert.ToInt16(dtEtiket.Rows[i]["Adet"].ToString()); item.IBarkod = dtEtiket.Rows[i]["Barkod"].ToString(); item.IBoyut = dtEtiket.Rows[i]["Boyut"].ToString(); item.IRaf = dtEtiket.Rows[i]["Adres"].ToString(); items[i] = item; } Tag.ItTag = items; Tag.EReturn = new WS_Kontrol.ZkmobilReturn[1]; WS_Kontrol.ZktmobilSaveTagResponse Response = SRV.ZktmobilSaveTag(Tag); if (Response.EReturn.Length > 0) { if (Response.EReturn[0].RcCode == "S") { MessageBox.Show(Response.EReturn[0].RcText, "", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1); Cursor.Current = Cursors.Default; txt_Barkod.Text = txt_maktx.Text = txtAdet.Text = txtAdres.Text = ""; cmbBoyut.SelectedIndex = 0; dtEtiket.Rows.Clear(); txt_Barkod.Focus(); } else { MessageBox.Show("İşlem Tamamlanamadı.", "HATA!", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1); Cursor.Current = Cursors.Default; return; } } else { Cursor.Current = Cursors.Default; } } catch (Exception ex) { MessageBox.Show(ex.Message, "HATA!", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1); } finally { Cursor.Current = Cursors.Default; } }
public ZktmobilSaveTagResponse ZktmobilSaveTag([System.Xml.Serialization.XmlElementAttribute("ZktmobilSaveTag", Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")] ZktmobilSaveTag ZktmobilSaveTag1) { object[] results = this.Invoke("ZktmobilSaveTag", new object[] { ZktmobilSaveTag1 }); return((ZktmobilSaveTagResponse)(results[0])); }
/// <remarks/> public System.IAsyncResult BeginZktmobilSaveTag(ZktmobilSaveTag ZktmobilSaveTag1, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("ZktmobilSaveTag", new object[] { ZktmobilSaveTag1 }, callback, asyncState)); }