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;
            }
        }
Beispiel #2
0
        private void btn_Kontrol_Click(object sender, EventArgs e)
        {
            if (txt_Matnr.Text.Trim() == "" || txtUretimYeri.Text.Trim() == "" || !MlzmChck)
            {
                return;
            }
            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.ZktmobilChckList chcList = new KoctasMobil.WS_Kontrol.ZktmobilChckList();
                chcList.IMatnr = txt_Matnr.Text.Trim();
                chcList.IWerks = txtUretimYeri.Text.Trim();

                WS_Kontrol.ZktmobilChckListResponse Response = SRV.ZktmobilChckList(chcList);

                txtList.Text  = Response.EList.ToUpper();
                txtMeins.Text = Response.EMeins;
                txtLabst.Text = Convert.ToInt32(Response.ELabst).ToString();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "HATA!", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1);
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
        }
Beispiel #3
0
        private void txtUretimYeri_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar != (char)13)
            {
                return;
            }

            txtLabst.Text = txtList.Text = txtMeins.Text = "";

            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.ZktmobilChckWerks chcWerks = new KoctasMobil.WS_Kontrol.ZktmobilChckWerks();
                chcWerks.IWerks  = txtUretimYeri.Text.Trim();
                chcWerks.EReturn = new KoctasMobil.WS_Kontrol.ZkmobilReturn();

                WS_Kontrol.ZktmobilChckWerksResponse Response = SRV.ZktmobilChckWerks(chcWerks);

                if (Response.EReturn.RcCode == "E")
                {
                    MessageBox.Show(Response.EReturn.RcText, "HATA!", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1);
                    Cursor.Current         = Cursors.Default;
                    txtUretimYeriText.Text = "";
                    return;
                }
                else
                {
                    Cursor.Current         = Cursors.Default;
                    txtUretimYeriText.Text = Response.EName;
                    if (txt_Matnr.Text == "")
                    {
                        txt_Matnr.Focus();
                    }
                }

                if (txt_Matnr.Text != "")
                {
                    txt_Matnr_KeyPress(txt_Matnr, new KeyPressEventArgs((char)13));
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "HATA!", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1);
                txtUretimYeriText.Text = "";
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
        }
        private void txtAdres_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)13)
            {
                if (txtAdres.Text.Trim() != "" && !adrChecked)
                {
                    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.ZktmobilChckAdr Adr = new KoctasMobil.WS_Kontrol.ZktmobilChckAdr();
                        Adr.IAddress = txtAdres.Text.ToUpper().Trim();
                        Adr.EReturn  = new KoctasMobil.WS_Kontrol.ZkmobilReturn();

                        WS_Kontrol.ZktmobilChckAdrResponse Response = new KoctasMobil.WS_Kontrol.ZktmobilChckAdrResponse();
                        Response = SRV.ZktmobilChckAdr(Adr);

                        if (Response.EReturn.RcCode == "E")
                        {
                            MessageBox.Show(Response.EReturn.RcText, "HATA!", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1);
                            Cursor.Current = Cursors.Default;
                            return;
                        }
                        else
                        {
                            this.adrChecked = true;
                        }
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message, "HATA!", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1);
                    }
                    finally
                    {
                        Cursor.Current = Cursors.Default;
                    }

                    cmbBoyut.Focus();
                }
            }
        }
        private void btn_Sayim_Click(object sender, EventArgs e)
        {
            if (txtRafAdresi.Text == "")
            {
                return;
            }

            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.ZktmobilChckAdr Adr = new KoctasMobil.WS_Kontrol.ZktmobilChckAdr();
                Adr.IAddress = txtRafAdresi.Text.ToUpper().Trim();
                Adr.EReturn  = new KoctasMobil.WS_Kontrol.ZkmobilReturn();

                WS_Kontrol.ZktmobilChckAdrResponse Response = new KoctasMobil.WS_Kontrol.ZktmobilChckAdrResponse();
                Response = SRV.ZktmobilChckAdr(Adr);

                if (Response.EReturn.RcCode == "E")
                {
                    MessageBox.Show(Response.EReturn.RcText, "HATA!", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1);
                    Cursor.Current = Cursors.Default;
                    return;
                }
                frm_GapGiris frm = new frm_GapGiris();
                Cursor.Current = Cursors.Default;
                frm.Nlpla      = Adr.IAddress;
                frm.ShowDialog();
                txtRafAdresi.Text = "";
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "HATA!", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1);
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
        }