Exemple #1
0
        protected void initial()
        {
            if (Context.Request.QueryString["id"] != null)
            {
                id = Convert.ToInt32(Context.Request.QueryString["id"]);
                if (id != -1)
                {
                    bookschedule = CY.GFive.Core.Business.BookSchedule.Load(id);
                    TxtBookName.Text = bookschedule.Bookname;
                    TxtDEs.Text = bookschedule.Des;
                    LabelAddTime.Text = bookschedule.DateCreated.ToShortDateString();
                    SBookNum.Text = bookschedule.Number.ToString();
                    SArriveTime.Text = bookschedule.ArriveTime.ToShortDateString();
                    SDeadLine.Text = bookschedule.Deadline.ToShortDateString();

                }
            }
        }
Exemple #2
0
        protected void Btenter_Click(object sender, EventArgs e)
        {
            if (Context.Request.QueryString["id"] != null)
            {
                id = Convert.ToInt32(Context.Request.QueryString["id"]);
                if (id != -1)
                {
                    bookschedule = CY.GFive.Core.Business.BookSchedule.Load(id);
                    bookschedule.Des = TxtDEs.Text.ToString();
                    bookschedule.ArriveTime = Convert.ToDateTime(SArriveTime.Text);
                    bookschedule.Deadline = Convert.ToDateTime(SDeadLine.Text);
                    bookschedule.Number = Convert.ToInt32(SBookNum.Text);
                    bookschedule.Save();
                    CY.GFive.Core.Business.Books book = CY.GFive.Core.Business.Books.Load(bookschedule.Id);
                    book.Name = TxtBookName.Text;
                    book.Save();
                    Response.Write("<script>alert('修改成功!'); window.location.href='Booklist.aspx?type="+position+"';</script>");

                }
            }
        }