コード例 #1
0
ファイル: Form_Year.cs プロジェクト: retlav/GesAMFCrepo
        /// <versions>01-12-2017(GesAMFC-v0.0.4.41)</versions>
        public Form_Year(AMFCYear objYearSelected)
        {
            this.LibAMFC = new Library_AMFC_Methods();
            try
            {
                InitializeComponent();

                ListYears = new AMFCYears();
                ListYears.SetYearList();

                this.IsYearSelected = false;

                if (Program.IsValidYear(objYearSelected.Value))
                {
                    this.YearSelected = objYearSelected;
                }
                else
                {
                    this.YearSelected = Program.DefaultYear;
                }
            }
            catch (Exception ex)
            {
                Program.HandleError(ex.TargetSite.Name, ex.Message, Program.ErroType.EXCEPTION, true, false);
            }
        }
コード例 #2
0
        /// <versions>20-02-2018(GesAMFC-v1.0.0.3)</versions>
        public Form_Recibo_Quotas(AMFCMember objMember, AMFCYear objYearSelected)
        {
            this.LibAMFC = new Library_AMFC_Methods();
            try
            {
                InitializeComponent();

                Member = new AMFCMember();

                ListYears = new AMFCYears();
                ListYears.SetYearList(2000, 2018);

                if (Program.IsValidYear(objYearSelected.Value))
                {
                    this.YearSelected = objYearSelected;
                }
                else
                {
                    this.YearSelected = Program.DefaultYear;
                }

                if (objMember != null && objMember.NUMERO >= objMember.MinNumber && objMember.NUMERO < objMember.MaxNumber && !String.IsNullOrEmpty(objMember.NOME))
                {
                    this.Member         = objMember;
                    TextEdit_SOCIO.Text = this.Member.NUMERO.ToString();
                    TextEdit_NOME.Text  = this.Member.NOME;
                }
            }
            catch (Exception ex)
            {
                Program.HandleError(ex.TargetSite.Name, ex.Message, Program.ErroType.EXCEPTION, true, false);
            }
        }
コード例 #3
0
ファイル: Form_Year.cs プロジェクト: retlav/GesAMFCrepo
 /// <versions>01-12-2017(GesAMFC-v0.0.4.41)</versions>
 private void ComboBoxEdit_Year_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         ComboboxItem objItemYear = (ComboBoxEdit_Year.SelectedItem as ComboboxItem);
         this.YearSelected = new AMFCYear(Convert.ToInt32(objItemYear.GetValue()), objItemYear.GetText());
         if (!Program.IsValidYear(this.YearSelected.Value))
         {
             this.YearSelected = new AMFCYear(DateTime.Today.Year);
         }
     }
     catch (Exception ex)
     {
         Program.HandleError(ex.TargetSite.Name, ex.Message, Program.ErroType.EXCEPTION, true, false);
     }
 }