private void btnUpisi_Click(object sender, EventArgs e) { string msg; if (!IcOK(out msg)) { MessageBox.Show(msg, P.MSGBOX_ERR_TITLE, MessageBoxButtons.OK, MessageBoxIcon.Error); return; } FormInvUpisnik form = new FormInvUpisnik(this.terminal, this.katalog, this.Location, this.Width, this.Height, this.WindowState, this.inventura); form.Show(); this.Close(); }
private void btnLok_Click(object sender, EventArgs e) { txtLokacija.Text = txtLokacija.Text.Trim().ToUpper(); MTrenisClient c = new MTrenisClient(); try { if ("potvrda" == btnLok.Tag.ToString()) { txtLokacija.Text = txtLokacija.Text.ToUpper(); if (!c.LokacijaPostoji(inventura.skladiste, txtLokacija.Text)) { MessageBox.Show(P.LOK_NE_POSTOJI, P.MSGBOX_ERR_TITLE, MessageBoxButtons.OK, MessageBoxIcon.Error); return; } txtLokacija.Enabled = false; btnLok.Text = P.INVUPISNIK_BTNLOK_IZMJENA; btnLok.Tag = "izmjena"; pnlRoba.Enabled = true; btnUpiši.Enabled = true; this.AcceptButton = btnUpiši; txtBarkod.Focus(); } else { FormInvUpisnik form = new FormInvUpisnik(this.terminal, this.katalog, this.Location, this.Width, this.Height, this.WindowState, this.inventura); form.Show(); this.Close(); return; } } catch (FaultException<MTrenisKvar> ex) { MessageBox.Show(ex.Detail.opis, ex.Detail.oznaka.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error); } catch (Exception ex) { MessageBox.Show(ex.Message, P.MSGBOX_ERR_TITLE, MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { if (c != null && c.State != CommunicationState.Closed) { c.Close(); } } }
private void btnNatrag_Click(object sender, EventArgs e) { FormInvUpisnik form = new FormInvUpisnik(this.terminal, this.katalog, this.Location, this.Width, this.Height, this.WindowState, this.inventura); form.Show(); this.Close(); }