예제 #1
0
        protected void btnReturnBook_Click(object sender, EventArgs e)
        {
            PlaceHolder1.Visible = true;
            PlaceHolder2.Visible = false;
            PlaceHolder3.Visible = false;
            MemberLogic ml      = new MemberLogic();
            DataTable   tblLoan = ml.GetLoanTable((int)Session["User_Id"]);

            GridView1.DataSource = tblLoan;
            GridView1.DataBind();

            btnRequestLoan.Visible      = false;
            btnRequestReturn.Visible    = true;
            btnRequestExtension.Visible = true;
        }
예제 #2
0
        protected void btnRequestExtension_Click(object sender, EventArgs e)
        {
            MemberLogic ml           = new MemberLogic();
            int         rowsAffected = ml.RequestBookExtension(int.Parse(txtCopyId.Text));

            if (rowsAffected == 1)
            {
                DataTable dt = ml.GetLoanTable((int)Session["User_Id"]);
                GridView1.DataSource = dt;
                GridView1.DataBind();

                lblMessage.Text = "Return Request Pending";
                return;
            }

            lblMessage.Text = "Returned failed.";
        }