public void BindSummaryGrid() { SqlConnection con = new SqlConnection(connString); SqlCommand cmd = new SqlCommand(); SqlDataAdapter da = new SqlDataAdapter(); DataSet ds = new DataSet(); try { cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "uspGetSummary"; cmd.Connection = con; con.Open(); cmd.Parameters.AddWithValue("@QuarterMonthID", Convert.ToInt32(ddlQuarterMonth1.SelectedValue.ToString())); cmd.Parameters.AddWithValue("@QuarterYearID", Convert.ToInt32(ddlQuarterYear1.SelectedValue.ToString())); da.SelectCommand = cmd; da.Fill(ds); grdvwExportSummary.DataSource = ds.Tables[0]; grdvwExportSummary.DataBind(); } catch (Exception ex) { } finally { if (con.State == ConnectionState.Open) { con.Close(); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)