Beispiel #1
0
        private void btnCreate_Click(object sender, EventArgs e)
        {
            // Formdan bilgileri al
            long     no            = long.Parse(nupNo.Value.ToString()); // Hasta no
            string   name          = txtName.Text;
            string   surname       = txtSurname.Text;
            string   identity      = txtIdentity.Text;  // TCKN
            DateTime shipment      = dtpShipment.Value; // shipment: Sevk
            bool     is_discharged = chkDischarged.Checked;

            if (name != "" && surname != "" && identity != "")
            {
                // Veritabanına yeni hastayı kayıt et
                PatientManager.Create(no, name, surname, identity, shipment, is_discharged);

                // Mesaj kutusu göster
                MessageBox.Show("New patient successfully created!", "Success!", MessageBoxButtons.OK, MessageBoxIcon.Information);

                // Ana ekrana geri dön (hasta listesine)
                Program.form  = new MainScreen();
                Program.close = false;
                Close();
            }
        }