Esempio n. 1
0
            public EditProjectVM(int projectID)
            {
                ProjectID = projectID;

                WaveguideDB wgDB = new WaveguideDB();
                bool        success;

                ProjectContainer pc;

                if (projectID != 0)
                {
                    success = wgDB.GetProject(ProjectID, out pc);
                }
                else
                {
                    pc             = new ProjectContainer();
                    pc.Description = "";
                    pc.ProjectID   = 0;
                    pc.Archived    = false;
                    pc.TimeStamp   = DateTime.Now;
                    success        = true;
                }

                if (success)
                {
                    ProjectDescription = pc.Description;
                    Archived           = pc.Archived;
                    TimeStamp          = pc.TimeStamp;
                    ProjectID          = pc.ProjectID;
                }

                Users = new BindingList <UserItem>();
            }
Esempio n. 2
0
        private void CreateReportPB_Click(object sender, RoutedEventArgs e)
        {
            ObservableCollection <ExperimentIndicatorContainer> expIndicatorList;
            bool success = m_wgDB.GetAllExperimentIndicatorsForExperiment(VM.CurrentExperiment.ExperimentID, out expIndicatorList);

            if (success)
            {
                ProjectContainer project;
                success = m_wgDB.GetProject(VM.CurrentProject.ProjectID, out project);

                if (success && project != null)
                {
                    ExperimentContainer experiment;
                    success = m_wgDB.GetExperiment(VM.CurrentExperiment.ExperimentID, out experiment);

                    if (success && experiment != null)
                    {
                        ReportDialog dlg = new ReportDialog(project, experiment, expIndicatorList);

                        dlg.ShowDialog();
                    }
                }
            }
        }