Insert.aspx.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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.Sys.Role
  8. {
  9. public partial class Insert : Com.Jpsoft.Hospital.Web.Common.BasePage
  10. {
  11. protected void Page_Load(object sender, EventArgs e)
  12. {
  13. }
  14. /// <summary>
  15. /// 添加角色名称
  16. /// </summary>
  17. /// <param name="sender"></param>
  18. /// <param name="e"></param>
  19. protected void btnOK_Click(object sender, EventArgs e)
  20. {
  21. Com.Jpsoft.Hospital.BLL.jp_sys_role role = new Com.Jpsoft.Hospital.BLL.jp_sys_role();
  22. Com.Jpsoft.Hospital.Model.jp_sys_role model = new Com.Jpsoft.Hospital.Model.jp_sys_role();
  23. model.role_name = this.txtrolename.Text;
  24. model.role_desc = this.role_desc.Text;
  25. role.Add(model);
  26. Response.Write("<script>alert('添加成功!');</script>");
  27. }
  28. protected void btnCancle_Click(object sender, EventArgs e)
  29. {
  30. Response.Redirect("List.aspx");
  31. }
  32. }
  33. }