public CProduct(product p, product_types type, brand b, msrmnt_units u, int?qt, user usr) { product_id = p.product_id; product_name = p.product_name; if (null != type) { product_type = new CProductType(type); } if (null != brand) { brand = new CBrand(b); } specs = p.specs; if (null != u) { unit_of_msrmnt = new CUoM(u); } unit_price = p.unit_price; product_image = p.product_image; qty = qt; if (null != usr) { user = new CUser(usr); } }
public CProduct(product p, product_types type, brand b, msrmnt_units u, int?qt, int?otherQt) { product_id = p.product_id; product_name = p.product_name; if (null != type) { product_type = new CProductType(type); } if (null != brand) { brand = new CBrand(b); } specs = p.specs; if (null != u) { unit_of_msrmnt = new CUoM(u); } unit_price = p.unit_price; product_image = p.product_image; qty = qt; otherThanCurrentInventoryQty = otherQt; }