private void repositoryItemPopupContainerEditEveryItem_QueryPopUp(object sender, CancelEventArgs e) { BaseWMItemView item = (BaseWMItemView)gridView.GetRow(gridView.FocusedRowHandle); if (item != null && (item is EveryItemWMItemView)) { EveryItemWMItemView itemWm = (item as EveryItemWMItemView); SetEveryItemControlState(itemWm); } }
private void repositoryItemPopupContainerEditEveryItem_CloseUp(object sender, CloseUpEventArgs e) { BaseWMItemView item = (BaseWMItemView)gridView.GetRow(gridView.FocusedRowHandle); if (item != null && (item is EveryItemWMItemView)) { EveryItemWMItemView itemWm = (item as EveryItemWMItemView); GetEveryItemControlState(itemWm); gridView.RefreshData(); } }
private void SetEveryItemControlState(EveryItemWMItemView itemWm) { checkEditEveryWeek.Checked = (itemWm.EveryItems & EveryItemEnum.EveryWeek) != EveryItemEnum.Empty; if (checkEditEveryWeek.Checked) { seCountWeek.Value = itemWm.CountWeek; } checkEditEveryMonth.Checked = (itemWm.EveryItems & EveryItemEnum.EveryMonth) != EveryItemEnum.Empty; if (checkEditEveryWeek.Checked) { seCountMonth.Value = itemWm.CountMonth; } checkEditEveryYear.Checked = (itemWm.EveryItems & EveryItemEnum.EveryYear) != EveryItemEnum.Empty; }
private void GetEveryItemControlState(EveryItemWMItemView itemWm) { itemWm.EveryItems = EveryItemEnum.Empty; if (checkEditEveryWeek.Checked) { itemWm.EveryItems |= EveryItemEnum.EveryWeek; itemWm.CountWeek = Convert.ToInt32(seCountWeek.Value); } if (checkEditEveryMonth.Checked) { itemWm.EveryItems |= EveryItemEnum.EveryMonth; itemWm.CountMonth = Convert.ToInt32(seCountMonth.Value); } if (checkEditEveryYear.Checked) { itemWm.EveryItems |= EveryItemEnum.EveryYear; } }