12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using System;
- using System.Collections.Generic;
- //using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- namespace Com.Jpsoft.Hospital.Web.Module.ExamineInfo.jp_examine_obj
- {
- public partial class Update : Com.Jpsoft.Hospital.Web.Common.BasePage
- {
- Com.Jpsoft.Hospital.BLL.jp_examine_obj obj = new Com.Jpsoft.Hospital.BLL.jp_examine_obj();
- Com.Jpsoft.Hospital.Model.jp_examine_obj model = new Com.Jpsoft.Hospital.Model.jp_examine_obj();
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!IsPostBack)
- {
- if (string.IsNullOrEmpty(Request.QueryString["id"].ToString()))
- { }
- else
- {
- int obj_id = 0;
- if (int.TryParse(Request.QueryString["id"].ToString(), out obj_id))
- {
- BindPageData(obj_id);
- }
- }
- }
- }
- private void BindPageData(int id)
- {
- model = obj.GetModel(id);
- this.obj_name.Text = model.obj_name.ToString();
- }
- /// <summary>
- /// 返回列表
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected void btnCancle_Click(object sender, EventArgs e)
- {
- Response.Write("<script>window.location.href='List.aspx'</script>");
- }
- /// <summary>
- /// 更新项目
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected void btnOK_Click(object sender, EventArgs e)
- {
- model.obj_id = int.Parse(Request.QueryString["id"].ToString());
- model.obj_name = this.obj_name.Text;
- obj.Update(model);
- Response.Write("<script>alert('更新成功!');window.location.href='Update.aspx?id="+model.obj_id+"';</script>");
- }
- }
- }
|