12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- using System;
- using System.Collections.Generic;
- //using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- //
- using System.Data;
- using System.Text;
- namespace Com.Jpsoft.Hospital.Web.Module.ExamineInfo.jp_examine_obj
- {
- public partial class Insert : Com.Jpsoft.Hospital.Web.Common.BasePage
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- }
- protected void btnOK_Click(object sender, EventArgs e)
- {
- Com.Jpsoft.Hospital.BLL.jp_examine_obj obj = new Com.Jpsoft.Hospital.BLL.jp_examine_obj();
- string obj_name = this.obj_name.Text;
- //判断是否存在
- string strWhere = " obj_name='" + obj_name + "'";
- DataTable dt = obj.GetList(strWhere).Tables[0];
- if (dt.Rows.Count > 0)
- {
- Response.Write("<script>alert('该项目已经存在!');</script>");
- }
- else
- {
- //添加项目
- Com.Jpsoft.Hospital.Model.jp_examine_obj model = new Com.Jpsoft.Hospital.Model.jp_examine_obj();
- model.obj_name = obj_name;
- obj.Add(model);
- Response.Write("<script>alert('添加成功!');window.location.replace(location.href);</script>");
- }
- }
- protected void btnCancle_Click(object sender, EventArgs e)
- {
- Response.Write("<script>window.location.href='List.aspx'</script>");
- }
- }
- }
|