예제 #1
0
    public void filldropmenu()
    {
        DataTable dt = category.fillcategory();

        if (dt.Rows.Count == 0)
        {
        }
        else
        {
            Repeater23.DataSource = dt;

            Repeater23.DataBind();
            foreach (DataListItem Item in Repeater23.Items)
            {
                bindnested(Item.ItemIndex);
            }
        }
    }
예제 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Session["DoctorGUID"] == null)
            {
                Util.ShowMessage("用户登录超时,请重新登录!", "Login.aspx");
                Response.End();
            }
            else
            {
                if (Request.QueryString["GUID"] != null)
                {
                    using (SqlConnection conn = new DB().GetConnection())
                    {
                        GUIDS = Request.QueryString["GUID"].ToString();
                        SqlCommand cmd = conn.CreateCommand();
                        cmd.CommandText = "select * from Patient where GUID=@GUID";
                        cmd.Parameters.AddWithValue("@GUID", Request.QueryString["GUID"].ToString());
                        conn.Open();
                        SqlDataReader rd = cmd.ExecuteReader();
                        if (rd.Read())
                        {
                            Patient.Text  = rd["PatientName"].ToString();
                            GUID.Text     = rd["GUID"].ToString();
                            Sex.Text      = rd["Sex"].ToString();
                            Birthday.Text = String.Format("{0:yyyy-MM-dd}", rd["Birthday"]);
                            Num1.Text     = rd["Num1"].ToString();

                            Phone1.Text = rd["Phone1"].ToString();
                        }
                        rd.Close();

                        DoctorGUID.Text = Session["DoctorGUID"].ToString();
                        cmd.CommandText = "select * from Doctor where GUID=@DoctorGUID";
                        cmd.Parameters.AddWithValue("@DoctorGUID", DoctorGUID.Text);
                        rd = cmd.ExecuteReader();
                        if (rd.Read())
                        {
                            DoctorName.Text = rd["DoctorName"].ToString();
                        }
                        rd.Close();

                        // T1
                        cmd.CommandText = "select GUID,EndDT from T1 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater1.DataSource = rd;
                        Repeater1.DataBind();
                        rd.Close();

                        // T2
                        cmd.CommandText = "select GUID,EndDT from T2 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater2.DataSource = rd;
                        Repeater2.DataBind();
                        rd.Close();

                        // T3
                        cmd.CommandText = "select GUID,EndDT from T3 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater3.DataSource = rd;
                        Repeater3.DataBind();
                        rd.Close();

                        // T4
                        cmd.CommandText = "select GUID,EndDT from T4 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater4.DataSource = rd;
                        Repeater4.DataBind();
                        rd.Close();

                        // T5
                        cmd.CommandText = "select GUID,EndDT from T5 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater5.DataSource = rd;
                        Repeater5.DataBind();
                        rd.Close();

                        // T6
                        cmd.CommandText = "select GUID,EndDT from T6 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater6.DataSource = rd;
                        Repeater6.DataBind();
                        rd.Close();

                        // T7
                        cmd.CommandText = "select GUID,EndDT from T7 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater7.DataSource = rd;
                        Repeater7.DataBind();
                        rd.Close();

                        //T8
                        cmd.CommandText = "select GUID,EndDT from T8 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater8.DataSource = rd;
                        Repeater8.DataBind();
                        rd.Close();

                        // T9
                        cmd.CommandText = "select GUID,EndDT from T9 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater9.DataSource = rd;
                        Repeater9.DataBind();
                        rd.Close();

                        // T10
                        cmd.CommandText = "select GUID,EndDT from T10 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater10.DataSource = rd;
                        Repeater10.DataBind();
                        rd.Close();

                        // T11
                        cmd.CommandText = "select GUID,EndDT from T11 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater11.DataSource = rd;
                        Repeater11.DataBind();
                        rd.Close();

                        // T12
                        cmd.CommandText = "select GUID,EndDT from T12 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater12.DataSource = rd;
                        Repeater12.DataBind();
                        rd.Close();

                        // T13
                        cmd.CommandText = "select GUID,EndDT from T13 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater13.DataSource = rd;
                        Repeater13.DataBind();
                        rd.Close();

                        // T14
                        cmd.CommandText = "select GUID,EndDT from T14 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater14.DataSource = rd;
                        Repeater14.DataBind();
                        rd.Close();

                        // T15
                        cmd.CommandText = "select GUID,EndDT from T15 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater15.DataSource = rd;
                        Repeater15.DataBind();
                        rd.Close();

                        // T16
                        cmd.CommandText = "select GUID,EndDT from T16 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater16.DataSource = rd;
                        Repeater16.DataBind();
                        rd.Close();

                        // T17
                        cmd.CommandText = "select GUID,EndDT from T17 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater17.DataSource = rd;
                        Repeater17.DataBind();
                        rd.Close();

                        // T18
                        cmd.CommandText = "select GUID,EndDT from T18 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater18.DataSource = rd;
                        Repeater18.DataBind();
                        rd.Close();

                        // T19
                        cmd.CommandText = "select GUID,EndDT from T19 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater19.DataSource = rd;
                        Repeater19.DataBind();
                        rd.Close();

                        // T20
                        cmd.CommandText = "select GUID,EndDT from T20 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater20.DataSource = rd;
                        Repeater20.DataBind();
                        rd.Close();

                        // T21
                        cmd.CommandText = "select GUID,EndDT from T21 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater21.DataSource = rd;
                        Repeater21.DataBind();
                        rd.Close();

                        // T22
                        cmd.CommandText = "select GUID,EndDT from T22 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater22.DataSource = rd;
                        Repeater22.DataBind();
                        rd.Close();

                        // T23
                        cmd.CommandText = "select GUID,EndDT from T23 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater23.DataSource = rd;
                        Repeater23.DataBind();
                        rd.Close();

                        // T24
                        cmd.CommandText = "select GUID,EndDT from T24 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater24.DataSource = rd;
                        Repeater24.DataBind();
                        rd.Close();

                        // T25
                        cmd.CommandText = "select GUID,EndDT from T25 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater25.DataSource = rd;
                        Repeater25.DataBind();
                        rd.Close();

                        // T26
                        cmd.CommandText = "select GUID,EndDT from T26 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater26.DataSource = rd;
                        Repeater26.DataBind();
                        rd.Close();

                        // T27
                        cmd.CommandText = "select GUID,EndDT from T27 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater27.DataSource = rd;
                        Repeater27.DataBind();
                        rd.Close();

                        // T28
                        cmd.CommandText = "select GUID,EndDT from T28 where PatientGUID=@GUID Order by EndDT Desc";
                        rd = cmd.ExecuteReader();
                        Repeater28.DataSource = rd;
                        Repeater28.DataBind();
                        rd.Close();

                        conn.Close();
                    }
                }
                else
                {
                    Response.Write(" <script> alert(\"请先选择测试对象,再选择其完成的测试进行打印!\");;window.location='Patient_List.aspx'; </script> ");
                }
            }
        }
    }