Exemple #1
0
        private void check()
        {
            if (state == 1)
            {
                BookLendingRateButton.Image   = Properties.Resources.书籍借阅率;
                SystemInformationButton.Image = Properties.Resources.系统日志查看;
                UserComingRateComboBox.Show();
                UserComingRateChart.Show();
                BookLendingRateComboBox.Hide();
                BookLendingRateChart.Hide();
                LogDataSheet.Hide();
                LastPButton.Hide();
                JumpPTextBox.Hide();
                DividePicture.Hide();
                PageTextBox.Hide();
                NextPbutton.Hide();

                LoadUserComingRateGraph(UserComingRateComboBox.SelectedIndex);
            }
            else if (state == 2)
            {
                UserComingRateButton.Image    = Properties.Resources.用户到馆率;
                SystemInformationButton.Image = Properties.Resources.系统日志查看;
                UserComingRateComboBox.Hide();
                UserComingRateChart.Hide();
                BookLendingRateComboBox.Show();
                BookLendingRateChart.Show();
                LogDataSheet.Hide();
                LastPButton.Hide();
                JumpPTextBox.Hide();
                DividePicture.Hide();
                PageTextBox.Hide();
                NextPbutton.Hide();

                LoadBookLendingRateGraph(BookLendingRateComboBox.SelectedIndex);
            }
            else if (state == 3)
            {
                UserComingRateButton.Image  = Properties.Resources.用户到馆率;
                BookLendingRateButton.Image = Properties.Resources.书籍借阅率;
                UserComingRateComboBox.Hide();
                UserComingRateChart.Hide();
                BookLendingRateComboBox.Hide();
                BookLendingRateChart.Hide();
                LogDataSheet.Show();
                LastPButton.Show();
                JumpPTextBox.Show();
                DividePicture.Show();
                PageTextBox.Show();
                NextPbutton.Show();

                DataSheetLoad(nPage);
            }
        }
Exemple #2
0
        private void DataSheetLoad(int page)
        {
            ResultDataSheet.Rows.Clear();
            ResultDataSheet.Hide();
            if (ClassBackEnd.Book.Count == 0)
            {
                LoadGIFBox.Hide();
                NoResultTextBox.Show();
                AddBookButton.Show();
                NextPbutton.Hide();
                LastPButton.Hide();
                JumpPTextBox.Hide();
                PageTextBox.Hide();
                DividePicture.Hide();
                return;
            }
            else
            {
                NoResultTextBox.Hide();
                AddBookButton.Hide();
                NextPbutton.Show();
                LastPButton.Show();
                JumpPTextBox.Show();
                PageTextBox.Show();
                DividePicture.Show();
            }
            int start = (nPage - 1) * 10;
            int end   = nPage * 10;

            if (nPage == maxPage)
            {
                end = ClassBackEnd.Book.Count;
            }

            for (int i = start; i < end; i++)
            {
                var             c     = ClassBackEnd.Book[i];
                DataGridViewRow row   = (DataGridViewRow)ResultDataSheet.RowTemplate.Clone();
                int             index = ResultDataSheet.Rows.Add(row);
                ResultDataSheet.Rows[index].Cells[0].Value = c.Bookisbn;
                ResultDataSheet.Rows[index].Cells[1].Value = c.Bookname;
                ResultDataSheet.Rows[index].Cells[2].Value = c.Author;
                ResultDataSheet.Rows[index].Cells[3].Value = c.Publisher;
                ResultDataSheet.Rows[index].Cells[4].Value = "详情";
            }
            LoadGIFBox.Hide();
            ResultDataSheet.Show();
            ResultDataSheet.ClearSelection();
            ResultDataSheet.Columns[4].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            JumpPTextBox.Text = nPage.ToString();
            PageTextBox.Text  = maxPage.ToString();
        }
Exemple #3
0
        public AdminSystemLogForm(AdminMainForm frm)
        {
            frmMain = frm;
            InitializeComponent();

            UserComingRateComboBox.Hide();
            UserComingRateChart.Hide();
            BookLendingRateComboBox.Hide();
            BookLendingRateChart.Hide();
            LogDataSheet.Hide();
            LastPButton.Hide();
            JumpPTextBox.Hide();
            DividePicture.Hide();
            PageTextBox.Hide();
            NextPbutton.Hide();
        }
Exemple #4
0
        private void DeleteButton_Click(object sender, EventArgs e)
        {
            string name      = NameTextBox.Text;
            string writter   = WritterTextBox.Text;
            string time      = TimeTextBox.Text;
            string publisher = PublishTextBox.Text;
            string page      = PageTextBox.Text;
            string id        = NumberTextBox.Text;

            Thread thread = new Thread(threadStart);

            thread.Start();

            Book deletebook = new Book();

            for (int i = 0; i < remineder.Count; i++)
            {
                if (name == remineder[i].name && writter == remineder[i].writter && time == remineder[i].time &&
                    publisher == remineder[i].publisher && page == remineder[i].page && id == remineder[i].ID)
                {
                    IsRightForm isright = new IsRightForm();
                    if (isright.show())
                    {
                        deletebook.Delete(i);
                        BookDataGridView.Rows.Clear();
                        NumberTextBox.Clear();
                        NameTextBox.Clear();
                        WritterTextBox.Clear();
                        TimeTextBox.Clear();
                        PublishTextBox.Clear();
                        PageTextBox.Clear();
                        ShowAllBook();
                        break;
                    }
                }
                else if (i == remineder.Count - 1)
                {
                    MessageBox.Show("此书不存在");
                    break;
                }
            }
            //摧毁线程
            thread.Abort();
        }
Exemple #5
0
 private void PageButtonLoad()
 {
     if (ClassBackEnd.Userbsbook.Count == 0)
     {
         LastPButton.Hide();
         NextPbutton.Hide();
         JumpPTextBox.Hide();
         PageTextBox.Hide();
         DividePicture.Hide();
     }
     else
     {
         LastPButton.Show();
         NextPbutton.Show();
         JumpPTextBox.Show();
         PageTextBox.Show();
         DividePicture.Show();
     }
 }
 private void PageButtonLoad(int num)
 {
     if (num == 0)
     {
         LastPButton.Hide();
         NextPbutton.Hide();
         JumpPTextBox.Hide();
         PageTextBox.Hide();
         DividePicture.Hide();
     }
     else
     {
         LastPButton.Show();
         NextPbutton.Show();
         JumpPTextBox.Show();
         PageTextBox.Show();
         DividePicture.Show();
     }
 }