示例#1
0
 //set end date
 void EndDate(string duration)
 {
     //************************************************
     InputEndDate.Click();
     InputEndDate.SendKeys(Keys.Control + 'a');
     InputEndDate.SendKeys(DateTime.Now.AddDays(int.Parse(duration)).ToString("dd/MM/yyyy"));
 }
示例#2
0
        private void d_OnEndDateDone(object sender, EventArgs e)
        {
            if (sender is GregorianDateTime)
            {
                InputEndDate = sender as GregorianDateTime;

                if (InputEndDate.GetJulianInteger() < InputStartDate.GetJulianInteger() + 7)
                {
                    InputEndDate = new GregorianDateTime(InputStartDate);
                    InputEndDate.AddDays(7);
                }

                if (OnPeriodSelected != null)
                {
                    OnPeriodSelected(this, e);
                }
            }
        }