Example #1
0
        private void EditEntity()
        {
            Benchmark bh = FocusedEntity;

            if (bh == null || SWController == null || EntityStore == null)
            {
                return;
            }

            if (CanEditEntity())
            {
                using (FormBenchmark formEdit = new FormBenchmark())
                {
                    List <StoreToWorld> lst = SWController.GetListByStoreId(EntityStore.ID);

                    formEdit.SetStoreWorlds(lst);
                    formEdit.EntityStore = EntityStore;

                    formEdit.SetReadOnly();
                    formEdit.EntityBenchmark = bh;

                    if (formEdit.ShowDialog() == DialogResult.OK)
                    {
                        BenchmarksList.ResetItemById(bh.ID);
                    }
                }
            }
        }
Example #2
0
        private void NewEntity()
        {
            if (SWController == null || EntityStore == null)
            {
                return;
            }

            using (FormBenchmark formEdit = new FormBenchmark())
            {
                List <StoreToWorld> lst = SWController.GetListByStoreId(EntityStore.ID);

                formEdit.SetStoreWorlds(lst);
                formEdit.EntityStore = EntityStore;
                if (formEdit.ShowDialog() == DialogResult.OK)
                {
                    short y = formEdit.EntityBenchmark.Year;
                    if (y >= StartYear && y <= EndYear)
                    {
                        BenchmarksList.Add(formEdit.EntityBenchmark);
                    }
                }
            }
        }
Example #3
0
        private void NewEntity()
        {
            if (SWController == null || EntityStore == null) return;

            using (FormBenchmark formEdit = new FormBenchmark())
            {

                List<StoreToWorld> lst = SWController.GetListByStoreId(EntityStore.ID);

                formEdit.SetStoreWorlds(lst);
                formEdit.EntityStore = EntityStore;
                if (formEdit.ShowDialog() == DialogResult.OK)
                {
                    short y = formEdit.EntityBenchmark.Year;
                    if (y >= StartYear && y <= EndYear)
                        BenchmarksList.Add(formEdit.EntityBenchmark);
                }
            }
        }
Example #4
0
        private void EditEntity()
        {
            Benchmark bh = FocusedEntity;

            if (bh == null || SWController == null || EntityStore == null) return;

            if (CanEditEntity())
            {
                using (FormBenchmark formEdit = new FormBenchmark())
                {

                    List<StoreToWorld> lst = SWController.GetListByStoreId(EntityStore.ID);

                    formEdit.SetStoreWorlds(lst);
                    formEdit.EntityStore = EntityStore;

                    formEdit.SetReadOnly();
                    formEdit.EntityBenchmark = bh;

                    if (formEdit.ShowDialog() == DialogResult.OK)
                    {
                        BenchmarksList.ResetItemById(bh.ID);
                    }
                }
            }
        }