public void Delete(int id) { try { MaterialInput.Delete(id); } catch (HttpResponseException ex) {} }
public ActionResult DeleteConfirmed(int id) { MaterialInput materialInput = Mapper.Map <MaterialInput>(materialInputService.Get(id)); materialInput.IsDeleted = true; materialInputService.Update(materialInput); return(RedirectToAction("Index")); }
public async void Put(int id) { try { String JSONString = await Request.Content.ReadAsStringAsync(); Material material = JSONToObject(JSONString); MaterialInput.Update(id, material); } catch (HttpResponseException ex) {} }
public Material Get(int id) { try { Material material = MaterialInput.Read(id); return(material); } catch (HttpResponseException ex) { return(null);; } }
public static void GeometryInputFaceSetFrontMaterial( GeometryInputRef geometryRef, long faceIndex, MaterialInput materialInput) { MaterialInputStruct mis = materialInput.materialInputStruct(); ThrowOut( SUGeometryInputFaceSetFrontMaterial( geometryRef.intPtr, faceIndex, ref mis), "Could not set front material."); }
public ActionResult Edit([Bind(Include = "Id,OrderTypeId,OrderId,Cost,MaterialId,InputAmount,SampleAmount,MaterialQuality,Returned,SupplierId,StockLocationId,Checked,QualityControlStatus,CreatedBy,CreatedAt,UpdatedBy,UpdatedAt,IsDeleted,DeletedBy,DeletedAt,IsActive,IpAddress,UserAgent,Location")] MaterialInput materialInput) { if (ModelState.IsValid) { var entity = Mapper.Map <MaterialInput>(materialInput); materialInputService.Update(entity); return(RedirectToAction("Index")); } ViewBag.MaterialId = new SelectList(materialService.GetAll(), "Id", "Name", materialInput.MaterialId); ViewBag.OrderId = new SelectList(orderService.GetAll(), "Id", "Name", materialInput.OrderId); ViewBag.OrderTypeId = new SelectList(orderTypeService.GetAll(), "Id", "Name", materialInput.OrderTypeId); ViewBag.StockLocationId = new SelectList(stockLocationService.GetAll(), "Id", "Name", materialInput.StockLocationId); ViewBag.SupplierId = new SelectList(supplierService.GetAll(), "Id", "Name", materialInput.SupplierId); return(View(materialInput)); }
public List <ZAIDM_EX_MATERIAL> GetMaterialByParam(MaterialInput input) { if (input == null) { return(_repository.Get(null, null, includeTables).ToList()); } Expression <Func <ZAIDM_EX_MATERIAL, bool> > queryFilter = PredicateHelper.True <ZAIDM_EX_MATERIAL>(); if (!string.IsNullOrEmpty(input.MaterialNumberSource)) { queryFilter = queryFilter.And(x => x.STICKER_CODE.ToLower().Contains(input.MaterialNumberSource.ToLower())); } if (!string.IsNullOrEmpty(input.PlantIdSource)) { queryFilter = queryFilter.And(x => x.WERKS == input.PlantIdSource); } if (!string.IsNullOrEmpty(input.GoodTypeSource)) { queryFilter = queryFilter.And(x => x.EXC_GOOD_TYP == input.GoodTypeSource); } if (!string.IsNullOrEmpty(input.UomNameSource)) { queryFilter = queryFilter.And(x => x.BASE_UOM_ID == input.UomNameSource); } if (!string.IsNullOrEmpty(input.MaterialDescSource)) { queryFilter = queryFilter.And(x => x.MATERIAL_DESC.ToLower().Contains(input.MaterialDescSource.ToLower())); } if (input.ClientDeletionSource.HasValue) { queryFilter = queryFilter.And(x => x.CLIENT_DELETION == input.ClientDeletionSource.Value); } if (input.PlantDeletionSource.HasValue) { queryFilter = queryFilter.And(x => x.PLANT_DELETION == input.PlantDeletionSource.Value); } return(_repository.Get(queryFilter, null, includeTables).ToList()); }
// Internal constructor internal Material(ShaderLayout layout, ShaderProgram program, MaterialInput input, MaterialOutput output) { // Assign objects Layout = layout; Program = program; Layout.IncRefCount(); Program.IncRefCount(); Input = input; Output = output; // Validate vertex inputs if (input.Vertices.Count > 0) { uint vmask = 0; foreach (var vd in input.Vertices) { if ((vmask & vd.LocationMask) != 0) { throw new ArgumentException("Duplicate vertex location in descriptions", nameof(input)); } vmask |= vd.LocationMask; } if (vmask != Layout.VertexLocationMask) { throw new ArgumentException( $"Missing vertex location in material descriptions ({vmask:X8} != {Layout.VertexLocationMask:X8})", nameof(input)); } } // Validate outputs if (output.BlendStates.Count != layout.FragmentOutputs.Count) { throw new ArgumentException("Output count mismatch", nameof(output)); } }
public void Update(MaterialInput materialInput) { materialInputRepository.Update(materialInput); unitOfWork.SaveChanges(); }
public void Insert(MaterialInput materialInput) { materialInputRepository.Insert(materialInput); unitOfWork.SaveChanges(); }
public IEnumerable <Material> Get() { return(MaterialInput.Read()); }
public static void UpdateMaterialProperty(Renderer renderer, string propertyName, PropertyType propertyType, MaterialInput input) { MaterialPropertyBlock propertyBlock = new MaterialPropertyBlock(); renderer.GetPropertyBlock(propertyBlock); if (propertyType == PropertyType.vector) { propertyBlock.SetVector(propertyName, input.vectorData); } else if (propertyType == PropertyType.floatNum) { propertyBlock.SetFloat(propertyName, input.floatData); } else if (propertyType == PropertyType.intNum) { } else if (propertyType == PropertyType.color) { propertyBlock.SetColor(propertyName, input.vectorData); } renderer.SetPropertyBlock(propertyBlock); return; }
/// <summary> /// Describes a new material from a shader program and a specific set of vertex descriptions. /// </summary> /// <param name="shader">The shader program to process the material with.</param> /// <param name="input">The vertex input topology for the material.</param> public Material(Shader shader, MaterialInput input, MaterialOutput output) : this(shader.Layout, shader.Program, input, output) { }