vb.net - calculating the values from the formula -
using vb.net (windows application)
table1
id formula 001 a+b+c 002 a-b*c 003 a*b 004 a/b ... ...
user input's
textbox1.text = id of formula (users input) textbox2.text = value1 textbox3.text = value2 textbox4.text = value3
conditons
if user enter value in textbox1.text = 001 add 3 value (textbox2.text + textbox3.text, + textbox3.text), because user selected formula1 if user enter value in textbox1.text = 003 should multiply (textbox2.text * textbox3.text), because user selected formula2 ....
i want take formula according id, want pass value = textbox2.text, b = textbox3.text, c= textbox4.text
code
cmd = "select formula table1 id = '" & textbox1.text & "'" dim f1 string f1 = cmd.executescalar
so formula stored in f1, want pass user entered value
for example
f1 = + b * c means have pass value = textbox1.text, b= textbox2.text, c = textbox3.text
how this.
need vb.net code help
here's site has source code doing this, though in c#: eval class
Comments
Post a Comment