sql table like below
sno items rate
1 chips 5
i want o/p like
i havetwo textboxes
1st textbox if value 15 ..i wnat multiply texbox1 value * rate in sql table
if textbox value =15
rate=5
textbox2 value =15*5=75
o/p
textbox2=75
plz write csharp code.....
i am using below quarie but its not working..............
SqlConnection con = new SqlConnection("");
SqlDataAdapter da;
DataSet ds;
da = new SqlDataAdapter("Select rate from verify ", con);
ds = new DataSet();
da.Fill(ds);
decimal quantity1 = Convert.ToDecimal(ds.Tables[0].Rows[0]["Rate"].ToString());
var a = Convert.ToDecimal(TextBox1.Text);
TextBox2.Text = (quantity1 * a).ToString();
Loading
Ranjit PowarPosted Apr 20, 2014, 3:12 AM
var a = Convert.ToDecimal(0.0);
if (string.IsNullOrEmpty(textBox1.Text))
{
a = 0;
}
else
a = Convert.ToDecimal (textBox1.Text );
textBox2.Text = (quantity1*a).ToString();
sama rrPosted Apr 20, 2014, 3:19 AM
sama rrPosted Apr 20, 2014, 2:57 AM
multiply the textbox value * sql table coloum
Ranjit PowarPosted Apr 20, 2014, 2:53 AM
sama rrPosted Apr 20, 2014, 2:52 AM
Ranjit PowarPosted Apr 20, 2014, 2:47 AM