Esempio n. 1
0
        private void toolStripMenuItem1_Click(object sender, EventArgs e)
        {
            var tooltext = "Die nächste Bestellnummer ist : " + Environment.NewLine + Environment.NewLine;

            try
            {
                printumBestellung neueBestellung = new printumBestellung();
                neueBestellung.Bestellung_ID = neueBestellung.getNextBestellnr();

                tooltext += "   " + neueBestellung.BestellungIDText + Environment.NewLine + "   . ";

                MessageBox.Show(tooltext);
            }
            catch (Exception ex)
            {
                Helper.LogHelper.WriteDebugLog(ex.ToString());
            }
        }
Esempio n. 2
0
        private void button2_neueBestellung_Click(object sender, EventArgs e)
        {
            var tvNode = this.treeView1.SelectedNode;

            if (tvNode == null)
            {
                MessageBox.Show("Wie..." + Environment.NewLine +
                                Environment.NewLine +
                                "kein Projekt ausgewählt?");
            }
            else
            {
                this.Cursor = Cursors.WaitCursor;
                printumBestellung neueBestellung = new printumBestellung();
                neueBestellung.Bestellung_ID = neueBestellung.getNextBestellnr();



                try
                {
                    var item = this.treeView1.SelectedNode;

                    printumProjekt currProjekt = (printumProjekt)item.Tag;

                    neueBestellung.Projektnummer     = currProjekt.Projektnummer;
                    neueBestellung.ProjektnummerText = currProjekt.Projektnummer.ToString();
                }
                catch (Exception es)
                {
                    var bal = es.ToString();
                }

                Form2_Bestellung FormBestellung = new Form2_Bestellung(neueBestellung, alleAdressen);
                var FormErgebniss = FormBestellung.ShowDialog();

                this.bestellungenTableAdapter.Fill(this.dataSet11.Bestellungen);

                this.Cursor = Cursors.Default;
            }
        }