コード例 #1
0
 void EditPurchaseOrder_Loaded(object sender, RoutedEventArgs e)
 {
     _vm = DataContext as EditPurchaseOrderViewModel;
     dtDateRequired.DisplayDateStart = DateTime.Now;
     LabelControls();
     Load();
 }
コード例 #2
0
        private void Load()
        {
            _vm = DataContext as EditPurchaseOrderViewModel;
            _vm.RunClearAndSetup();
            dtDateRequired.IsEnabled = true;
            DatePickerOrderDate.IsEnabled = false;
            string _orderId = NavigationService.Source.OriginalString.ParseQueryString("orderid");
            if (!string.IsNullOrEmpty(_orderId))
            {
                string orderId = _orderId;
                _vm.OrderIdLookup = new Guid(orderId);
                dtDateRequired.IsEnabled = false;
                DatePickerOrderDate.IsEnabled = false;
            }
            _vm.Load.Execute(null);

        }