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); } } }
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); } } }
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); } }
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); } } }