×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: ASP
Posted by: Mario Lopes
Added: Apr 23, 2018 3:21 PM
Views: 3082
Tags: command select
  1. SqlDataSource2.SelectCommand = "SELECT sum(valor) as total from movimentos where (tipo='Pagamento'and edificio=@a) ";
  2.             SqlDataSource2.SelectParameters.Add("@a", DropDownList1.SelectedValue);
  3.             SqlDataSource2.DataBind();
  4.             DataView dvsqllist = (DataView)SqlDataSource2.Select(DataSourceSelectArguments.Empty);
  5.             DataTable tablelist = dvsqllist.Table;
  6.             txtPagamentos.Text = tablelist.Rows[0]["total"].ToString();