protected void BtnLogin_Click(object sender, DirectEventArgs e)
 {
     if (Text_User.Text == "")
     {
         Common._NotificationShow("请输入正确工号!");
     }
     else
     {
         string[] Astr = checkuser(Text_User.Text);
         if (Astr[2] == "NU" || Astr[2] == "DC" || Astr[2] == "DH")
         {
             Session["USER_NAME"]  = getUserName(Text_User.Text);
             Session["USER_ID"]    = Text_User.Text;
             Session["USER_RIGHT"] = Astr[2];
             e.Success             = true;
             X.Redirect("ipad_Default.aspx");
         }
         else
         {
             Common._NotificationShow("请重新输入!");
             Text_User.Text = "";
             Text_User.Focus(false, 100);
         }
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!X.IsAjaxRequest)
     {
         Text_User.Focus(false, 100);
     }
 }
示例#3
0
 protected void BtnLogin_Click(object sender, DirectEventArgs e)
 {
     _UserID = Text_User.Text;
     if (Text_User.Text == "" || Text_Pass.Text == "")
     {
         Common._NotificationShow("请输入正确代号及密码!");
         errcnt.Text = (Convert.ToInt16(errcnt.Text) + 1).ToString();
     }
     else
     {
         string[] Astr = checkuser(Text_User.Text);
         if (Astr[1] == Text_Pass.Text)
         {
             if (Astr[2] == "NU" || Astr[2] == "DC" || Astr[2] == "DH")
             {
                 Session["USER_NAME"]  = getUserName(_UserID);
                 Session["USER_ID"]    = _UserID;
                 Session["USER_RIGHT"] = Astr[2];
                 X.Redirect("ipad_detaillist_117.aspx?patient_id=" + patient_id.Text +
                            "&patient_name=" + patient_name.Text +
                            "&machine_type=" + machine_type.Text +
                            "&mechine_model=" + mechine_model.Text +
                            "&hpack=" + hpack.Text +
                            "&hpack3=" + hpack3.Text +
                            "&patient_weight=" + patient_weight.Text +
                            "&bedno=" + bedno.Text +
                            "&floor=" + floor.Text +
                            "&area=" + area.Text +
                            "&time=" + time.Text +
                            "&daytyp=" + daytyp.Text);
             }
             else
             {
                 Common._NotificationShow("只有醫師可開立醫囑,请重新输入!");
             }
         }
         else
         {
             Common._NotificationShow("密码错误,请重新输入!");
             errcnt.Text = (Convert.ToInt16(errcnt.Text) + 1).ToString();
         }
     }
     Text_User.Text = "";
     Text_Pass.Text = "";
     Text_User.Focus(false, 100);
     if (errcnt.Text == "3")
     {
         X.Redirect("ipad_PatientList.aspx?pid=" + patient_id.Text +
                    "&floor=" + floor.Text +
                    "&area=" + area.Text +
                    "&time=" + time.Text +
                    "&bedno=" + bedno.Text +
                    "&daytyp=");
     }
 }
示例#4
0
 protected void BtnLogin_Click(object sender, DirectEventArgs e)
 {
     if (CheckRight())
     {
         e.Success = true;
         Window1.Close();
         X.Redirect("ipad_index.aspx");
     }
     else
     {
         Text_User.Text = "";
         Text_User.Focus(false, 100);
         Common._NotificationShow("请重新输入!");
     }
 }
示例#5
0
        protected void text_click(object sender, DirectEventArgs e)
        {
            string key = e.ExtraParams["keynum"].ToString();

            if (key == "13")
            {
                if (CheckRight())
                {
                    e.Success = true;
                    Window1.Close();
                    X.Redirect("ipad_index.aspx");
                }
                else
                {
                    Text_User.Text = "";
                    Text_User.Focus(false, 100);
                    Common._NotificationShow("请重新输入!");
                }
            }
        }
