private void repositoryItemPopupContainerEditSaldoEqualValueonCertainWeeks_QueryPopUp(object sender, CancelEventArgs e) { BaseWMItemView item = (BaseWMItemView)gridView.GetRow(gridView.FocusedRowHandle); if (item != null) { SetWeeksData(item); } }
private void repositoryItemCheckEdit1_CheckedChanged(object sender, EventArgs e) { BaseWMItemView item = (BaseWMItemView)gridView.GetRow(gridView.FocusedRowHandle); if (item != null) { item.Checked = (bool)gridView.EditingValue; } }
private void repositoryItemPopupContainerEdit1_CloseUp(object sender, CloseUpEventArgs e) { BaseWMItemView item = (BaseWMItemView)gridView.GetRow(gridView.FocusedRowHandle); if (item != null && (item is SpecialDayWMItemView)) { SpecialDayWMItemView itemDays = (item as SpecialDayWMItemView); itemDays.DayMasks = GetStateMonths(); } }
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(); } }
public void UpdateWeekData() { BaseWMItemView item = (BaseWMItemView)gridView.GetRow(gridView.FocusedRowHandle); SaldoZeroOnCertainWeekWMItemView condition = item as SaldoZeroOnCertainWeekWMItemView; if (condition != null) { condition.Compare = radioGroupOperatorWeeks.SelectedIndex; condition.Hours = Convert.ToInt32(spinEditHours.Value); condition.AssignWeekNumbers(textEditWeeks.Text); } }
private void gridView_RowStyle(object sender, RowStyleEventArgs e) { BaseWMItemView item = (BaseWMItemView)gridView.GetRow(e.RowHandle); if (item == null) { return; } if (item.Checked) { e.Appearance.BackColor = Color.GreenYellow; } }
void SetWeeksData(BaseWMItemView item) { SaldoZeroOnCertainWeekWMItemView condition = item as SaldoZeroOnCertainWeekWMItemView; if (condition != null) { radioGroupOperatorWeeks.SelectedIndex = condition.Compare; spinEditHours.Value = condition.Hours; textEditWeeks.Text = condition.ArrayToString(); } else { spinEditHours.Value = 0m; textEditWeeks.Text = String.Empty; } }
private void gridView_CustomUnboundColumnData(object sender, CustomColumnDataEventArgs e) { BaseWMItemView item = (BaseWMItemView)gridView.GetRow(e.RowHandle); if (item == null) { return; } if (e.IsGetData) { e.Value = item.DisplayString; } else { item.Value = e.Value; } }
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; } } }