예제 #1
0
 private void lblMonthPrev_Click(object sender, EventArgs e)
 {
     if (_currentMonth == 1)
     {
         cmbYear.SelectedItem  = Convert.ToInt32(cmbYear.Text) + -1;
         cmbMonth.SelectedItem = BsDate.GetMonthNameByValue(12);
     }
     else
     {
         cmbMonth.SelectedItem = BsDate.GetMonthNameByValue(_currentMonth - 1);
     }
 }
예제 #2
0
        private void AddItemOnList()
        {
            for (int i = 2000; i < 2101; i++)
            {
                cmbYear.Items.Add(i);
            }
            for (int j = 1; j < 13; j++)
            {
                cmbMonth.Items.Add(BsDate.GetMonthNameByValue(j));
            }

            cmbMonth.MaxDropDownItems = 8;
            cmbYear.MaxDropDownItems  = 8;
        }