コード例 #1
0
        private void EditEntity()
        {
            TrendCorrection bh = FocusedEntity;

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

            // Edit can now trendcorrection, can't edit last EndTime < Today
            if (CanEditEntity())
            {
                using (FormTrendCorrection formEdit = new FormTrendCorrection())
                {
                    List <StoreToWorld> lst = SWController.GetListByStoreId(EntityStore.ID);

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

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

                    if (formEdit.ShowDialog() == DialogResult.OK)
                    {
                        TrendCorrectionList.ResetItemById(bh.ID);
                    }
                }
            }
        }
コード例 #2
0
        private void NewEntity()
        {
            if (SWController == null || EntityStore == null)
            {
                return;
            }

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

                formEdit.SetStoreWorlds(lst);
                formEdit.EntityStore = EntityStore;
                if (formEdit.ShowDialog() == DialogResult.OK)
                {
                    if (IsIncludeDateRange(StartDate, EndDate, formEdit.EntityTrend.BeginTime, formEdit.EntityTrend.EndTime))
                    {
                        TrendCorrectionList.Add(formEdit.EntityTrend);
                    }
                    UpdateButtonState();
                }
            }
        }
コード例 #3
0
        private void NewEntity()
        {
            if (SWController == null || EntityStore == null) return;

            using (FormTrendCorrection formEdit = new FormTrendCorrection())
            {

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

                formEdit.SetStoreWorlds(lst);
                formEdit.EntityStore = EntityStore;
                if (formEdit.ShowDialog() == DialogResult.OK)
                {
                    if (IsIncludeDateRange(StartDate, EndDate, formEdit.EntityTrend.BeginTime, formEdit.EntityTrend.EndTime))
                        TrendCorrectionList.Add(formEdit.EntityTrend);
                    UpdateButtonState();
                }
            }
        }
コード例 #4
0
        private void EditEntity()
        {
            TrendCorrection bh = FocusedEntity;

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

            // Edit can now trendcorrection, can't edit last EndTime < Today
            if (CanEditEntity())
            {

                using (FormTrendCorrection formEdit = new FormTrendCorrection())
                {

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

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

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

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