public AlterResourceBlockWindow(AlterBlockViewModel alterBlockDataContext,
                                 ResourceBlockViewModel resourceBlock,
                                 UserOperationsBuilder userOperationsBuilder, WeekScheduleViewModel parentSchedule)
 {
     InitializeComponent();
     DataContext            = alterBlockDataContext;
     _alterBlockDataContext = alterBlockDataContext;
     _resourceBlock         = resourceBlock;
     _userOperationsBuilder = userOperationsBuilder;
     _parentSchedule        = parentSchedule;
 }
 public static ResourceBlockModel ConvertToSqlModel(this ResourceBlockViewModel resourceBlockViewModel, int scheduleId)
 {
     return(new ResourceBlockModel()
     {
         Id = resourceBlockViewModel.Id,
         BlockOrder = resourceBlockViewModel.BlockOrder,
         PairPartnerId = resourceBlockViewModel.PairPartner?.ID,
         PersonId = resourceBlockViewModel.Person.ID.Value,
         ProjectId = resourceBlockViewModel.Project?.Id,
         WeeklyScheduleId = scheduleId
     });
 }
Exemplo n.º 3
0
 public WorkDayViewModel(ResourceBlockViewModel morning, ResourceBlockViewModel afternoon)
 {
     Morning   = morning;
     Afternoon = afternoon;
 }