Пример #1
0
        private void paletTamamla()
        {
            logger.info("frm_26_Sayim_Islemleri_Envanter_Sayimi_Sistem_Onerisi_Sayim_paletTamamla begin");
            Cursor.Current = Cursors.WaitCursor;
            try
            {
                WS_Islem.ZKT_WM_WS_ISLEMSERVICE          srv  = new KoctasWM_Project.WS_Islem.ZKT_WM_WS_ISLEMSERVICE();
                WS_Islem.ZKtWmWsSayimAdresiTamam         chk  = new KoctasWM_Project.WS_Islem.ZKtWmWsSayimAdresiTamam();
                WS_Islem.ZKtWmWsSayimAdresiTamamResponse resp = new KoctasWM_Project.WS_Islem.ZKtWmWsSayimAdresiTamamResponse();

                chk.IvLgpla = _depoAdresi.ToString();

                srv.Credentials = GlobalData.globalCr;
                srv.Url         = Utility.getWsUrlForWM("zkt_wm_ws_islem");
                resp            = srv.ZKtWmWsSayimAdresiTamam(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");
                        Utility.selectText(txtMiktar);
                    }
                    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);
                        sayimTamamlandi = true;
                        formSifirla();
                        //Surec tekrar başlıyor
                        frm_26_Sayim_Islemleri_Envanter_Sayimi_Sistem_Onerisi_Sayim_Load(new object(), new EventArgs());
                    }
                    else
                    {
                        MessageBox.Show(GlobalData.rMsg[0].Message.ToString(), "BİLİNMEYEN DURUM");
                        Utility.selectText(txtMiktar);
                    }
                }
                else
                {
                    MessageBox.Show("EsResponse dönüş değeri hatalı", "HATA");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "HATA");
                logger.error("frm_26_Sayim_Islemleri_Envanter_Sayimi_Sistem_Onerisi_Sayim_paletTamamla " + ex.Message);
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
            logger.info("frm_26_Sayim_Islemleri_Envanter_Sayimi_Sistem_Onerisi_Sayim_paletTamamla end");
        }
        private void paletTamamla()
        {
            Cursor.Current = Cursors.WaitCursor;
            try
            {
                WS_Islem.ZKT_WM_WS_ISLEMService          srv  = new KoctasWM_Project.WS_Islem.ZKT_WM_WS_ISLEMService();
                WS_Islem.ZKtWmWsSayimAdresiTamam         chk  = new KoctasWM_Project.WS_Islem.ZKtWmWsSayimAdresiTamam();
                WS_Islem.ZKtWmWsSayimAdresiTamamResponse resp = new KoctasWM_Project.WS_Islem.ZKtWmWsSayimAdresiTamamResponse();

                chk.IvLgpla = _depoAdresi.ToString();

                srv.Credentials = GlobalData.globalCr;
                srv.Url         = Utility.getWsUrlForWM("zkt_wm_ws_islem");
                resp            = srv.ZKtWmWsSayimAdresiTamam(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");
                        Utility.selectText(txtMiktar);
                    }
                    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);
                        sayimTamamlandi = true;
                        formSifirla();
                    }
                    else
                    {
                        MessageBox.Show(GlobalData.rMsg[0].Message.ToString(), "BİLİNMEYEN DURUM");
                        Utility.selectText(txtMiktar);
                    }
                }
                else
                {
                    MessageBox.Show("EsResponse dönüş değeri hatalı", "HATA");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "HATA");
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
        }