Esempio n. 1
0
        private void patHistoryBtn_Click(object sender, EventArgs e)
        {
            int             ri   = dataGridView1.SelectedCells[0].RowIndex;
            int             p_id = Convert.ToInt16(dataGridView1.Rows[ri].Cells[0].Value);
            string          name = Convert.ToString(dataGridView1.Rows[ri].Cells[1].Value) + Convert.ToString(dataGridView1.Rows[ri].Cells[2].Value) + " " + Convert.ToString(dataGridView1.Rows[ri].Cells[3].Value);
            int             age  = Convert.ToInt16(dataGridView1.Rows[ri].Cells[4].Value);
            patient_history ph   = new patient_history(p_id, name, age);

            ph.ShowDialog();
        }
Esempio n. 2
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            long id = DataSet.InsertUserInfo(firstNameTB.Text, middleNameTB.Text, lastNameTB.Text, telephoneTB.Text, genderCB.Text, Convert.ToInt16(ageTB.Text), addressTB.Text,
                                             cityTB.Text, govTB.Text, occupTB.Text, maritalstatusCB.Text, mensTB.Text, firstvisitDP.Value.Date);

            DataSet.InsertHistoryFirstTime(DateTime.Now.Date, id);
            DataSet.InsertExamFirst(id);
            MessageBox.Show("Patient id is:" + id);
            patient_history f2 = new patient_history(id, firstNameTB.Text + middleNameTB.Text + lastNameTB.Text, Convert.ToInt16(ageTB.Text));

            this.Hide();
            f2.ShowDialog();
            this.Close();
        }