示例#1
0
 private void ddlSkladiste_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (ddlSkladiste.SelectedIndex == 0)
     {
         FormInventura form = new FormInventura(this.terminal, this.katalog, this.Location, this.Width, this.Height, this.WindowState);
         form.Show();
         this.Close();
         return;
     }
     MTrenisClient c = new MTrenisClient();
     try
     {
         MTrenisSVC.Inventura i = c.DohvatiInventuru(ddlSkladiste.SelectedValue.ToString());
         this.inventura = new KInventura(ddlSkladiste.SelectedValue.ToString(), i.godina, i.rBr, i.kontrola, i.vremPoc, i.vremSvrs);
         lblInvGodina.Text = i.godina.ToString();
         lblInvBroj.Text = i.rBr;
         lblInvKontrola.Text = i.kontrola.ToString();
         lblInvTrajanje.Text = i.vremPoc.ToString() + " - " + i.vremSvrs.ToString();
     }
     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();
         }
     }
 }
示例#2
0
 private void mnubtnInventura_Click(object sender, EventArgs e)
 {
     FormInventura form = new FormInventura(this.terminal, this.katalog, new Point(this.Location.X, this.Location.Y), this.Width, this.Height, this.WindowState);
     form.Show();
     this.Close();
 }