Ejemplo n.º 1
0
        private void cmdOk_Click(object sender, EventArgs e)
        {
            MonthYearSuggest.SetCurrentMonth(Convert.ToInt32(cboMonth.Text));
            MonthYearSuggest.SetCurrentYear(Convert.ToInt32(cboYear.Text));

            this.Close();
        }
Ejemplo n.º 2
0
        private void SetSuggestedDateTolastOf(IBindingList iBindingList)
        {
            try
            {
                DateTime d = DateTime.MinValue;
                foreach (AbstractMovimentoContabile item in iBindingList)
                {
                    if (item.Data > d)
                    {
                        d = item.Data;
                    }
                }

                MonthYearSuggest.SetCurrentMonth(d.Month);
                MonthYearSuggest.SetCurrentYear(d.Year);
            }
            catch (Exception)
            {
                MonthYearSuggest.SetCurrentMonth(DateTime.Now.Month);
                MonthYearSuggest.SetCurrentYear(DateTime.Now.Year);
            }
        }