ReturnBook.aspx.cs
上传用户:gooyliu
上传日期:2018-09-29
资源大小:5816k
文件大小:1k
源码类别:

.net编程

开发平台:

C#

  1. using System;
  2. using System.Collections;
  3. using System.Configuration;
  4. using System.Data;
  5. using System.Linq;
  6. using System.Web;
  7. using System.Web.Security;
  8. using System.Web.UI;
  9. using System.Web.UI.WebControls;
  10. using System.Web.UI.WebControls.WebParts;
  11. using System.Web.UI.HtmlControls;
  12. using System.Xml.Linq;
  13. using BusinessLogicLayer;
  14. namespace Web.SysOperator
  15. {
  16.     public partial class ReturnBook : System.Web.UI.Page
  17.     {
  18.         protected void Page_Load(object sender, EventArgs e)
  19.         {
  20.             this.txtBookID.Focus();
  21.         }
  22.         protected void ImageReset_Click(object sender, ImageClickEventArgs e)
  23.         {
  24.             txtBookID.Text = string.Empty;
  25.             lblMsg.Text = string.Empty;
  26.         }
  27.         protected void imgbtnReturn_Click(object sender, ImageClickEventArgs e)
  28.         {
  29.             BookBusiness bookBuz = new BookBusiness();
  30.             string bookID = txtBookID.Text.ToString().Trim();
  31.             if (bookBuz.CheckBookByID(bookID) == 0)
  32.             {
  33.                 lblMsg.Visible = true;
  34.                 lblMsg.Text = "输入图书编号有误!!";
  35.             }
  36.             else
  37.             {
  38.                 bookBuz.ReturnBook(bookID);
  39.                 lblMsg.Visible = true;
  40.                 lblMsg.Text = "还书成功!!";
  41.             }
  42.         }
  43.     }
  44. }