Beispiel #1
0
 private void SweetButton2Click(object sender, EventArgs e)
 {
     CoreDomain.Accounting.FiscalYear fiscalYear = (CoreDomain.Accounting.FiscalYear)olvYears.SelectedObject;
     if (fiscalYear != null)
     {
         EditFiscalYear editFiscalYear = new EditFiscalYear(false, false, true, fiscalYear);
         editFiscalYear.ShowDialog();
         LoadData();
     }
 }
Beispiel #2
0
 private void BtnOkClick(object sender, EventArgs e)
 {
     CoreDomain.Accounting.FiscalYear fiscalYear = Get();
     if (fiscalYear.Id == 0)
     {
         ServicesProvider.GetInstance().GetChartOfAccountsServices().CreateFiscalYear(fiscalYear);
     }
     else
     {
         ServicesProvider.GetInstance().GetChartOfAccountsServices().UpdateFiscalYear(fiscalYear);
     }
     Close();
 }
Beispiel #3
0
        public EditFiscalYear(bool isNameActive, bool isOpenDateActive, bool isCloseDateActive, CoreDomain.Accounting.FiscalYear fiscalYear)
        {
            InitializeComponent();
            tbxName.Enabled = isNameActive;
            dpkOpenDate.Enabled = isOpenDateActive;
            dpkCloseDate.Enabled = isCloseDateActive;
            _fiscalYear = fiscalYear;
            tbxName.Text = fiscalYear.Name;

            if (fiscalYear.OpenDate != null)
                dpkOpenDate.Value = (DateTime) fiscalYear.OpenDate;

            if (fiscalYear.CloseDate != null)
                dpkCloseDate.Value = (DateTime) fiscalYear.CloseDate;
        }
Beispiel #4
0
        public EditFiscalYear(bool isNameActive, bool isOpenDateActive, bool isCloseDateActive, CoreDomain.Accounting.FiscalYear fiscalYear)
        {
            InitializeComponent();
            tbxName.Enabled      = isNameActive;
            dpkOpenDate.Enabled  = isOpenDateActive;
            dpkCloseDate.Enabled = isCloseDateActive;
            _fiscalYear          = fiscalYear;
            tbxName.Text         = fiscalYear.Name;

            if (fiscalYear.OpenDate != null)
            {
                dpkOpenDate.Value = (DateTime)fiscalYear.OpenDate;
            }

            if (fiscalYear.CloseDate != null)
            {
                dpkCloseDate.Value = (DateTime)fiscalYear.CloseDate;
            }
        }