示例#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);
            }
        }
示例#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();
        }
示例#3
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();
     }
 }