示例#1
0
 private void ClearFieldsAndReloadBoxes()
 {
     tbPrepaySum.Clear();
     tbMotivation.Clear();
     cbCountryDeparture.Items.Clear();
     cbCountryArrival.Items.Clear();
     lbReportsDenied.Items.Clear();
     HandleItems.FillListBoxWithAwaitingApproval(lbReportsDenied);
     HandleItems.FillCbsWithCountries(cbCountryArrival, cbCountryDeparture);
     LoadReseUtlägg();
     //HandleItems.FillTripCbWithAllTrips(cbPickTripExpensesTab);
 }
示例#2
0
        public RapportHantering()
        {
            InitializeComponent();
            HandleItems.FillBossList(cbBosses);
            LoadReseUtlägg();
            HandleItems.FillCbsWithCountries(cbCountryArrival, cbCountryDeparture);
            HandleItems.FillListBoxWithAwaitingApproval(lbReportsDenied);

            var bosses = UserHandling.getBosses();

            for (int i = 0; i < bosses.Count; i++)
            {
                if (bosses[i].userID == HandleItems.GetCurrentUserId())
                {
                    bossFound = true;
                }
            }
            if (bossFound == false)
            {
                tab3.Visibility = Visibility.Hidden;
                tab4.Visibility = Visibility.Hidden;
                tab5.Visibility = Visibility.Hidden;
            }

            if (HandleItems.GetCurrentUserId() == 0)
            {
                tab3.Visibility = Visibility.Hidden;
                tab4.Visibility = Visibility.Hidden;
                tab5.Visibility = Visibility.Hidden;
                tbSearchAnstIdDenied.IsEnabled   = false;
                btnGetReportsDenied.IsEnabled    = false;
                tbSearchAnstIdApproved.IsEnabled = false;
                btnGetReportsApproved.IsEnabled  = false;
                anvInstallningar.IsEnabled       = false;
            }
        }