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

            if (bh == null || SWController == null || EntityStore == null)
            {
                return;
            }
            if (CanEditEntity())
            {
                FormSelectYear selectYear = new FormSelectYear();

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

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

                selectYear.SetReadOnly();
                selectYear.Entity = bh;

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

            FormSelectYear selectYear = new FormSelectYear();

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

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

            FormSelectYear selectYear = new FormSelectYear();

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

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

            if (bh == null || SWController == null || EntityStore == null) return;
            if (CanEditEntity())
            {
                FormSelectYear selectYear = new FormSelectYear();

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

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

                selectYear.SetReadOnly();
                selectYear.Entity = bh;

                if (selectYear.ShowDialog() == DialogResult.OK)
                {
                    BufferHoursList.ResetItemById(bh.ID);
                }
            }
        }