예제 #1
0
 private void Item_Reset(AuctionItem ai)
 {
     dataCxt = new DataCxt {
         aItem = ai, aLocation = dataCxt.aLocation
     };
     this.DataContext = dataCxt;
     Item_ResetLbl();
 }
예제 #2
0
 private void Location_Reset(AuctionLocation al)
 {
     dataCxt = new DataCxt {
         aItem = dataCxt.aItem, aLocation = al
     };
     this.DataContext = dataCxt;
     Location_ResetLbl();
 }
예제 #3
0
        private void initiateComponent(int userType)
        {
            //System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("de");
            InitializeComponent();
            // Enable-Disable and Show-Hide Windows Components based on the User Privileges
            controlFunctions = new ControlFunctions(userType);
            // Item Sources
            lbxItem_Grid.ItemsSource     = controlFunctions.auctionItems;
            lbxLocation_Grid.ItemsSource = controlFunctions.auctionLocations;
            lbxEvent_Grid.ItemsSource    = controlFunctions.auctionEvents;
            // Data Context Objects
            dataCxt = new DataCxt {
                aItem = new AuctionItem(), aLocation = new AuctionLocation()
            };
            this.DataContext = dataCxt;

            if (userType > 2)
            {
                btnEvent_Add.Visibility       = Visibility.Hidden;
                tabAuctionItem.Visibility     = Visibility.Hidden;
                tabAuctionLocation.Visibility = Visibility.Hidden;
            }
        }