/// <summary> /// Not Required /// </summary> /// <param name="entity"></param> private void Fix_UomWeightOnProduct(Product entity) { //Not required if (entity.UomWeightOnProduct == null) { if (entity.UomWeightOnProductID.IsNullOrEmpty()) { //dont do anything.... } else { var x = new UomWeightDAL(_db, _user).FindFor(entity.UomWeightOnProductID); if (x == null) { throw new Exception(string.Format("Uom Weight On Product not found for product: {0}. ProductDAL.Fix_UomWeightOnProduct", entity.FullName())); } } } else { if (entity.UomWeightOnProductID.IsNullOrEmpty()) { entity.UomWeightOnProductID = entity.UomWeightOnProduct.Id; } } }
private void Fix_UomLengthForPackingVol(Product entity) { if (entity.UomLengthForPackingVol == null) { if (entity.UomStockID.IsNullOrEmpty()) { throw new Exception(string.Format("Uom Uom Length For Packing Vol not found for product: {0}. 1.ProductDAL.Fix_Uom_Purchase", entity.FullName())); } else { var x = new UomWeightDAL(_db, _user).FindFor(entity.UomStockID); if (x == null) { throw new Exception(string.Format("Uom Length For Packing Vol not found for product: {0}. 2.ProductDAL.Fix_Uom_Purchase", entity.FullName())); } } } else { if (entity.UomShipWeightId.IsNullOrEmpty()) { entity.UomShipWeightId = entity.UomShipWeight.Id; } } }