123456789101112131415161718192021222324 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace WSUniversalLib
- {
- public class Calculation
- {
- public int GetQuantityForProduct(int productType,int materialType,int count,float width,float length)
- {
- double prType=0;
- if (productType == 1) prType = 1.1;
- if (productType == 2) prType = 2.5;
- if (productType == 3) prType = 8.43;
- double mType=0;
- if (productType == 1) mType = 1.003;
- if (productType == 2) mType = 2.0012;
- return Convert.ToInt32(width * length * count * prType * mType);
- }
- }
- }
|