Exemple #1
0
		public WarmupCell(int stationId, Rework parentVm, Model.Warmup model)
		{
			CellType = CellType.WarmupCell;
			Row = parentVm;
			Model = model;
			_stationId = stationId;
		}
Exemple #2
0
		public ChangeoverCell(Rework row, Rework column, int stationId, Dal.SoheilEdmContext context)
		{
			Row = row;
			Column = column;
			RowIndex = row.RowIndex;
			ColumnIndex = column.ColumnIndex;
			_stationId = stationId;

			CrossColors = new CrossColors(row.Product.Color, column.Product.Color);
			if (Row.IsValid)
			{
				var ds = new DataServices.ChangeoverDataService();
				int fromPRId = row.ProductReworkId;
				int toPRId = column.ProductReworkId;
				//Model = await new Task<Model.Changeover>(()=>ds.GetByInfoOrAdd(stationId, fromPRId, toPRId, context));
				Model = ds.GetByInfoOrAdd(stationId, fromPRId, toPRId, context);
			}

			if (row.Product.Id == column.Product.Id)
				CellType = CellType.None;
			else
				CellType = CellType.ChangeoverCell;
		}
Exemple #3
0
		/// <summary>
		/// this means this remork works differently (as a grouping tool)
		/// </summary>
		/// <param name="product"></param>
		/// <param name="isRowHeader"></param>
		/// <returns></returns>
		public static Rework InvalidMainProduct(Product product, bool isRowHeader)
		{
			Rework rework = new Rework();
			rework.ProductReworkId = new DataServices.ProductReworkDataService(null).GetMainForProduct(product.Id).Id;
			rework.ReworkId = -1;
			rework.CellType = isRowHeader ? CellType.ProductRowHeaderCell : CellType.ProductColumnHeaderCell;
			rework.IsRework = false;
			rework.Name = product.Name;
			rework.Code = product.Code;
			rework.Product = product;
			if (isRowHeader)
			{
				rework.Checkbox = new CheckboxCell(rework);
				rework.Warmup = new WarmupCell(rework.Product.ProductGroup.Station.Id, rework, null);
			}
			rework._isRowHeader = isRowHeader;
			rework.IsValid = false;
			rework.IsDurationsVisible = false;
			return rework;
		}
Exemple #4
0
		public CheckboxCell(Rework parentVm)
		{
			CellType = SetupTime.CellType.CheckBoxCell;
			Row = parentVm;
		}