Example #1
0
        private void btnInsert_Click(object sender, EventArgs e)
        {
            if (tbPLZ.Text == string.Empty || tbOrt.Text == string.Empty)
            {
                MessageBox.Show("Bitte Eingabefelder vollständig erfassen.", "Eingabe", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                tbPLZ.Focus();
                return;
            }

            int plz = 0;

            if (!int.TryParse(tbPLZ.Text, out plz))
            {
                MessageBox.Show("Ungültige PLZ eingetragen.", "Eingabe", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                tbPLZ.Focus();
                return;
            }

            // Ort einfügen
            if (ArztDB.InsertOrt(plz, tbOrt.Text))
            {
                // Liste anzeigen
                OrtListe();
            }
        }
Example #2
0
        private void btnCalc_Click(object sender, EventArgs e)
        {
            lbResult.Text = "0";

            int result = ArztDB.GetNumKonsultation(tbDiagnose.Text);

            lbResult.Text = result.ToString();
        }
Example #3
0
        private void btnCalc_Click(object sender, EventArgs e)
        {
            // Methode GetNumKonsultation() aufrufen
            string diagnose = tbDiagnose.Text;

            // Resultat an lbResult.Text zuweisen
            int result = ArztDB.GetNumKonsultation(diagnose);

            lbResult.Text = result.ToString();
        }
Example #4
0
        /// <summary>
        /// Stored procedure aufrufen
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnCalc_Click(object sender, EventArgs e)
        {
            int z1 = Convert.ToInt32(tbZ1.Text);
            int z2 = Convert.ToInt32(tbZ2.Text);
            int z3 = Convert.ToInt32(tbZ3.Text);
            int z4 = Convert.ToInt32(tbZ4.Text);
            int z5 = Convert.ToInt32(tbZ5.Text);

            int result = ArztDB.Scores(z1, z2, z3, z4, z5);

            lbResult.Text = result.ToString();
        }
Example #5
0
        private void btnLoad_Click(object sender, EventArgs e)
        {
            DataSet ds = ArztDB.ArztListe();

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                int row = dgvList.Rows.Add();
                dgvList.Rows[row].Cells[0].Value = dr["AZT_ID"];
                dgvList.Rows[row].Cells[1].Value = dr["AZT_NAME"];
                dgvList.Rows[row].Cells[2].Value = dr["PLZ_ID"];
                dgvList.Rows[row].Cells[3].Value = dr["PLZ_ORT"];
            }
        }
Example #6
0
        private void OrtListe()
        {
            dgvOrt.Rows.Clear();

            DataSet ds = ArztDB.PlzListe();

            if (ds != null)
            {
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    int row = dgvOrt.Rows.Add();
                    dgvOrt.Rows[row].Cells[0].Value = dr["PLZ_ID"];
                    dgvOrt.Rows[row].Cells[1].Value = dr["PLZ_ORT"];
                }
            }
        }