Posted on: 5/17/2013 5:23:48 AM | Views : 212

Hi,
Here, i manually declared variables for country, startdate and enddate. How can i change that. Here is my code.
private void PopulateParameters() { CommandObject cmdRpt = null; SqlConnection cn = new SqlConnection(); if (this.lstReport.SelectedValue.ToString() == "uspDeals-report-New") {
SqlCommand cmdSQL = new SqlCommand(); cmdSQL.CommandType = CommandType.Text;
int sCountry = 3; DateTime sdate = Convert.ToDateTime("02/02/2011"); DateTime EDATE = Convert.ToDateTime("02/02/2013");
StringBuilder querybui = new StringBuilder();
querybui.Append(@"Select tc.CountryID, tb.DealID, tb.StartDate, tb.EndDate, tb.Description, tb.IsApproved, tb.CreatedBy From tblCountry as tc inner join tblBid as tb on tc.CountryID = tb.CountryID Where (tc.CountryID=" + sCountry + ") and (tb.StartDate> ...

Go to the complete details ...