Example #1
0
            public OperationEntryCellViewModel(ServiceOrderOperationViewModel parent, DayOfWeekViewModel day) : base()
            {
                Guard.NotNull(() => parent, parent);
                Guard.NotNull(() => day, day);

                this._parent = parent;
                this._day    = day;
            }
Example #2
0
            public OperationEntryCellViewModel GetEntryCellForDay(DayOfWeekViewModel day)
            {
                Guard.NotNull(() => day, day);

                OperationEntryCellViewModel result = null;

                lock (_entryCells) {
                    if (!_entryCells.TryGetValue(day.Index, out result))
                    {
                        _entryCells.Add(day.Index, result = new OperationEntryCellViewModel(this, day));
                    }
                }

                return(result);
            }
Example #3
0
            public EnosixTimesheet_LINE_ITEM CreateNewTimeSheetItem(DayOfWeekViewModel day)
            {
                var item = new EnosixTimesheet_LINE_ITEM()
                {
                    WorkDate = day.Day,

                    ActivityType   = Operation.ActivityType,
                    ActivityNumber = Operation.OperationActivityNumber,

                    AttendanceOrAbsenceType = AttendanceOrAbsenceType,
                    ReceiverOrder           = Parent.ServiceOrder.ServiceOrderNumber,
                };

                _parent.AddTimesheetLineItem(item);
                return(item);
            }
Example #4
0
 public static ConditionViewModel ToConditionViewModel(this DayOfWeekViewModel dayOfWeekViewModel)
 {
     return(dayOfWeekViewModel.GenerateCondition());
 }