12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- 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.Sys.Function
- {
- public partial class Update : Com.Jpsoft.Hospital.Web.Common.BasePage
- {
- Com.Jpsoft.Hospital.BLL.jp_sys_function fun = new Com.Jpsoft.Hospital.BLL.jp_sys_function();
- Com.Jpsoft.Hospital.Model.jp_sys_function model = new Com.Jpsoft.Hospital.Model.jp_sys_function();
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!IsPostBack)
- {
- if (Request.QueryString["id"].ToString().Trim() != "" && Request.QueryString["id"] != null)
- {
- int id = int.Parse(Request.QueryString["id"].ToString());
- ShowData(id);
- }
- }
- }
- /// <summary>
- /// 显示数据
- /// </summary>
- /// <param name="id"></param>
- private void ShowData(int id)
- {
- model = fun.GetModel(id);
- this.fun_name.Text = model.fun_name.ToString();
- this.fun_pagedata.Text = model.fun_pagename.ToString();
- this.fun_id.Text = model.fun_id.ToString();
- }
- protected void btnBack_Click(object sender, EventArgs e)
- {
- Response.Redirect("List.aspx");
- }
- protected void btnOK_Click(object sender, EventArgs e)
- {
- model.fun_id = int.Parse(this.fun_id.Text);
- model.fun_name = this.fun_name.Text;
- model.fun_pagename = this.fun_pagedata.Text;
- fun.Update(model);
- Response.Write("<script>alert('更新成功!');</script>");
- }
- }
- }
|