Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.97 KB | None | 0 0
  1.  double length = PolishNumericFunctions.Round((double)treeLengthCol.Value, 2);
  2.                 treeLengthCol.Value = length;
  3.                 double convFactor = this.FindWoodConvFactorMS(artNr);
  4.  
  5.                 double mp;
  6.                 if (mpCol.Value != DBNull.Value
  7.                     && (widthCol.Value == DBNull.Value
  8.                     || dmCol.Value == DBNull.Value))
  9.                 {
  10.                     mp = (double)mpCol.Value;
  11.                     dmCol.Value = DBNull.Value;
  12.                     widthCol.Value = DBNull.Value;
  13.                 }
  14.                 else
  15.                 {
  16.                     mp = length;
  17.                     mp *= (double)widthCol.Value;
  18.                     mp *= (int)dmCol.Value;
  19.                     mp /= 100.0;
  20.                 }
  21.  
  22.                 m3Col.Value = PolishNumericFunctions.Round(convFactor * mp
  23.                     , 2);
  24.                 mpCol.Value = PolishNumericFunctions.Round(mp, 2);
  25.                 return true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement