private void toolStripButtonAddReaderHolidayInfo_Click(object sender, EventArgs e)
        {
            int readerID;

            if (!int.TryParse(kryptonTextBoxReaderID.Text.ToString(), out readerID))
            {
                MyMessageBox.MessageBoxOK("请输入正确的读卡器ID");
                return;
            }
            modelReaderInfo.ReaderID            = readerID;
            modelHoliday.ReaderHolidayStartDate = "2014-07-18";
            modelHoliday.ReaderHolidayStartDate = "2024-07-18";

            FormReaderHoliday formReaderHoliday = new FormReaderHoliday(OpenMode.Add, modelReaderInfo, modelHoliday);

            formReaderHoliday.ShowDialog();

            refreshDataGridView();
        }
        private void toolStripButtonUpdateHolidayInfo_Click(object sender, EventArgs e)
        {
            if (dataGridViewWithCheckBox1.CurrentRow == null)
            {
                return;
            }
            int selectIndex = dataGridViewWithCheckBox1.CurrentRow.Index;

            string holidayID = dataGridViewWithCheckBox1["ReaderHolidayID", selectIndex].Value.ToString().Trim();
            string readerID  = dataGridViewWithCheckBox1["ReaderID", selectIndex].Value.ToString().Trim();

            modelReaderInfo.ReaderID = int.Parse(readerID);

            modelHoliday = bllHoliday.GetModel(int.Parse(holidayID));

            FormReaderHoliday formReaderHoliday = new FormReaderHoliday(OpenMode.Update, modelReaderInfo, modelHoliday);

            formReaderHoliday.ShowDialog();

            refreshDataGridView();
        }
        private void toolStripButtonUpdateHolidayInfo_Click(object sender, EventArgs e)
        {
            if (dataGridViewWithCheckBox1.CurrentRow == null)
                return;
            int selectIndex = dataGridViewWithCheckBox1.CurrentRow.Index;

            string holidayID = dataGridViewWithCheckBox1["ReaderHolidayID", selectIndex].Value.ToString().Trim();
            string readerID = dataGridViewWithCheckBox1["ReaderID", selectIndex].Value.ToString().Trim();

            modelReaderInfo.ReaderID = int.Parse(readerID);

            modelHoliday = bllHoliday.GetModel(int.Parse(holidayID));

            FormReaderHoliday formReaderHoliday = new FormReaderHoliday(OpenMode.Update, modelReaderInfo, modelHoliday);
            formReaderHoliday.ShowDialog();

            refreshDataGridView();
        }
        private void toolStripButtonAddReaderHolidayInfo_Click(object sender, EventArgs e)
        {
            int readerID;
            if (!int.TryParse(kryptonTextBoxReaderID.Text.ToString(), out readerID))
            {
                MyMessageBox.MessageBoxOK("��������ȷ�Ķ�����ID");
                return;
            }
            modelReaderInfo.ReaderID = readerID;
            modelHoliday.ReaderHolidayStartDate = "2014-07-18";
            modelHoliday.ReaderHolidayStartDate = "2024-07-18";

            FormReaderHoliday formReaderHoliday = new FormReaderHoliday(OpenMode.Add, modelReaderInfo, modelHoliday);
            formReaderHoliday.ShowDialog();

            refreshDataGridView();
        }