Esempio n. 1
0
        /// <summary>
        /// Select Project Command through command interface
        /// </summary>
        private void SelectProject(Object p)
        {
            ProjectModel selectedProject = GetProject((int)p);

            Globals.Project_ID         = (int)p;
            Globals.ProjectSelected    = true;
            ProjectSelected            = true;
            Globals.ProjectName        = selectedProject.ProjectName;
            Globals.ContractNo         = selectedProject.ContractNo;
            selectedProject.LastOpened = DateTime.Now;

            // Store the current DateTime in the selected project record so it can be used to sort the project list
            EDBEntities eDB = new EDBEntities();
            tblProject  Rec = eDB.tblProjects.Where(o => o.ID == selectedProject.ID).FirstOrDefault();

            Rec.LastOpened   = selectedProject.LastOpened;
            Rec.LastOpenedBy = Environment.UserName;
            eDB.SaveChanges();

            IsBackStageOpen = false;
            MainTitle       = Globals.ContractNo + Globals.ProjectName;
            TypeViewModelLocator.GetTypeVM();
            ObjectViewModelLocator.GetObjectVM();
            TemplateViewModelLocator.GetTemplateVM();
            PropertyViewModelLocator.GetPropertyVM();
            AspectViewModelLocator.GetAspectVM();
            AttributeViewModelLocator.GetAttributeVM();
            ObjectAssociationViewModelLocator.GetObjectAssociationVM();
            ObjectRequirementViewModelLocator.GetObjectRequirementVM();
            TemplateAssociationViewModelLocator.GetTemplateAssociationVM();
            TemplateRequirementViewModelLocator.GetTemplateRequirementVM();
        }
Esempio n. 2
0
 public PropertyView()
 {
     InitializeComponent();
     DataContext = PropertyViewModelLocator.GetPropertyVM();
     AspectListView.DataContext    = AspectViewModelLocator.GetAspectVM();
     AttributeListView.DataContext = AttributeViewModelLocator.GetAttributeVM();
 }
Esempio n. 3
0
        public void LoadCBAspects()
        {
            AspectViewModel aspectVM = AspectViewModelLocator.GetAspectVM();

            CBAspects.Clear();
            foreach (var item in aspectVM.Aspects)
            {
                CBAspects.Add(item);
            }
        }