示例#6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                patient_id.Text        = Request.QueryString["patient_id"];
                patient_name.Text      = Request.QueryString["patient_name"];
                machine_type.Text      = Request.QueryString["machine_type"];
                hpack.Text             = Request.QueryString["hpack"];
                bedno.Text             = Request.QueryString["bedno"];
                floor.Text             = Request.QueryString["floor"];
                area.Text              = Request.QueryString["area"];
                time.Text              = Request.QueryString["time"];
                daytyp.Text            = Request.QueryString["daytyp"];
                hpack3.Text            = Request.QueryString["hpack3"];
                mechine_model.Text     = Request.QueryString["mechine_model"];
                txt_weight_before.Text = Request.QueryString["patient_weight"];
                errcnt.Text            = "0";

                if (patient_name.Text == null)
                {
                    patient_name.Text      = Request.QueryString["amp;patient_name"];
                    machine_type.Text      = Request.QueryString["amp;machine_type"];
                    hpack.Text             = Request.QueryString["amp;hpack"];
                    bedno.Text             = Request.QueryString["amp;bedno"];
                    floor.Text             = Request.QueryString["amp;floor"];
                    area.Text              = Request.QueryString["amp;area"];
                    time.Text              = Request.QueryString["amp;time"];
                    daytyp.Text            = Request.QueryString["amp;daytyp"];
                    hpack3.Text            = Request.QueryString["amp;hpack3"];
                    mechine_model.Text     = Request.QueryString["amp;mechine_model"];
                    txt_weight_before.Text = Request.QueryString["amp;patient_weight"];
                    errcnt.Text            = "0";
                }
                Text_User.Focus(false, 100);
            }
        }
示例#7
0
        protected void BtnLogin_Click(object sender, DirectEventArgs e)
        {
            _UserID = Text_User.Text;
            if (Text_User.Text == "" || Text_Pass.Text == "")
            {
                Common._NotificationShow("请输入正确代号及密码!");
            }
            else
            {
                string    ipath = "localhost";
                string    sql   = "SELECT genst_desc FROM general_setup WHERE genst_ctg='IPConnect'";
                DataTable dt    = db.Query(sql);
                if (dt.Rows.Count > 0)
                {
                    ipath = @"http://" + dt.Rows[0]["genst_desc"].ToString(); //路徑從資料庫取得
                }
                sql  = "SELECT acclv_passwd, acclv_type FROM access_level ";
                sql += "WHERE acclv_stfcode='" + Text_User.Text + "' ";
                dt   = db.Query(sql);

                if (dt.Rows.Count == 1)
                {
                    string          url = ipath + "/myhaisv4/gettype.php?USER_ID=" + Text_User.Text;
                    HttpWebRequest  MyHttpWebRequest  = (HttpWebRequest)WebRequest.Create(url);
                    HttpWebResponse MyHttpWebResponse = (HttpWebResponse)MyHttpWebRequest.GetResponse();
                    Stream          MyStream          = MyHttpWebResponse.GetResponseStream();
                    StreamReader    MyStreamReader    = new StreamReader(MyStream, Encoding.GetEncoding("UTF-8"));
                    string          getdata           = MyStreamReader.ReadToEnd();
                    MyStreamReader.Close();
                    MyStream.Close();

                    string[] Astr = Regex.Split(getdata, ",");
                    if (Astr[1] == Text_Pass.Text)
                    {
                        if (Astr[2] == "DC" || Astr[2] == "DH")
                        {
                            Session["USER_NAME"]  = getUserName(_UserID);
                            Session["USER_ID"]    = _UserID;
                            Session["USER_RIGHT"] = Astr[2];
                            X.Redirect("PatientList.aspx");
                        }
                        else if (Astr[2] == "NU")
                        {
                            Session["USER_NAME"]  = getUserName(_UserID);
                            Session["USER_ID"]    = _UserID;
                            Session["USER_RIGHT"] = Astr[2];
                            X.Redirect("PatientList_Nurse.aspx");
                        }
                        else
                        {
                            Common._NotificationShow("只有醫師可開立醫囑,请重新输入!");
                        }
                    }
                    else
                    {
                        Common._NotificationShow("密码错误,请重新输入!");
                    }
                }
                else
                {
                    Common._NotificationShow("工号不存在,请重新输入!");
                }
            }
            Text_User.Text = "";
            Text_Pass.Text = "";
            Text_User.Focus(false, 100);
        }