public void Add_scheduled(object sender, EventArgs e)
{
String sql;
String str = "server=abc;uid=sa;pwd=sa;initial catalog=master"; // define your server credentials
SqlConnection cn = new SqlConnection(str);
SqlCommand cmd;
sql = "insert into dbo.b_schedule";
sql = sql + "(sdate,scost,sremark,ano)";
sql = sql + "values(" + adddate.Text + "',";
sql = sql + Convert.ToDouble(Mcost.Text) + ",";
sql = sql + "'" + Mremark.Text + "',";
sql = sql + uano.Text + ")";
cmd = new SqlCommand(sql,cn);
cn.Open();
c.executeqry(sql);
cn.Close();
adddate.Text = string.Empty;
Mcost.Text = string.Empty;
Mremark.Text = string.Empty;
uano.Text = string.Empty;
Response.Redirect("BQS.aspx");
}