protected void BtnAccept_Click(object sender, DirectEventArgs e)
        {
            string sql = "";
            string ildrgcode;

            docname = Session["USER_NAME"].ToString();

            if (cb_druglist.Text == "")
            {
                Common._ErrorMsgShow("注意 : *注记为 '必填栏位' ");
                return;
            }

            sql  = "SELECT drg_code FROM drug_list ";
            sql += "WHERE drg_name='" + cb_druglist.Text + "'";
            DataTable dt = db.Query(sql);

            if (dt.Rows.Count > 0)
            {
                ildrgcode = dt.Rows[0]["drg_code"].ToString();
            }
            else
            {
                ildrgcode = "";
            }

            string toTime = DateTime.Now.ToString("HH:mm");

            if (drugkind.Text == "S")
            {
                sql  = "INSERT INTO shortterm_ordermgt(shord_patic,shord_dateord,shord_timeord,shord_usr1,";
                sql += "shord_drug,shord_actst,shord_dtactst,shord_usr2,shord_comment,shord_intake,shord_freq,shord_nurs,shord_medway) ";
                sql += "VALUES('" + Patient_ID.Text + "','" + toDay + "','" + toTime + "','" + docname;
                sql += "','" + ildrgcode + "','00001','','','" + txt_ordremark.Text + "','" + txt_ordcount.Text + "','" + Common.GetComboBoxText(cb_ordfreq) + "','','" + Common.GetComboBoxText(cb_medway) + "')";
            }
            else if (drugkind.Text == "SE")
            {
                sql  = "UPDATE shortterm_ordermgt SET ";
                sql += "shord_timeord='" + toDay + "', ";
                sql += "shord_usr2='" + docname + "', ";
                sql += "shord_drug='" + ildrgcode + "', ";
                sql += "shord_intake='" + txt_ordcount.Text + "', ";
                sql += "shord_freq='" + Common.GetComboBoxText(cb_ordfreq) + "', ";
                sql += "shord_medway='" + Common.GetComboBoxText(cb_medway) + "', ";
                sql += "shord_comment='" + txt_ordremark.Text + "', ";
                sql += "shord_dtactst='" + toDay + "' ";
                sql += "WHERE shord_id='" + id.Text + "' ";
            }

            db.Excute(sql);

            cb_druglist.Text   = "";
            txt_ordcount.Text  = "";
            txt_ordremark.Text = "";
            cb_ordfreq.Text    = "";
            cb_medway.Text     = "";
            Window_Drug.Hide();
            Show_Shortdrug();
        }
        protected void BtnDelete_Click(object sender, DirectEventArgs e)
        {
            string sql = "DELETE FROM shortterm_ordermgt WHERE shord_id='" + id.Text + "' ";

            db.Excute(sql);
            Window_Drug.Hide();
            Show_Shortdrug();
            Common._NotificationShow("删除医嘱用药");
        }
 protected void BtnAddShort_Click(object sender, DirectEventArgs e)
 {
     Load_ComboBox();
     drugkind.Text      = "S";
     txt_ordcount.Text  = "";
     txt_ordremark.Text = "";
     Window_Drug.Title  = "短期医嘱用药";
     Window_Drug.Show();
     cb_druglist.Focus(false, 100);
 }
        protected void BtnStop_Click(object sender, DirectEventArgs e)
        {
            string sql = "UPDATE shortterm_ordermgt SET shord_actst='00002', shord_dtactst='" + toDay + "' ";

            sql += "WHERE shord_id='" + id.Text + "' ";
            db.Excute(sql);
            Window_Drug.Hide();

            Show_Shortdrug();
            Common._NotificationShow("停用医嘱用药");
        }
 protected void EditShort_Click(object sender, DirectEventArgs e)
 {
     Load_ComboBox();
     drugkind.Text      = "SE";
     id.Text            = e.ExtraParams["id"];
     cb_druglist.Text   = e.ExtraParams["name"];
     txt_ordcount.Text  = e.ExtraParams["intake"];
     txt_ordremark.Text = e.ExtraParams["comment"];
     Common.SetComboBox(cb_medway, e.ExtraParams["medway"]);
     Common.SetComboBox(cb_ordfreq, e.ExtraParams["freq"]);
     Window_Drug.Title = "短期医嘱用药";
     Window_Drug.Show();
     cb_druglist.Focus(false, 100);
 }
 protected void BtnCancel_Click(object sender, DirectEventArgs e)
 {
     cb_druglist.Text = "";
     Window_Drug.Hide();
 }