예제 #1
0
        private void btnCalculate_Click(object sender, EventArgs e)
        {
            if (StartDateTimePicker.Text != null && EndDateTimePicker.Text != null)
            {
                var duration = new Duration.Logic.Duration(Convert.ToDateTime(StartDateTimePicker.Text), Convert.ToDateTime(EndDateTimePicker.Text));

                lblResult.Text = string.Format(" duration Class : {0} \n Date Time Function Class: \r Years : {1}; \r  Months : {2}; \r Days : {3}; \r TotalDays : {4}  ",
                                               duration.Years, duration.Years, duration.Months, duration.Days, duration.TotalDays);
            }
        }
예제 #2
0
        private void btnCalculate_Click(object sender, EventArgs e)
        {
            if (StartDateTimePicker.Text != null && EndDateTimePicker.Text != null)
            {
                var duration = new Duration.Logic.Duration(Convert.ToDateTime(StartDateTimePicker.Text),Convert.ToDateTime(EndDateTimePicker.Text));

                lblResult.Text = string.Format(" duration Class : {0} \n Date Time Function Class: \r Years : {1}; \r  Months : {2}; \r Days : {3}; \r TotalDays : {4}  ",
                    duration.Years, duration.Years, duration.Months, duration.Days, duration.TotalDays);
            }
        }
예제 #3
0
 private void EndDateTimePicker_ValueChanged(object sender, EventArgs e)
 {
     try
     {
         var duration = new Duration.Logic.Duration(Convert.ToDateTime(StartDateTimePicker.Text), Convert.ToDateTime(EndDateTimePicker.Text));
         lblResult.Text = string.Format(" duration Class : {0} \n Date Time Function Class: \r Years : {1}; \r  Months : {2}; \r Days : {3}; \r TotalDays : {4}  ",
                                        duration.Years, duration.Years, duration.Months, duration.Days, duration.TotalDays);
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #4
0
        private void EndDateTimePicker_ValueChanged(object sender, EventArgs e)
        {
            try
            {
                var duration = new Duration.Logic.Duration(Convert.ToDateTime(StartDateTimePicker.Text), Convert.ToDateTime(EndDateTimePicker.Text));
                 lblResult.Text = string.Format(" duration Class : {0} \n Date Time Function Class: \r Years : {1}; \r  Months : {2}; \r Days : {3}; \r TotalDays : {4}  ",
                    duration.Years, duration.Years, duration.Months, duration.Days, duration.TotalDays);
            }
            catch (Exception)
            {

                throw;
            }

        }    }