protected void FillWebsiteMaster() { string strcln = " SELECT DISTINCT dbo.WebsiteMaster.ID, dbo.WebsiteMaster.WebsiteName, dbo.WebsiteMaster.WebsiteUrl FROM dbo.WebsiteMaster INNER JOIN dbo.VersionInfoMaster ON dbo.WebsiteMaster.VersionInfoId = dbo.VersionInfoMaster.VersionInfoId Where VersionInfoMaster.ProductId='" + ddlproduct.SelectedValue + "' and WebsiteMaster.Status=1 ";// SqlCommand cmdcln = new SqlCommand(strcln, con); DataTable dtcln = new DataTable(); SqlDataAdapter adpcln = new SqlDataAdapter(cmdcln); adpcln.Fill(dtcln); DDLWebsiteC.DataSource = dtcln; DDLWebsiteC.DataValueField = "ID"; DDLWebsiteC.DataTextField = "WebsiteName"; DDLWebsiteC.DataBind(); DDLWebsiteC.Items.Insert(0, "--Select--"); DDLWebsiteC.Items[0].Value = "0"; DDLWebsiteC.SelectedIndex = 0; }
//-------------Add product code part -------------------------------------------------------------------- protected void FillWebsiteMaster() { string strcln = " SELECT distinct ID, WebsiteName,WebsiteUrl From WebsiteMaster Where VersionInfoId=" + ddlproductversion.SelectedValue + " "; SqlCommand cmdcln = new SqlCommand(strcln, con); DataTable dtcln = new DataTable(); SqlDataAdapter adpcln = new SqlDataAdapter(cmdcln); adpcln.Fill(dtcln); DDLWebsiteC.DataSource = dtcln; DDLWebsiteC.DataValueField = "ID"; DDLWebsiteC.DataTextField = "WebsiteName"; DDLWebsiteC.DataBind(); DDLWebsiteC.Items.Insert(0, "--Select--"); DDLWebsiteC.Items[0].Value = "0"; DDLWebsiteC.SelectedIndex = 0; }
protected void FillWebsiteMaster() { string strcln = " ";// if (chk_activelistonly.Checked == true) { strcln = " and WebsiteMaster.Status=1 "; } DDLWebsiteC.Items.Clear(); DataTable dtcln = MyCommonfile.selectBZ(" SELECT DISTINCT dbo.WebsiteMaster.ID, dbo.WebsiteMaster.WebsiteName, dbo.WebsiteMaster.WebsiteUrl FROM dbo.WebsiteMaster INNER JOIN dbo.VersionInfoMaster ON dbo.WebsiteMaster.VersionInfoId = dbo.VersionInfoMaster.VersionInfoId Where VersionInfoMaster.VersionInfoId='" + ddlProductname.SelectedValue + "' " + strcln + " "); DDLWebsiteC.DataSource = dtcln; DDLWebsiteC.DataValueField = "ID"; DDLWebsiteC.DataTextField = "WebsiteName"; DDLWebsiteC.DataBind(); DDLWebsiteC.Items.Insert(0, "--Select--"); DDLWebsiteC.Items[0].Value = "0"; DDLWebsiteC.SelectedIndex = 0; }