public UCYearMonthRangeSelector()
 {
     InitializeComponent();
     if (!DesignMode)
     {
         List <Year> listYears = GetYearRange();
         DSCommon.BindImageComboBox(cmbBeginYear, listYears, x => true, "description", "year");
         DSCommon.BindImageComboBox(cmbEndYear, listYears, y => true, "description", "year");
         List <Month> listMonths = GetMonthRange();
         DSCommon.BindImageComboBox(cmbBeginMonth, listMonths, m => true, "description", "month");
         DSCommon.BindImageComboBox(cmbEndMonth, listMonths, m => true, "description", "month");
         BeginDate = DateTimeHelper.DefaultDateTime;
         EndDate   = DateTime.Now;
     }
 }
Esempio n. 2
0
        protected override void OnFirstLoad()
        {
            base.OnFirstLoad();
            if (!DesignMode)
            {
                List <Year> listYears = UCYearMonthRangeSelector.GetYearRange(ShowMoreDate ? DateTime.Now.Year + 50 : 0);
                DSCommon.BindImageComboBox(cmbBeginYear, listYears, x => true, "description", "year");

                List <Month> listMonths = UCYearMonthRangeSelector.GetMonthRange();
                DSCommon.BindImageComboBox(cmbBeginMonth, listMonths, m => true, "description", "month");

                if (DefaultTime != default(DateTime))
                {
                    DateTime = DefaultTime;
                }
                else
                {
                    DateTime = DateTime.Now;
                }
            }
        }
Esempio n. 3
0
        private void FillYear()
        {
            List <Year> listYears = UCYearMonthRangeSelector.GetYearRange(_maxYear, _minYear);

            DSCommon.BindImageComboBox(cmbYear, listYears, x => true, "description", "year");
        }