private void btn_Kaydet_Click(object sender, EventArgs e) { if (txtPaletNo.Text.Trim() == "") { return; } txtPaletNo.Text = txtPaletNo.Text.ToUpper(); Cursor.Current = Cursors.WaitCursor; try { //Palet no geçerli ise yazma işlemi yapılıyor WS_Islem.ZKT_WM_WS_ISLEMService srv = new KoctasWM_Project.WS_Islem.ZKT_WM_WS_ISLEMService(); WS_Islem.ZKtWmWsSatinalmaGiris chk = new KoctasWM_Project.WS_Islem.ZKtWmWsSatinalmaGiris(); WS_Islem.ZKtWmWsSatinalmaGirisResponse resp = new KoctasWM_Project.WS_Islem.ZKtWmWsSatinalmaGirisResponse(); chk.IvLenum = txtPaletNo.Text.ToString().Trim(); chk.IvMatnr = malzemeNo; chk.IvMiktar = miktar; srv.Credentials = GlobalData.globalCr; srv.Url = Utility.getWsUrlForWM("zkt_wm_ws_islem"); resp = srv.ZKtWmWsSatinalmaGiris(chk); if (resp.EsResponse.Length > 0) { //Mesajlar düzenleniyor GlobalData.rMsg = new KoctasWM_Project.WS_Islem.ZktWmReturn[resp.EsResponse.Length]; GlobalData.rMsg = Utility.mesajDuzenle(resp.EsResponse); if (GlobalData.rMsg[0].Msgty.ToString().ToUpper() == "E") { MessageBox.Show(GlobalData.rMsg[0].Message.ToString(), "HATA"); if (GlobalData.rMsg[0].Message.ToString().Contains("miktar")) { Utility.selectText(txtMiktar); } else if (GlobalData.rMsg[0].Message.ToString().Contains("adres")) { Utility.selectText(txtPaletNo); } } else if ((GlobalData.rMsg[0].Msgty.ToString().ToUpper() == "S") || (GlobalData.rMsg[0].Msgty.ToString().ToUpper() == "W") || (GlobalData.rMsg[0].Msgty.ToString().ToUpper() == "I")) { MessageBox.Show(GlobalData.rMsg[0].Message.ToString(), "BİLGİ"); Utility.moreMsgCheck(GlobalData.rMsg); formAcilisDuzenle(); } else { MessageBox.Show(GlobalData.rMsg[0].Message.ToString(), "BİLİNMEYEN DURUM"); if (GlobalData.rMsg[0].Message.ToString().Contains("miktar")) { Utility.selectText(txtMiktar); } else if (GlobalData.rMsg[0].Message.ToString().Contains("adres")) { Utility.selectText(txtPaletNo); } } } else { MessageBox.Show("EsResponse dönüş değeri hatalı", "HATA"); } } catch (Exception ex) { MessageBox.Show(ex.Message, "HATA"); } finally { Cursor.Current = Cursors.Default; } }