I have a problem with MonthCalendar
of c#
, I will briefly explain ...
I have a form where you get dates from a data base SQL
,
at the time of finding dates they are marked in bold in MonthCalendar
.
By doing click
on that date, I display a report that I created to show information related to that date, but at the time of changing the date, on the arrow above, in change of month or year, it is pasted and many empty reports start coming out collapsing the software, I need your help please.
private void monthCalendarProgramacion5_DateChanged (object sender, DateRangeEventArgs e)
{
try{
//con esto puedo visualizar la fecha a la cual se selecciona y convertirla en string para pasarla a un textbox
textBox5.Text = monthCalendarProgramacion5.SelectionRange.Start.ToShortDateString();
//se iniciliza el formulario reporte para visualizar los datos
FormMostrarMonthCalendar4 month = new FormMostrarMonthCalendar4();
//se pasa el dato en fecha al parametro del formulario reporte para el procedimiento
month.fechaOT3 = monthCalendarProgramacion5.SelectionRange.Start.Date;
//se iniciliza el formulario para mostrar los datos
month.ShowDialog();
}
catch (Exception ex)
{
MessageBox.Show("fallo" + ex);
}
}