private void ShowReadOnlyView(IEntity discipline)
        {
            var materialsModel    = Binds.DI.GetInstance <Model.MaterialModel>() as Model.MaterialModel;
            var materialTypeModel = Binds.DI.GetInstance <Model.MaterialTypeModel>() as Model.MaterialTypeModel;

            materialTypeModel.DefaultSpecification = new ByDiscipline(discipline.Key);

            var link = WindowManager.GetLinkControl <View.MaterialsReadView>(materialsModel, materialTypeModel);

            MainLink.AddLink(link);
        }
Example #2
0
        private void EditData()
        {
            //var pasWindow = WindowManager.GetWindow<View.PasswordView>();

            //if (pasWindow.ShowDialog().Value)
            {
                var childLink = WindowManager.GetLinkControl <View.DisciplinesView>();

                MainLink.AddLink(childLink);
            }
        }
Example #3
0
        private void MaterialsRead()
        {
            if (Program.SettingsInstance.IsReadOnly)
            {
                var repository = Binds.DI.GetInstance <Repository.DisciplineRepository>() as Repository.DisciplineRepository;
                var discipline = repository.FirstOrDefault(new Specification.Discipline.ByKey(Program.SettingsInstance.DisciplineKey));
                ShowReadOnlyView(discipline);
            }
            else
            {
                var childLink = WindowManager.GetLinkControl <View.DisciplinesListView>();

                MainLink.AddLink(childLink);
            }
        }