Пример #1
0
        private void btn_avail_doc_Click(object sender, EventArgs e)
        {
            DBhelper.execute("display_available_doctor");
            dataTable = DBhelper.read("select d_id,deptname from doctor where d_id not in (select d_id from doc_patient)");
            string res = string.Join(Environment.NewLine, dataTable.Rows.OfType <DataRow>().Select(x => string.Join(" ; ", x.ItemArray)));

            MessageBox.Show(res);
        }
Пример #2
0
 void loadPatients()
 {
     dataTable = DBhelper.read("select patient.P_ID as ID,PNAME as Name,AGE as Age,SYMPTOMS as Symptoms,NUM_OF_DAYS_ADMITTED as Days_admitted, STATUS as status " +
                               "from patient " +
                               "where patient.department='" + dept + "' and status='admitted'");
     if (dataTable != null)
     {
         grid_patients_dept.DataSource = dataTable;
     }
 }
Пример #3
0
 void loadPatients()
 {
     dataTable = DBhelper.read("select patient.p_id as ID,pname as NAME,age,symptoms,occupation,num_of_days_admitted as STAY,appoint_date as APPOINTMENT_DATE,wname as WARD,status " +
                               "from patient,appointment,ward_table " +
                               "where patient.p_id=appointment.p_id and patient.p_id=ward_table.p_id and r_id='" + r_id + "'");
     if (dataTable != null)
     {
         grid_patient_reception.DataSource = dataTable;
     }
 }
 void loadPatients()
 {
     dataTable = DBhelper.read("select patient.P_ID as ID,PNAME as Name,AGE as Age,SYMPTOMS as Symptoms,NUM_OF_DAYS_ADMITTED as Days_admitted, STATUS as status " +
                               "from patient,ward_table,ward " +
                               "where patient.p_id=ward_table.p_id and ward_table.wname=ward.wname and ward.wname='" + ward + "' and status='admitted'");
     if (dataTable != null)
     {
         grid_patient_ward.DataSource = dataTable;
         int wardCount = grid_patient_ward.RowCount;
         lbl_ward_count.Text = wardcount.ToString();
     }
 }
Пример #5
0
 private void btn_bill_Click(object sender, EventArgs e)
 {
     if (grid_patient_reception.SelectedCells.Count > 0)
     {
         int             selectedrowindex = grid_patient_reception.SelectedCells[0].RowIndex;
         DataGridViewRow selectedRow      = grid_patient_reception.Rows[selectedrowindex];
         string          patient          = Convert.ToString(selectedRow.Cells["ID"].Value);
         dataTable = DBhelper.read("select * from administration where p_id='" + patient + "'");
         string res = string.Join(Environment.NewLine, dataTable.Rows.OfType <DataRow>().Select(x => string.Join(" ; ", x.ItemArray)));
         MessageBox.Show(res);
     }
 }
Пример #6
0
        public ui_reception_landing(String id)
        {
            InitializeComponent();
            r_id      = id;
            dataTable = DBhelper.read("select * from receptionist where r_id='" + r_id + "'");
            DataRow dataRow = dataTable.Rows[0];

            name = dataRow["RNAME"].ToString();
            lbl_recep_name.Text = name;
            this.Text           = r_id;
            loadPatients();
        }
Пример #7
0
        public ui_add_patient(String id, String name)
        {
            InitializeComponent();
            r_id          = id;
            this.name     = name;
            lbl_r_id.Text = r_id;
            this.Text     = "New Patient";
            enableAdd();
            DataTable dataTable = DBhelper.read("select deptname from department");

            list_dept.DataSource    = dataTable;
            list_dept.DisplayMember = "DEPTNAME";
        }
        public ui_nurse_landing(String id)
        {
            InitializeComponent();
            n_id      = id;
            dataTable = DBhelper.read("select * from nurse where n_id='" + n_id + "'");
            DataRow dataRow = dataTable.Rows[0];

            name = dataRow["NNAME"].ToString();
            ward = dataRow["WNAME"].ToString();
            lbl_nurse_name.Text = name;
            lbl_nurse_ward.Text = ward;
            lbl_ward_count.Text = wardcount + " patients in ward";
            this.Text           = id;
            loadPatients();
        }
Пример #9
0
        public ui_doctor_landing(String id)
        {
            InitializeComponent();
            d_id      = id;
            dataTable = DBhelper.read("select * from doctor where d_id='" + d_id + "'");
            DataRow dataRow = dataTable.Rows[0];

            name                   = dataRow["NAME"].ToString();
            dept                   = dataRow["DEPTNAME"].ToString();
            queue                  = dataRow["ASSIGNED_PATIENTS"].ToString();
            lbl_doc_name.Text      = name;
            lbl_doc_dept.Text      = dept;
            lbl_patient_queue.Text = queue;
            this.Text              = d_id;
            loadPatients();
        }