private void gridView_ShowingEditor(object sender, CancelEventArgs e) { if (gridView.FocusedColumn == gridColumn_WMConditionValue) { BaseWMItemView item = (BaseWMItemView)gridView.GetRow(gridView.FocusedRowHandle); if (item == null) { e.Cancel = true; return; } if (ConditionHelper.IsEmptyCondition(item.Type) || !item.Checked) { e.Cancel = true; return; } } }
void wnlist_OnChangeState(BaseWMItemView item) { ConditionTypes cts = wnlist.State; editWorkingTimeFactor.Enabled = spinEditFixedAmount.Enabled = checkEdit_ApplyAdditionalCharge.Enabled = !ConditionHelper.IsOnlyMessageCondition(cts); }
private void gridView_CustomRowCellEdit(object sender, CustomRowCellEditEventArgs e) { BaseWMItemView item = (BaseWMItemView)gridView.GetRow(e.RowHandle); if (item == null) { return; } if (e.Column == gridColumn_WMConditionValue) { if ((item.Type & ConditionTypes.TimeBetweenPreviousDayWorkingTime) != ConditionTypes.Empty) { e.RepositoryItem = repositoryItemSpinEditBetweenDay; return; } if ((item.Type & ConditionTypes.DurationOfWorkingDay) != ConditionTypes.Empty) { e.RepositoryItem = repositoryItemSpinEditDurationOfWorkingDays; return; } if (ConditionHelper.IsSpecialDaysCondition(item.Type)) { e.RepositoryItem = repositoryItemPopupContainerEdit1; } else if (ConditionHelper.IsTimesCondition(item.Type)) { e.RepositoryItem = repositoryItemTextEdit1; } else if (ConditionHelper.IsEveryItemCondition(item.Type)) { e.RepositoryItem = repositoryItemPopupContainerEditEveryItem; } else if (ConditionHelper.IsEmptyCondition(item.Type)) { e.RepositoryItem = null; } else if (ConditionHelper.IsLGDoubleCondition(item.Type)) { e.RepositoryItem = repositoryItemPopupContainerEdit2; } else if (ConditionHelper.IsIntegerCondition(item.Type)) { e.RepositoryItem = repositoryItemSpinEdit1; } else if (ConditionHelper.IsInteger2Condition(item.Type)) { e.RepositoryItem = repositoryItemSpinEditSaldo; } else if (item.Type == ConditionTypes.WorkingOnSaturdayOrSunday) { e.RepositoryItem = repositoryItemCountSaturdayOrSunday; } else if (item.Type == ConditionTypes.WorkingOnSunday) { e.RepositoryItem = repositoryItemCountSunday; } else if (item.Type == ConditionTypes.SaldoOnCertainWeeks) { e.RepositoryItem = repositoryItemPopupContainerEditSaldoEqualValueonCertainWeeks; //repositoryItemTextEditSalsoZeroOnCertainWeeks; } else { e.RepositoryItem = repositoryItemSpinEditBetweenDay; } } }
public void UpdateName() { ConditionName = ConditionHelper.GetConditionName(Type); }