public void ageLoad() { opd opd = new opd(); opd.patientAge(textBox1.Text); age = opd.age; }
public void loadDOB(string ID) { opd opd = new opd(); opd.patientAge(ID); textBox4.Text = opd.dob.Substring(8, 2); textBox5.Text = opd.dob.Substring(5, 2); textBox6.Text = opd.dob.Substring(0, 4); }
public void ageLoad() { opd opd = new opd(); opd.patientAge(textBox1.Text); age = opd.age; opd.totalPatientVisits(textBox1.Text); opdCount = opd.visits; }
private void button7_Click(object sender, EventArgs e) { if (textBox4.Text != "") { opd opd = new opd(); dbconnect db = new dbconnect(); opd.duplicatePatientSlip(textBox4.Text, db); if (opd.dr.Read()) { //MessageBox.Show(opd.dr[9].ToString()); opd.patientAge(db.dr[0].ToString()); medicine_id = opd.dr[9].ToString().Split(','); medicines = opd.dr[10].ToString().Split(','); dosage = opd.dr[11].ToString().Split(','); quantity = opd.dr[12].ToString().Split(','); id = db.dr[0].ToString(); symptoms = db.dr[1].ToString(); remarks = db.dr[2].ToString(); doctor = db.dr[3].ToString(); date = db.dr[4].ToString().Substring(6, 2) + "-" + db.dr[4].ToString().Substring(4, 2) + "-" + db.dr[4].ToString().Substring(0, 4); name = db.dr[5].ToString(); gender = db.dr[7].ToString(); age = opd.age.ToString(); for (int i = 0; i < medicine_id.Length; i++) { if (medicine_id[i] == "LP") { LP = true; break; } } if (MessageBox.Show("Are you sure you want to Print Duplicate Patient Slip??", "Duplicat Patient Slip??", MessageBoxButtons.YesNo) == DialogResult.Yes) { printDocument1.Print(); // printPreviewDialog1.ShowDialog(); } } else { MessageBox.Show("Invalid OPD!!"); } db.dbclose(); } }
private void button1_Click(object sender, EventArgs e) { bool details = false; opd opd = new opd(); dbconnect db = new dbconnect(); opd.getPatientDetailsHistory(textBox1.Text, db); if (opd.dr.Read()) { id = textBox1.Text; name = opd.dr[0].ToString(); gender = opd.dr[1].ToString(); familyHead = opd.dr[2].ToString(); details = true; } else { MessageBox.Show("Invalid Patient ID!!"); db.dbclose(); } db.reader_close(); if (details) { opdCount = 0; medicineCount = 0; opd.patientAge(id); age = opd.age.ToString(); opd.getPatientOPDHistory(textBox1.Text, db); while (opd.dr.Read()) { medicine_id = opd.dr[2].ToString().Split(','); medicineCount += medicine_id.Length; opdCount += 1; } db.dbclose(); printPreviewDialog1.ShowDialog(); } }