Ejemplo n.º 1
0
        private void pic_Click(object sender, EventArgs e)
        {
            PictureBox pic   = sender as PictureBox;
            int        picID = Convert.ToInt32(pic.Name);

            if (!ClassBackEnd.BorrowedBookIDown(picID))
            {
                MessageBox ib = new MessageBox(9);
                ib.ShowDialog();
            }
            UserReturnForm returnForm = new UserReturnForm(picID);

            returnForm.ShowDialog();
            returnForm.Dispose();

            ClassBackEnd.LoadBorrowedBook();
            maxPage = ClassBackEnd.Userbsbook.Count > 10 ? 2 : 1;
            if (picID > 9)
            {
                ComponentDynamicLoad(2);
            }
            else
            {
                ComponentDynamicLoad(1);
            }
        }
Ejemplo n.º 2
0
        private void BorrowInfoSheet_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == 2)
            {
                if (BorrowInfoSheet.Rows[e.RowIndex].Cells[2].Value.ToString() == "归还/续借")
                {
                    ClassBackEnd.BorrowedBookIDown(e.RowIndex);

                    UserReturnForm returnForm = new UserReturnForm(e.RowIndex);
                    returnForm.ShowDialog();
                    returnForm.Dispose();

                    ClassBackEnd.GetIntoPersonCenter();
                    SheeetRefresh();
                    UserInfoLoad();
                }
                else
                {
                    ClassBackEnd.CancelScheduleBook(e.RowIndex);
                    MessageBox ib = new MessageBox(21);
                    ib.ShowDialog();
                    ib.Dispose();

                    ClassBackEnd.GetIntoPersonCenter();
                    SheeetRefresh();
                    UserInfoLoad();
                }
            }
        }
Ejemplo n.º 3
0
        private void NameLink_Click(object sender, EventArgs e)
        {
            LinkLabel link   = sender as LinkLabel;
            int       linkID = Convert.ToInt32(link.Name);

            ClassBackEnd.BorrowedBookIDown(linkID);

            UserReturnForm returnForm = new UserReturnForm(linkID);

            returnForm.ShowDialog();
            returnForm.Dispose();

            ClassBackEnd.LoadBorrowedBook();
            maxPage = ClassBackEnd.Userbsbook.Count > 10 ? 2 : 1;
            if (linkID > 9)
            {
                ComponentDynamicLoad(2);
            }
            else
            {
                ComponentDynamicLoad(1);
            }
        }