private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            try
            {
                ValidateData();
                int sale_maly = txt_saleMaly.Text.ToInt();

                var fyList = new List <Data.Financialyear>();

                var financialMainYear = new Data.FinancialMainYear()
                {
                    IDCorporation = get_id_corporation,
                    FYear         = sale_maly
                };

                for (int i = 1; i <= 12; i++)
                {
                    fyList.Add(new Financialyear()
                    {
                        FYyear        = sale_maly,
                        IDCorporation = get_id_corporation,
                        FYMonthName   = get_mounth_name(i),
                        FYMonthNumber = i,
                        FYMonthNO     = get_mounth_numberOFDays(i),
                        piroity       = i
                    });
                }


                using (var scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions()
                {
                    IsolationLevel = System.Transactions.IsolationLevel.ReadUncommitted,
                    Timeout = new TimeSpan(2, 0, 0)
                }))
                {
                    Business.GetFinancialMainYearBusiness().Save(financialMainYear);

                    Business.GetFinancialyearBusiness().Save(fyList);

                    scope.Complete();
                }

                this.Hide();
            }
            catch (Exception ex)
            {
                AccountingKernel.Forms.Base.BaseWindow.ShowError(ex);
            }
        }
        public void Delete(Data.FinancialMainYear entity)
        {
            try
            {
                if (entity == null)
                {
                    return;
                }

                this.Table.Remove(entity);
                this.SubmitChanges();
            }
            catch
            {
                throw;
            }
        }