private void btn_SiparisBirlestir_Click(object sender, EventArgs e) { WS_Satis.ZktmobilSItemslist[] itemslist; try { itemslist = new KoctasMobil.WS_Satis.ZktmobilSItemslist[listlenght]; for (int i = 0; i < listlenght; i++) { itemslist[i] = list_all[i]; } } catch (Exception ex) { MessageBox.Show(ex.Message, "Hata", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1); return; } frm_NormalSiparisYarat frm = new frm_NormalSiparisYarat(itemslist, "", frm_NormalSiparisYarat.Title.birlestir); if (rdb_Transferli.Checked) { frm.Transferli = "X"; } else if (rdb_Normal.Checked) { frm.Transferli = ""; } DialogResult dr = frm.ShowDialog(); if (dr == DialogResult.OK) { grd_Siparisler.DataSource = null; dt_sip.Clear(); grd_Siparisler.DataSource = dt_sip; } }
private void btn_ekle_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; WS_Satis.service SRV = new KoctasMobil.WS_Satis.service(); WS_Satis.ZktmobilItemsGet items = new KoctasMobil.WS_Satis.ZktmobilItemsGet(); WS_Satis.ZktmobilItemsGetResponse itemsresponse = new KoctasMobil.WS_Satis.ZktmobilItemsGetResponse(); WS_Satis.ZktmobilSItemslist[] list = new KoctasMobil.WS_Satis.ZktmobilSItemslist[1]; try { SRV.Url = Utility.getWsUrl("zktmobil_satis"); SRV.Credentials = ProgramGlobalData.g_credential; items.IVbeln = txt_siparisNo.Text.Trim(); items.TiKalemler = list; itemsresponse = SRV.ZktmobilItemsGet(items); if (itemsresponse.TiKalemler.Length == 0) { MessageBox.Show("Siparişin kalemleri bulunamadı, girdiğiniz sipariş numarasını kontrol ediniz.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); return; } grd_Siparisler.DataSource = null; DataRow row = dt_sip.NewRow(); row["SIPARISNO"] = txt_siparisNo.Text.Trim(); dt_sip.Rows.Add(row); grd_Siparisler.DataSource = dt_sip; itemsresponse.TiKalemler.CopyTo(list_all, listlenght); listlenght += itemsresponse.TiKalemler.Length; txt_siparisNo.Text = ""; } catch (Exception ex) { MessageBox.Show(ex.Message, "Hata", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1); } finally { Cursor.Current = Cursors.Default; } }