private void endDateTimePickerX_SelectedDateChanged(DateTime selectedDateTime, BehComponents.PersianDateTime selectedPersianDateTime)
 {
     if (startDateTimePickerX.SelectedDateInDateTime.Date > endDateTimePickerX.SelectedDateInDateTime.Date)
     {
         endDateTimePickerX.SelectedDateInDateTime = startDateTimePickerX.SelectedDateInDateTime.Date;
     }
 }
 private void recDateTimePickerX_SelectedDateChanged(DateTime selectedDateTime, BehComponents.PersianDateTime selectedPersianDateTime)
 {
     if (recDateTimePickerX.SelectedDateInDateTime.Date < DateTime.Now.Date)
     {
         recDateTimePickerX.SelectedDateInDateTime = DateTime.Now.Date;
     }
 }
Пример #3
0
 private void enactmentTimePickerX_SelectedDateChanged(DateTime selectedDateTime, BehComponents.PersianDateTime selectedPersianDateTime)
 {
     if (enactmentTimePickerX.SelectedDateInDateTime.Date > DateTime.Now.Date)
     {
         enactmentTimePickerX.SelectedDateInDateTime = DateTime.Now.Date;
     }
 }
Пример #4
0
 private void birthdateTimePickerX_SelectedDateChanged(DateTime selectedDateTime, BehComponents.PersianDateTime selectedPersianDateTime)
 {
     if (birthdateTimePickerX.SelectedDateInDateTime > DateTime.Now.Date)
     {
         birthdateTimePickerX.SelectedDateInDateTime = DateTime.Now.Date;
     }
     if (birthdateTimePickerX.SelectedDateInDateTime.Subtract(DateTime.Now).TotalDays > 25 * 365 + 6)
     {
         orphanCheckBox.Enabled = false;
         orphanCheckBox.Checked = false;
     }
     else
     {
         orphanCheckBox.Enabled = true;
     }
 }
Пример #5
0
 private void startDateTimePickerX_SelectedDateChanged(DateTime selectedDateTime, BehComponents.PersianDateTime selectedPersianDateTime)
 {
     if (this.Text == "ویرایش کمک جمعی با مصوبه")
     {
         if (startDateTimePickerX.SelectedDateInDateTime.Date < this.subdate)
         {
             startDateTimePickerX.SelectedDateInDateTime = this.subdate;
         }
     }
     else
     {
         if (startDateTimePickerX.SelectedDateInDateTime.Date < DateTime.Now.Date)
         {
             startDateTimePickerX.SelectedDateInDateTime = DateTime.Now.Date;
         }
     }
 }