/// <summary> /// Initializes a new instance of the <see cref="Material"/> class. /// </summary> /// <param name="edc">The <see cref="Entities"/> instance.</param> /// <param name="product">The product.</param> /// <param name="batch">The batch.</param> /// <param name="sku">The sku.</param> /// <param name="storLoc">The store location.</param> /// <param name="skuDescription">The sku description.</param> /// <param name="units">The units.</param> /// <param name="fgQuantity">The finished good quantity.</param> /// <param name="tobaccoQuantity">The tobacco quantity.</param> /// <param name="productID">The product ID.</param> public Material (Entities edc, Entities.ProductDescription product, string batch, string sku, string storLoc, string skuDescription, string units, decimal fgQuantity, decimal tobaccoQuantity, string productID) : this() { Archival = false; Batch = batch; Material2BatchIndex = null; SKU = sku; StorLoc = storLoc; SKUDescription = skuDescription; Title = skuDescription; Units = units; FGQuantity = Convert.ToDouble(fgQuantity); TobaccoQuantity = Convert.ToDouble(tobaccoQuantity).Round2Decimals(); ProductID = productID; ProductType = product.productType; Overuse = 0; Dust = 0; SHMenthol = 0; Waste = 0; Tobacco = 0; Disposed = 0; }
private void GetProductType(Entities edc) { Entities.ProductDescription product = edc.GetProductType(this.SKU, this.StorLoc); this.ProductType = product.productType; this.IPRType = product.IPRMaterial; }