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