Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            string query = "insert into PasTab values('" + PatNameTab.Text + "','" + PatHpTab.Text + "','" + PatAddresTab.Text + "','" + DOBDateCb.Value.Date + "','" + GenCb.SelectedItem.ToString() + "','" + PatAllergiesTab.Text + "')";
            Pasien Pat   = new Pasien();

            try
            {
                Pat.AddPatient(query);
                MessageBox.Show("Patient Sucesfully Added");
                populate();
            }catch (Exception Ex)
            {
                MessageBox.Show(Ex.Message);
            }
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            string query = "insert into UserTab values('" + UsNameTab.Text + "'," + UsPassw.Text + ",'" + UsPassw.Text + "')";
            Pasien Pat   = new Pasien();

            try
            {
                Pat.AddPatient(query);
                MessageBox.Show("User Sucesfully Added");
                populate();
            }
            catch (Exception Ex)
            {
                MessageBox.Show(Ex.Message);
            }
        }
Ejemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            string query = "insert into AppointmentTab values('" + PatientCb.SelectedValue.ToString() + "','" + TreatmentCb.SelectedValue.ToString() + "','" + Date.Value.Date + "','" + Time.Value.TimeOfDay + "')";
            Pasien Pat   = new Pasien();

            try
            {
                Pat.AddPatient(query);
                MessageBox.Show("Appointment Sucesfully Recorded");
                populate();
            }
            catch (Exception Ex)
            {
                MessageBox.Show(Ex.Message);
            }
        }
Ejemplo n.º 4
0
        private void button1_Click(object sender, EventArgs e)
        {
            string query = "insert into PrescriptionTab values('" + PasId.SelectedValue.ToString() + "','" + TreatmentTab.Text + "','" + TreatCostTab.Text + "', '" + MedTab.Text + "', '" + QtyTab.Text + "')";
            Pasien Pat   = new Pasien();

            try
            {
                Pat.AddPatient(query);
                MessageBox.Show("Treatment Sucesfully Added");
                populate();
            }
            catch (Exception Ex)
            {
                MessageBox.Show(Ex.Message);
            }
        }