Detail.aspx.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using System;
  2. using System.Collections.Generic;
  3. //using System.Linq;
  4. using System.Web;
  5. using System.Web.UI;
  6. using System.Web.UI.WebControls;
  7. //
  8. using System.Data;
  9. namespace Com.Jpsoft.Hospital.Web.Module.EmployeeGroup
  10. {
  11. public partial class Detail : Com.Jpsoft.Hospital.Web.Common.BasePage
  12. {
  13. protected int id;
  14. protected void Page_Load(object sender, EventArgs e)
  15. {
  16. if (!IsPostBack)
  17. {
  18. if (string.IsNullOrEmpty(Request.QueryString["id"].ToString().Trim()))
  19. {
  20. }
  21. else
  22. {;
  23. if (int.TryParse(Request.QueryString["id"].ToString().Trim(), out id))
  24. {
  25. BindPageData(id);
  26. GroupID.Value = id.ToString();
  27. }
  28. }
  29. }
  30. }
  31. /// <summary>
  32. /// 绑定数据
  33. /// </summary>
  34. /// <param name="id"></param>
  35. private void BindPageData(int id)
  36. {
  37. Com.Jpsoft.Hospital.BLL.jp_employee_group group = new BLL.jp_employee_group();
  38. DataTable dt = group.GetList(" eg_id=" + id).Tables[0];;
  39. this.gv.DataSource = dt.DefaultView;
  40. this.gv.DataBind();
  41. Com.Jpsoft.Hospital.BLL.jp_employee_group_detailEx detail = new BLL.jp_employee_group_detailEx();
  42. DataTable dt2 = detail.GetListEx(" t0.egd_group_id="+id).Tables[0];
  43. this.rptEmployee.DataSource = dt2.DefaultView;
  44. this.rptEmployee.DataBind();
  45. }
  46. }
  47. }