Example #1
0
        public FormBudgetDetails(AppSettings app, BudgetObj bud, int id)
        {
            this.appConfig = app;
            this.budget = bud;
            this.budgetId = id;
            InitializeComponent();

            budget.UpdateBudgetSelgerkoder(budgetId);
            budgetInfo = budget.GetBudgetInfo(budgetId);

            SetUI();

            RefreshDataGridView();
        }
Example #2
0
        public RankingBudget(FormMain form, DateTime dtFraArg, DateTime dtTilArg, BudgetCategory cat)
        {
            try
            {
                this.main = form;
                dtFra = dtFraArg;
                dtTil = dtTilArg;
                velgerPeriode = FormMain.datoPeriodeVelger;

                this.varekoderAlle = main.appConfig.varekoder.ToList();
                this.varekoderAlleAlias = varekoderAlle.Where(item => item.synlig == true).Select(x => x.alias).Distinct();

                budget = new BudgetObj(main);

                budgetInfo = budget.GetBudgetInfo(dtTil, cat);
                if (budgetInfo != null)
                    if (budgetInfo.selgere != null)
                        if (budgetInfo.selgere.Count == 0)
                            budgetInfo = null;
            }
            catch (Exception ex)
            {
                Log.Unhandled(ex);
                budgetInfo = null;
            }
        }