Detail.aspx.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. namespace Com.Jpsoft.Hospital.Web.Module.ExamineInfo.jp_examine_obj
  8. {
  9. public partial class Detail : Com.Jpsoft.Hospital.Web.Common.BasePage
  10. {
  11. Com.Jpsoft.Hospital.BLL.jp_examine_obj obj = new Com.Jpsoft.Hospital.BLL.jp_examine_obj();
  12. Com.Jpsoft.Hospital.Model.jp_examine_obj model = new Com.Jpsoft.Hospital.Model.jp_examine_obj();
  13. public string obj_id = string.Empty;
  14. public string obj_name = string.Empty;
  15. protected void Page_Load(object sender, EventArgs e)
  16. {
  17. if (!IsPostBack)
  18. {
  19. if (string.IsNullOrEmpty(Request.QueryString["id"].ToString()))
  20. { }
  21. else
  22. {
  23. int objid = 0;
  24. if (int.TryParse(Request.QueryString["id"].ToString(), out objid))
  25. {
  26. ShowPageData(objid);
  27. }
  28. }
  29. }
  30. }
  31. /// <summary>
  32. /// 显示数据
  33. /// </summary>
  34. /// <param name="id"></param>
  35. private void ShowPageData(int id)
  36. {
  37. model = obj.GetModel(id);
  38. if (model != null)
  39. {
  40. if (model.obj_id > 0)
  41. {
  42. obj_id = model.obj_id.ToString();
  43. obj_name = model.obj_name.ToString();
  44. }
  45. }
  46. }
  47. }
  48. }