private void btn_Getir_Click(object sender, EventArgs e)
        {
            if (txtAdres.Text.Trim() == "")
            {
                return;
            }

            Cursor.Current = Cursors.WaitCursor;

            try
            {
                WS_Kontrol.service       srv = new KoctasMobil.WS_Kontrol.service();
                WS_Kontrol.ZkmobilReturn ret = new KoctasMobil.WS_Kontrol.ZkmobilReturn();

                WS_Kontrol.ZktmobilChckAdr         chkAddres = new KoctasMobil.WS_Kontrol.ZktmobilChckAdr();
                WS_Kontrol.ZktmobilChckAdrResponse resp      = new KoctasMobil.WS_Kontrol.ZktmobilChckAdrResponse();

                chkAddres.EReturn = ret;

                adres = txtAdres.Text.Trim().ToUpper();
                chkAddres.IAddress = adres;


                srv.Credentials = ProgramGlobalData.g_credential;
                srv.Url         = Utility.getWsUrl("zktmobil_kontrol");
                resp            = srv.ZktmobilChckAdr(chkAddres);



                if (resp.EReturn.RcCode.ToUpper() == "E")
                {
                    //Eger adres tanımlı değil ise
                    txtAdres.Text = "";
                    MessageBox.Show(resp.EReturn.RcText, "HATA");
                }
                else
                {
                    txt_malzemeNo.Enabled = true;
                    txt_malzemeNo.Focus();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "HATA");
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
        }
Exemplo n.º 2
0
        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();
                }
            }
        }
Exemplo n.º 3
0
        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;
            }
        }