예제 #1
0
파일: ucRitplan.cs 프로젝트: tim-vdv/Carbus
        private void monthCalendar1_DateSelected(object sender, DateRangeEventArgs e)
        {
            ArrayList datums = new ArrayList();

            datums.AddRange(monthCalendar1.BoldedDates.ToArray());


            if (datums.Contains(monthCalendar1.SelectionStart))
            {
                datums.Remove(monthCalendar1.SelectionStart);
                ContractManagement.RemoveRitInstantie(rit_contract, monthCalendar1.SelectionStart);
            }
            else
            {
                datums.Add(monthCalendar1.SelectionStart);
                ContractManagement.addRitInstantie(rit_contract, monthCalendar1.SelectionStart);
            }

            //ArrayList datums = new ArrayList();
            //datums.AddRange(monthCalendar1.BoldedDates.ToArray());

            monthCalendar1.BoldedDates = (DateTime[])datums.ToArray(typeof(DateTime));

            monthCalendar1.UpdateBoldedDates();
        }