Пример #1
0
		void initializeDataServices()
		{
			_uow = new Dal.SoheilEdmContext();
			_productGroupDs = new DataServices.ProductGroupDataService(_uow);
			_fpcDs = new DataServices.FPCDataService(_uow);
			_jobDs = new DataServices.JobDataService(_uow);
		}
Пример #2
0
		/// <summary>
		/// Reloads all jobs within current date range
		/// </summary>
		void reloadJobs()
		{
			using (var uow = new Dal.SoheilEdmContext())
			{
				var jobs = new DataServices.JobDataService(uow).GetInRange(StartDate, EndDate, ByDefinition);
				Jobs.Clear();
				foreach (var job in jobs)
				{
					var jobItemVm = new JobListItemVm(job);
					Jobs.Add(jobItemVm);
					jobItemVm.JobSelected += id => { if (JobSelected != null) JobSelected(jobItemVm); };
				}
			}
		}
Пример #3
0
		public PPEditorJob(Model.Job model, DataServices.JobDataService jobDataService)
		{
			_jobDataService = jobDataService;
			Replications.Add(model);

			Deadline = model.Deadline;
			ReleaseDT = model.ReleaseTime;
			Code = model.Code;
			Quantity = model.Quantity;
			Weight = model.Weight;
			Description = model.Description;
			FpcId = model.FPC.Id;
			Product = new ProductVm(model.ProductRework.Product, null);
			ProductRework = new ProductReworkVm(model.ProductRework, Product);

			initializeCommands();
		}