예제 #1
0
        public SiteViewModel(ViewModelBase parent, Site selectedSite) //: base()
        {
            Parent = parent;
 
            SelectedSite = selectedSite;
            SetLeftPanel();
        }
예제 #2
0
        private void ToSiteView(Site site)
        {
            MainViewModel model = ((MainViewModel)Parent.Parent);

            Page page = new CustomerSiteEquipmentPage();
            page.DataContext = new SiteViewModel(model, site);
            model.CustomerSiteEquipmentPage = page;
        }
        public sTabAddBatchEquipmentViewModel(ViewModelBase parent)
        {
            Parent = parent;
            _selectedSite = ((SiteViewModel)Parent.Parent).SelectedSite;

            LoadEquipmentTypeList();
            LoadLocationList();
        }
        public sTabAddEditEquipmentViewModel(ViewModelBase parent)      // pass in parent, by Fred, 2-5-2013
        {
            Parent = parent;
            DisplayName = "Add Equipment";
            _selectedSite = ((SiteViewModel)Parent.Parent).SelectedSite;

            LoadEquipmentTypeList();
            LoadLocationList();
        }
예제 #5
0
        public AddEditSiteViewModel(ViewModelBase parent, Site site)
        {
            Parent = parent;
            _site = site;

            DisplayName = "Site Data Form";

            Title = string.Format("Site - {0}", _site.ROW_ID);

            GetMainAddressPage();
            GetBillingAddressPage();
        }
예제 #6
0
        public SiteLeftViewModel(ViewModelBase parent)
            : base()     // call base class to initialize the dialogService
        {
            Parent = parent;

            _selectedSite = ((SiteViewModel)Parent).SelectedSite;

            Title = "SITE";
            Label1 = "Company: ";
            Label2 = "Address: ";

            LoadSiteRadioButtonList();

            ReturnVisibility = Visibility.Visible;
        }
예제 #7
0
        public AddEditViewModel(ViewModelBase mainViewModel, object obj) : base()
        {
            _mainViewModel = mainViewModel as MainViewModel;

            if (IsCustomer(obj))
            {
                _isCustomer = true;
                _customer = obj as Customer;
                GetAddEditCustomerPage();
            }
            else if (IsSite(obj))
            {
                _isSite = true;
                _site = obj as Site;
                GetAddEditSitePage();
            }
        }
예제 #8
0
        public sTabEquipmentViewModel(ViewModelBase parent)
        {
            Parent = parent;

            _selectedSite = ((SiteViewModel)Parent.Parent).SelectedSite;

            // load filter list
            LoadEquipmentTypeList();
            LoadLocationList();

            // load list
            LoadEquipmentList();
        }