示例#1
0
        private void button2_Click(object sender, EventArgs e)
        {
            var d = doctor.ToCheckLoginCredentials(_de);


            if (d == null)
            {
                MessageBox.Show("Pleasy, TRY AGAIN!");
                return;
            }

            else
            {
                userName.Text = "";
                password.Text = "";

                _de.doctorUserName   = d.Rows[0][0].ToString();
                _de.doctorPassword   = d.Rows[0][1].ToString();
                _de.doctorName       = d.Rows[0][2].ToString();
                _de.doctorSpeciality = d.Rows[0][3].ToString();

                MainMDIForm obj = new MainMDIForm(_de);
                obj.Show();

                this.Hide();
            }
        }
        private void doneProcess_Click(object sender, EventArgs e)
        {
            if (_pd.insertRow(patient))
            {
                MessageBox.Show("Information Saved!");
                completeStatus = true;

                initPatientEntity();

                MdiParent.Close();

                MainMDIForm obj = new MainMDIForm(doctor);
                obj.getPatient(_pe);
                obj.Show();

                this.Hide();
            }
            else
            {
                MessageBox.Show("Unseccessful Attempt!");
                getAddress.Text  = "";
                getFullName.Text = "";
                getGender.Text   = "";
                return;
            }
        }
        private void goTreatment_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 0)
            {
                return;
            }

            PatientEntity pe = dataGridView1.SelectedRows[0].DataBoundItem as PatientEntity;

            MessageBox.Show(pe.patientName + " is selected!");

            MdiParent.Close();

            MainMDIForm obj = new MainMDIForm(doctor);

            obj.getPatient(pe);
            obj.Show();

            this.Hide();
        }
        private void acceptButton_Click(object sender, EventArgs e)
        {
            if (dd.insertRow(de))
            {
                MessageBox.Show("Information Saved!");
                initDoctorEntity();
                dName.Text       = "";
                dUserName.Text   = "";
                dPassword.Text   = "";
                dSpeciality.Text = "";

                MainMDIForm obj = new MainMDIForm(_de);
                obj.Show();

                this.Hide();
            }
            else
            {
                MessageBox.Show("Unsuccessful attempt - TRY AGAIN!");
                return;
            }
        }