protected void PopulateCulture2DDL(string selected_value) { CultureClass culture_obj = new CultureClass(); string Discontinued = "1"; DataTable dt = culture_obj.GetListByDiscontinued(Discontinued); ddlCultureList.Items.Clear(); ddlCultureList.DataSource = dt; ddlCultureList.DataTextField = "CultureName"; ddlCultureList.DataValueField = "CultureCode"; ddlCultureList.DataBind(); ddlCultureList.SelectedValue = selected_value; }
protected void PopulateLanguage2DDL() { CultureClass culture_obj = new CultureClass(); string Discontinued = "1"; DataTable dt = culture_obj.GetListByDiscontinued(Discontinued); ddlLanguageList.Items.Clear(); ddlLanguageList.DataSource = dt; ddlLanguageList.DataTextField = "CultureName"; ddlLanguageList.DataValueField = "CultureCode"; ddlLanguageList.DataBind(); ddlLanguageList.SelectedIndex = 0; }
private void ShowLanguage(string selected_value) { CultureClass culture_obj = new CultureClass(); string Discontinued = "1"; DataTable dt = culture_obj.GetListByDiscontinued(Discontinued); ddlCultureCode.Items.Clear(); ddlCultureCode.DataSource = dt; ddlCultureCode.DataTextField = "CultureName"; ddlCultureCode.DataValueField = "CultureCode"; ddlCultureCode.DataBind(); ddlCultureCode.SelectedValue = selected_value; }
private void ShowLanguage() { CultureClass culture_obj = new CultureClass(); string Discontinued = "1"; DataTable dt = culture_obj.GetListByDiscontinued(Discontinued); ddlCultureCode.Items.Clear(); ddlCultureCode.DataSource = dt; ddlCultureCode.DataTextField = "CultureName"; ddlCultureCode.DataValueField = "CultureCode"; ddlCultureCode.DataBind(); ddlCultureCode.Items.Insert(0, new ListItem("- Chọn -", "0")); ddlCultureCode.SelectedIndex = 1; }
private void FillDataInGrid() { string Discontinued = ddlDiscontinued.SelectedValue; dt = culture_obj.GetListByDiscontinued(Discontinued); if (dt.Rows.Count > 0) { GridView1.DataSource = dt; GridView1.DataBind(); } else { dt.Rows.Add(dt.NewRow()); GridView1.DataSource = dt; GridView1.DataBind(); int TotalColumns = GridView1.Rows[0].Cells.Count; GridView1.Rows[0].Cells.Clear(); GridView1.Rows[0].Cells.Add(new TableCell()); GridView1.Rows[0].Cells[0].ColumnSpan = TotalColumns; GridView1.Rows[0].Cells[0].Text = "No Record Found"; } }