Advertisement
enoren

Untitled

May 7th, 2019
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.93 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using DynamicPluginData;
  5.  
  6. namespace DatacolDynamicPluginNS
  7. {                
  8.     public class DynamicPluginClass
  9.     {    
  10.         public static string processDataFieldValue(string s, ItemInfo itemInfo, GlobalInfo globalInfo)
  11.         {
  12.             double value      = Convert.ToDouble(s);
  13.             double onePercent = value / 10000;
  14.             var mycount       = value;
  15.            
  16.             if (mycount < 300)
  17.             {
  18.                 value = Math.Round(value - onePercent * 700);
  19.             }
  20.             else if (mycount < 1000)
  21.             {
  22.                 value = Math.Round(value - onePercent * 300);
  23.             }
  24.             else (value > 1000)
  25.             {
  26.                 value = Math.Round(value - onePercent * 150);
  27.             }                            
  28.            
  29.             return mycount.ToString();
  30.         }
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement