/// <versions>01-12-2017(GesAMFC-v0.0.4.41)</versions> private void ComboBoxEdit_Month_SelectedIndexChanged(object sender, EventArgs e) { try { ComboboxItem objItemMonth = (ComboBoxEdit_Month.SelectedItem as ComboboxItem); Int32 iSelectedMonth = Convert.ToInt32(objItemMonth.GetValue()); if (iSelectedMonth == 0) { this.EveryYear = true; this.MonthSelected.Value = -1; return; } else { this.MonthSelected = new AMFCMonth(iSelectedMonth, objItemMonth.Text); if (!Program.IsValidMonth(this.MonthSelected.Value)) { this.MonthSelected = new AMFCMonth(DateTime.Today.Month); } this.EveryYear = false; } } catch (Exception ex) { Program.HandleError(ex.TargetSite.Name, ex.Message, Program.ErroType.EXCEPTION, true, false); } }
/// <versions>01-12-2017(GesAMFC-v0.0.4.41)</versions> public Form_Year_Month(AMFCYear objYearSelected, AMFCMonth objMonthSelected) { this.LibAMFC = new Library_AMFC_Methods(); try { InitializeComponent(); ListYears = new AMFCYears(); ListYears.SetYearList(); ListMonths = new AMFCMonths(); ListMonths.SetMonthList(); this.IsYearMonthSelected = false; this.EveryYear = false; if (Program.IsValidYear(objYearSelected.Value)) { this.YearSelected = objYearSelected; } else { this.YearSelected = Program.DefaultYear; } if (Program.IsValidMonth(objMonthSelected.Value)) { this.MonthSelected = objMonthSelected; } else { this.MonthSelected = Program.DefaultMonth; } } catch (Exception ex) { Program.HandleError(ex.TargetSite.Name, ex.Message, Program.ErroType.EXCEPTION, true, false); } }