Esempio n. 1
0
        private void BtnNewClick(object sender, EventArgs e)
        {
            short year;
            byte  month;

            if (NewPeriodForm.Execute(this, out year, out month))
            {
                FillPeriods(year, month);
            }
        }
Esempio n. 2
0
        public static bool Execute(IWin32Window owner, out short year, out byte month)
        {
            using (var form = new NewPeriodForm())
            {
                form.Initialize();
                if (form.ShowDialog(owner) == DialogResult.OK)
                {
                    year  = form.Year;
                    month = form.Month;

                    return(true);
                }
            }

            year  = 0;
            month = 0;
            return(false);
        }