Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            string query = ("insert into visit_record (vr_weight,vr_height,vr_systolic,vr_diastolic,vr_hearth_rate,vr_date,vr_status,vr_remark,opd_id) values ('" + txtw.Text + "','" + txth.Text + "','" + txts1.Text + "','" + txts2.Text + "','" + txthearth.Text + "',SYSDATETIME(),0,'" + txtremark.Text + "'," + lblopd.Text + ");");

            cmd = new SqlCommand(query, conn);
            sda = new SqlDataAdapter(cmd);
            dt  = new DataTable();
            sda.Fill(dt);

            query = ("Update queue_visit_record set qvr_status = 0 where opd_id = '" + lblopd.Text + "'");

            cmd = new SqlCommand(query, conn);
            sda = new SqlDataAdapter(cmd);
            dt  = new DataTable();
            sda.Fill(dt);
            clinc_nurse_service m4 = new clinc_nurse_service();

            m4.Show();
            clinc_nurse_service clnlog = new clinc_nurse_service();

            clnlog.Close();
            Visible = false;
            MessageBox.Show("บันทึกข้อมูลซักประวัติเรียบร้อย");



            /*string query = ("insert into visit_record (vr_weight,vr_height,vr_systolic,vr_diastolic,vr_hearth_rate,vr_date,vr_remark,opd_id) values ('" + txtw.Text + "','" + txth.Text + "','" + txts1.Text + "','" + txts2.Text + "','" + txthearth.Text + "',SYSDATETIME(),'" + txtremark.Text + "'," + lblopd.Text + ");");
             * cmd = new SqlCommand(query, conn);
             * sda = new SqlDataAdapter(cmd);
             * dt = new DataTable();
             * sda.Fill(dt);
             * MessageBox.Show("บันทึกข้อมูลซักประวัติเรียบร้อย");*/
        }
Beispiel #2
0
        private void button5_Click(object sender, EventArgs e)
        {
            conn.Open();
            string query = ("insert into queue_diag_room(qdr_date,qdr_time_sent,status_queue,swd_id,opd_id)values (SYSDATETIME(), SYSDATETIME(),1,'" + lblswd.Text + "','" + lblopdid.Text + "');");

            cmd = new SqlCommand(query, conn);
            sda = new SqlDataAdapter(cmd);
            dt  = new DataTable();
            sda.Fill(dt);

            Queue <int> collection = new Queue <int>();

            query = ("select count(*) from queue_diag_room inner join opd on opd.opd_id = queue_diag_room.opd_id inner join schedule_work_doctor on schedule_work_doctor.swd_id = queue_diag_room.swd_id inner join employee_doctor on employee_doctor.emp_doc_id = schedule_work_doctor.emp_doc_id where  queue_diag_room.status_queue = 1 AND schedule_work_doctor.swd_id = '" + lblswd.Text + "'");
            cmd   = new SqlCommand(query, conn);
            sda   = new SqlDataAdapter(cmd);
            dt    = new DataTable();
            sda.Fill(dt);
            //  sdr = cmd.ExecuteReader();
            int queue = (int)cmd.ExecuteScalar();

            collection.Enqueue(queue);

            foreach (int value in collection)
            {
                if (value <= 9)
                {
                    query = ("Update queue_diag_room Set qdr_record = '" + value + "' where opd_id = '" + lblopdid.Text + "'");
                    //
                    cmd = new SqlCommand(query, conn);
                    sda = new SqlDataAdapter(cmd);
                    dt  = new DataTable();
                    sda.Fill(dt);

                    query = ("Update visit_record set vr_status = 1 where opd_id = '" + lblopdid.Text + "'");
                    //
                    cmd = new SqlCommand(query, conn);
                    sda = new SqlDataAdapter(cmd);
                    dt  = new DataTable();
                    sda.Fill(dt);


                    clinc_nurse_service s2 = new clinc_nurse_service();
                    s2.Show();
                    sent_room clnlog = new sent_room();
                    clnlog.Close();
                    Visible = false;
                    MessageBox.Show("ส่งเข้าห้องตรวจเรียบร้อย   คุณคิวที่    " + value);
                }
                else
                {
                    MessageBox.Show("คิวห้องตรวจเต็ม");
                }
            }
            conn.Close();
        }
Beispiel #3
0
        private void pictureBox2_Click(object sender, EventArgs e)
        {
            clinc_nurse_service nurse = new clinc_nurse_service();

            nurse.Show();
        }
Beispiel #4
0
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            clinc_nurse_service ser = new clinc_nurse_service();

            ser.Show();
        }