Exemplo n.º 1
0
        protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "p")
            {
                RentProductBll pBll = new RentProductBll();
                RentLogModel   log  = bll.GetModel(Convert.ToInt32(e.CommandArgument));


                pBll.UpdateStatus(log.RentID, (int)RentProductStatus.已出租);
                bll.UpdateStatus(log.RentLogID, (int)RentLogStatus.已确认);
            }
        }
Exemplo n.º 2
0
        private void BindData()
        {
            RentLogModel     log     = bll.GetModel(RentID, GetUserID());
            RentProductModel product = new RentProductBll().GetModel(RentID);

            for (int i = 1; i <= product.MaxRentTime; i++)
            {
                ListItem item = new ListItem();
                item.Text  = i.ToString();
                item.Value = i.ToString();
                DropDown_RentTime.Items.Add(item);
            }

            if (log != null)
            {
                Div_ApplyContent.InnerHtml = "对不起,您已经申请过了,请返回<a href=\"/member/rent/rentloglist.aspx\">用户中心</a>查看。";
                Button_Add.Enabled         = false;
            }
        }