protected void OnUpdate(object sender, EventArgs e) { //Find the reference of the Repeater Item. RepeaterItem item = (sender as LinkButton).Parent as RepeaterItem; int ID = int.Parse((item.FindControl("lblID") as Label).Text); string subject = (item.FindControl("txtSubj") as TextBox).Text.Trim(); string homework = (item.FindControl("txtHomework") as TextBox).Text.Trim(); var checkHomework = (from c in db.Homeworks where c.ID.Equals(ID) select c).FirstOrDefault(); checkHomework.Subject = subject; checkHomework.Homework1 = homework; db.SubmitChanges(); Repeater1.DataBind(); Repeater2.DataBind(); Repeater3.DataBind(); Repeater4.DataBind(); Repeater5.DataBind(); Repeater6.DataBind(); Repeater7.DataBind(); Repeater8.DataBind(); Repeater8.DataBind(); Repeater9.DataBind(); Repeater10.DataBind(); Repeater11.DataBind(); Repeater12.DataBind(); Repeater13.DataBind(); Repeater14.DataBind(); Repeater15.DataBind(); }
protected void OnDelete(object sender, EventArgs e) { //Find the reference of the Repeater Item. RepeaterItem item = (sender as LinkButton).Parent as RepeaterItem; int ID = int.Parse((item.FindControl("lblID") as Label).Text); var checkHomework = (from c in db.Homeworks where c.ID.Equals(ID) select c).FirstOrDefault(); db.Homeworks.DeleteOnSubmit(checkHomework); db.SubmitChanges(); Repeater1.DataBind(); Repeater2.DataBind(); Repeater3.DataBind(); Repeater4.DataBind(); Repeater5.DataBind(); Repeater6.DataBind(); Repeater7.DataBind(); Repeater8.DataBind(); Repeater8.DataBind(); Repeater9.DataBind(); Repeater10.DataBind(); Repeater11.DataBind(); Repeater12.DataBind(); Repeater13.DataBind(); Repeater14.DataBind(); Repeater15.DataBind(); }
/// <summary> /// 科室动态 /// </summary> private void BindKSDT() { string strsql = "select * from tunnel_newstype where IsDel=0 and parentid=155"; DataSet das = Tunnel.Data.DbHelperSQL.Query(strsql); if (das.Tables[0].Rows.Count > 0) { Repeater15.DataSource = das; Repeater15.DataBind(); Repeater15.Visible = true; string strsql2 = "select top " + gettop(8 - das.Tables[0].Rows.Count) + " * from tunnel_index where typeid=155 and del=0 and IsDel=0 order by setdate desc "; DataSet das2 = Tunnel.Data.DbHelperSQL.Query(strsql2); Repeater16.DataSource = das2; Repeater16.DataBind(); } else { string strsql2 = "select top 8 * from tunnel_index where typeid=155 and del=0 and IsDel=0 order by setdate desc"; DataSet das2 = Tunnel.Data.DbHelperSQL.Query(strsql2); Repeater16.DataSource = das2; Repeater16.DataBind(); Repeater16.Visible = true; Repeater15.Visible = false; } }
protected void Button1_Click(object sender, EventArgs e) { //last week SqlDataSource2.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource3.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource4.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource5.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource6.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; //this week SqlDataSource7.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource8.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource9.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource10.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource11.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; //next week SqlDataSource12.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource13.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource14.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource15.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource16.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; Repeater1.DataBind(); Repeater2.DataBind(); Repeater3.DataBind(); Repeater4.DataBind(); Repeater5.DataBind(); Repeater6.DataBind(); Repeater7.DataBind(); Repeater8.DataBind(); Repeater8.DataBind(); Repeater9.DataBind(); Repeater10.DataBind(); Repeater11.DataBind(); Repeater12.DataBind(); Repeater13.DataBind(); Repeater14.DataBind(); Repeater15.DataBind(); }
protected void btnAddHomework15_Click(object sender, EventArgs e) { Homework homework = new Homework(); homework.Class = Convert.ToInt32(RadioButtonList1.SelectedValue); homework.Subject = txtAddSubj15.Text; homework.Homework1 = txtAddHomework15.Text; string[] test = date15.Text.Split('/'); string ss = test[1] + "/" + test[0]; homework.Date = Convert.ToDateTime(ss); db.Homeworks.InsertOnSubmit(homework); db.SubmitChanges(); txtAddSubj15.Text = ""; txtAddHomework15.Text = ""; Repeater15.DataBind(); }
protected void FillInvoicesList(DataTable dt_invoices) { Invoice[] invoices = new Invoice[dt_invoices.Rows.Count]; int[] invoiceIDs = new int[dt_invoices.Rows.Count]; int countShowing = 0; dt_invoices.Columns.Add("message_reversed_wiped", typeof(string)); dt_invoices.Columns.Add("td_name", typeof(string)); // for use of td 'name' tag to hide all reversed or hide all rejected dt_invoices.Columns.Add("style_display", typeof(string)); // to set initially reversed and/or rejected as hidden dt_invoices.Columns.Add("inv_debtor", typeof(string)); dt_invoices.Columns.Add("inv_total_due", typeof(decimal)); for (int i = 0; i < dt_invoices.Rows.Count; i++) { Invoice invoice = InvoiceDB.LoadAll(dt_invoices.Rows[i]); invoiceIDs[i] = invoice.InvoiceID; invoices[i] = invoice; if (invoice.ReversedBy != null) { dt_invoices.Rows[i]["message_reversed_wiped"] = "Reversed"; dt_invoices.Rows[i]["td_name"] = "td_reversed"; dt_invoices.Rows[i]["style_display"] = "none"; } else if (invoice.PayerOrganisation != null && (invoice.PayerOrganisation.OrganisationID == -1 || invoice.PayerOrganisation.OrganisationID == -2) && invoice.Total > 0 && invoice.CreditNotesTotal >= invoice.Total) { dt_invoices.Rows[i]["message_reversed_wiped"] = "Rejected"; dt_invoices.Rows[i]["td_name"] = "td_rejected"; dt_invoices.Rows[i]["style_display"] = "none"; } else { countShowing++; } if (invoice.PayerOrganisation != null) { dt_invoices.Rows[i]["inv_debtor"] = invoice.PayerOrganisation.Name; } else if (invoice.PayerPatient != null) { dt_invoices.Rows[i]["inv_debtor"] = invoice.PayerPatient.Person.FullnameWithoutMiddlename; } else { dt_invoices.Rows[i]["inv_debtor"] = invoice.Booking != null && invoice.Booking.Patient != null && invoice.Booking.Patient.Person != null ? invoice.Booking.Patient.Person.FullnameWithoutMiddlename : string.Empty; // empty for invoices without bookings } dt_invoices.Rows[i]["inv_total_due"] = invoice.TotalDue.ToString(); } // single db call to get invoicelines into hashtable lookup by invoice Hashtable invoiceLinesHash = InvoiceLineDB.GetBulkInvoiceLinesByInvoiceID(invoices); dt_invoices.Columns.Add("inv_lines_text", typeof(string)); for (int i = 0; i < dt_invoices.Rows.Count; i++) { Invoice invoice = InvoiceDB.LoadAll(dt_invoices.Rows[i]); InvoiceLine[] invLines = (InvoiceLine[])invoiceLinesHash[invoice.InvoiceID]; bool showAreaTreated = invoice.PayerOrganisation != null && (invoice.PayerOrganisation.OrganisationID == -2 || invoice.PayerOrganisation.OrganisationType.OrganisationTypeID == 150); bool showServiceReference = invoice.PayerOrganisation != null && invoice.PayerOrganisation.OrganisationType.OrganisationTypeID == 150; string output = "<ul style=\"padding-left:14px;\">"; foreach (InvoiceLine invLine in invLines) { string extras = string.Empty; if (showAreaTreated || showServiceReference) { string linkAreaTreated = "<a title=\"Edit\" onclick=\"javascript:window.showModalDialog('Invoice_UpdateAreaTreatedV2.aspx?inv_line=" + invLine.InvoiceLineID + "', '', 'dialogWidth:600px;dialogHeight:275px;center:yes;resizable:no; scroll:no');window.location.href=window.location.href;return false;\" href=\"#\">Edit</a>"; string linkServiceReference = "<a title=\"Edit\" onclick=\"javascript:window.showModalDialog('Invoice_UpdateServiceReferenceV2.aspx?inv_line=" + invLine.InvoiceLineID + "', '', 'dialogWidth:600px;dialogHeight:275px;center:yes;resizable:no; scroll:no');window.location.href=window.location.href;return false;\" href=\"#\">Edit</a>"; extras += "<table>"; if (showAreaTreated) { extras += "<tr><td>Area Treated</td><td style=\"min-width:10px;\"></td><td>" + (invLine.AreaTreated.Length == 0 ? "[EMPTY]" : invLine.AreaTreated) + "</td><td style=\"min-width:10px;\"></td><td>" + linkAreaTreated + "</td></tr>"; } if (showServiceReference) { extras += "<tr><td>Service Reference</td><td style=\"min-width:10px;\"></td><td>" + (invLine.ServiceReference.Length == 0 ? "[EMPTY]" : invLine.ServiceReference) + "</td><td style=\"min-width:10px;\"></td><td>" + linkServiceReference + "</td></tr>"; } extras += "</table>"; } string itemDescr = string.Empty; if (invLine.Offering != null) { itemDescr = invLine.Offering.Name; } if (invLine.Credit != null) { itemDescr = "Voucher: <i>" + invLine.Credit.VoucherDescr + "</i>"; } output += "<li>" + itemDescr + " x " + ((invLine.Quantity % 1) == 0 ? Convert.ToInt32(invLine.Quantity) : invLine.Quantity) + " = " + invLine.Price + (invLine.Tax == 0 ? "" : " (<i>Inc GST</i>)") + (invLine.Patient.Person == null ? "" : " [" + invLine.Patient.Person.FullnameWithoutMiddlename + "]") + extras + "</li>"; } output += "</ul>"; dt_invoices.Rows[i]["inv_lines_text"] = output; if (countShowing == 0) { dt_invoices.Rows[i]["style_display"] = ""; } } //get approximate page width... // 194 = row titles // average row = 340 px (about 220-440) // add 70px for good measure int pageWidth = 194 + 365 * (countShowing == 0 ? 1 : countShowing) + 120; Page.ClientScript.RegisterStartupScript(this.GetType(), "resize_window", "<script language=javascript>window.resizeTo( (" + pageWidth + "+ window.outerWidth - window.innerWidth) < screen.width ? (" + pageWidth + " + window.outerWidth - window.innerWidth) : screen.width , window.outerHeight);</script>"); if (dt_invoices.Rows.Count <= 1) { divToggleShowReversedRejected.Visible = false; } else if (countShowing == 0) { chkShowReversed.Checked = true; chkShowRejected.Checked = true; } // now databind Repeater1.DataSource = dt_invoices; Repeater1.DataBind(); Repeater2.DataSource = dt_invoices; Repeater2.DataBind(); Repeater3.DataSource = dt_invoices; Repeater3.DataBind(); Repeater4.DataSource = dt_invoices; Repeater4.DataBind(); Repeater5.DataSource = dt_invoices; Repeater5.DataBind(); Repeater6.DataSource = dt_invoices; Repeater6.DataBind(); Repeater7.DataSource = dt_invoices; Repeater7.DataBind(); Repeater8.DataSource = dt_invoices; Repeater8.DataBind(); Repeater9.DataSource = dt_invoices; Repeater9.DataBind(); Repeater10.DataSource = dt_invoices; Repeater10.DataBind(); Repeater11.DataSource = dt_invoices; Repeater11.DataBind(); Repeater12.DataSource = dt_invoices; Repeater12.DataBind(); Repeater13.DataSource = dt_invoices; Repeater13.DataBind(); Repeater14.DataSource = dt_invoices; Repeater14.DataBind(); Repeater15.DataSource = dt_invoices; Repeater15.DataBind(); Repeater16.DataSource = dt_invoices; Repeater16.DataBind(); Repeater17.DataSource = dt_invoices; Repeater17.DataBind(); Repeater18.DataSource = dt_invoices; Repeater18.DataBind(); Repeater19.DataSource = dt_invoices; Repeater19.DataBind(); // non booking invoices (ie standard invoices) will not have a booking Booking booking = invoices[0].Booking; if (booking != null) { string patientText = string.Empty; if (booking != null && booking.Patient != null) { patientText = booking.Patient.Person.FullnameWithoutMiddlename; } else if (invoices[0].PayerPatient != null) { patientText = invoices[0].PayerPatient.Person.FullnameWithoutMiddlename; } else { patientText = "< No patient >"; } // show booking info lblBooking_Org.Text = booking.Organisation.Name; lblBooking_Provider.Text = booking.Provider.Person.FullnameWithoutMiddlename; lblBooking_Patient.Text = patientText; // booking.Patient.Person.FullnameWithoutMiddlename; lblBooking_Offering.Text = booking.Offering == null ? "< No service >" : booking.Offering.Name; lblBooking_BookingStatus.Text = booking.BookingStatus.Descr; lblBooking_Time.Text = booking.DateStart.Date.ToString("dd MMM yyyy") + " - " + booking.DateStart.ToString("h:mm") + (booking.DateStart.Hour < 12 ? "am" : "pm") + "-" + booking.DateEnd.ToString("h:mm") + (booking.DateEnd.Hour < 12 ? "am" : "pm"); lblBooking_PatientMissedAppt.Text = booking.IsPatientMissedAppt ? "Yes" : "No"; lblBooking_ProviderMissedAppt.Text = booking.IsProviderMissedAppt ? "Yes" : "No"; lblBooking_Emergency.Text = booking.IsEmergency ? "Yes" : "No"; lblBooking_Notes.Text = Note.GetPopupLinkTextV2(15, booking.EntityID, booking.NoteCount > 0, true, 1050, 530, "images/notes-bw-24.jpg", "images/notes-24.png"); } else { booking_space.Visible = false; booking_title.Visible = false; booking_offering.Visible = false; booking_patient.Visible = false; booking_provider.Visible = false; booking_org.Visible = false; booking_status.Visible = false; booking_apptmt_time.Visible = false; booking_patiemt_missed_apptmt.Visible = false; booking_provider_missed_apptmt.Visible = false; booking_isemergency.Visible = false; booking_notes.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { List <Tin> ds = new List <Tin>(); TinBLL tbll = new TinBLL(); ds = tbll.LayMaLoaiTin2("LT04"); this.rpt.DataSource = ds; rpt.DataBind(); List <Tin> ds9 = new List <Tin>(); TinBLL tbll9 = new TinBLL(); ds9 = tbll9.LayMaLoaiTin2benphai("LT05"); this.Repeater9.DataSource = ds9; Repeater9.DataBind(); List <Tin> ds1 = new List <Tin>(); TinBLL tbll1 = new TinBLL(); ds1 = tbll.LayMaLoaiTin1("LT01"); this.Repeater1.DataSource = ds1; Repeater1.DataBind(); List <Tin> ds10 = new List <Tin>(); TinBLL tbll10 = new TinBLL(); ds10 = tbll10.LayMaLoaiTin1benphai("LT02"); this.Repeater10.DataSource = ds10; Repeater10.DataBind(); List <Tin> ds2 = new List <Tin>(); TinBLL tbll2 = new TinBLL(); ds2 = tbll.LayMaLoaiTin3("LT07"); this.Repeater2.DataSource = ds2; Repeater2.DataBind(); List <Tin> ds11 = new List <Tin>(); TinBLL tbll11 = new TinBLL(); ds11 = tbll11.LayMaLoaiTin3benphai("LT08"); this.Repeater11.DataSource = ds11; Repeater11.DataBind(); List <Tin> ds3 = new List <Tin>(); TinBLL tbll3 = new TinBLL(); ds3 = tbll.LayMaLoaiTin4("LT11"); this.Repeater3.DataSource = ds3; Repeater3.DataBind(); List <Tin> ds12 = new List <Tin>(); TinBLL tbll12 = new TinBLL(); ds12 = tbll12.LayMaLoaiTin4benphai("LT12"); this.Repeater12.DataSource = ds12; Repeater12.DataBind(); List <Tin> ds4 = new List <Tin>(); TinBLL tbll4 = new TinBLL(); ds4 = tbll.LayMaLoaiTin5("LT13"); this.Repeater4.DataSource = ds4; Repeater4.DataBind(); List <Tin> ds13 = new List <Tin>(); TinBLL tbll13 = new TinBLL(); ds13 = tbll13.LayMaLoaiTin5benphai("LT13"); this.Repeater13.DataSource = ds13; Repeater13.DataBind(); List <Tin> ds5 = new List <Tin>(); TinBLL tbll5 = new TinBLL(); ds5 = tbll.LayMaLoaiTin6("LT14"); this.Repeater5.DataSource = ds5; Repeater5.DataBind(); List <Tin> ds14 = new List <Tin>(); TinBLL tbll14 = new TinBLL(); ds14 = tbll13.LayMaLoaiTin6benphai("LT15"); this.Repeater14.DataSource = ds14; Repeater14.DataBind(); List <Tin> ds6 = new List <Tin>(); TinBLL tbll6 = new TinBLL(); ds6 = tbll.LayMaLoaiTin7("LT17"); this.Repeater6.DataSource = ds6; Repeater6.DataBind(); List <Tin> ds15 = new List <Tin>(); TinBLL tbll15 = new TinBLL(); ds15 = tbll15.LayMaLoaiTin7benphai("LT17"); this.Repeater15.DataSource = ds15; Repeater15.DataBind(); List <Tin> ds7 = new List <Tin>(); TinBLL tbll7 = new TinBLL(); ds7 = tbll.LayMaLoaiTin8("LT18"); this.Repeater7.DataSource = ds7; Repeater7.DataBind(); List <Tin> ds16 = new List <Tin>(); TinBLL tbll16 = new TinBLL(); ds16 = tbll16.LayMaLoaiTin8benphai("LT19"); this.Repeater16.DataSource = ds16; Repeater16.DataBind(); List <Tin> ds8 = new List <Tin>(); TinBLL tbll8 = new TinBLL(); ds8 = tbll.LayMaLoaiTin9("LT20"); this.Repeater8.DataSource = ds8; Repeater8.DataBind(); List <Tin> ds17 = new List <Tin>(); TinBLL tbll17 = new TinBLL(); ds17 = tbll17.LayMaLoaiTin9benphai("LT21"); this.Repeater17.DataSource = ds17; Repeater17.DataBind(); }
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> "); } } } }