private void BindGrid() { try { grdFilm.DataSource = FilmService.Film_GetByAll(); grdFilm.DataBind(); } catch (Exception ex) { WebMsgBox.Show(ex.Message); } }
private void LoadFilterFilmDropDownList() { ddlFilterFilm.Items.Clear(); ddlFilterFilm.Items.Add(new ListItem(" -- View all -- ", "")); var dt = new DataTable(); dt = FilmService.Film_GetByAll(); for (int i = 0; i < dt.Rows.Count; i++) { ddlFilterFilm.Items.Add(new ListItem(Common.StringClass.ShowNameLevel(dt.Rows[i]["NameF"].ToString(), "0"), dt.Rows[i]["FilId"].ToString())); } ddlFilterFilm.DataBind(); }
private void ViewFilm() { ddlFilId_Update.Items.Clear(); ddlFilId_Update.Items.Add(new ListItem("=== Choose Country ===", "0")); var dt = new DataTable(); dt = FilmService.Film_GetByAll(); for (int i = 0; i < dt.Rows.Count; i++) { ddlFilId_Update.Items.Add(new ListItem(Common.StringClass.ShowNameLevel(dt.Rows[i]["NameF"].ToString(), ""), dt.Rows[i]["FilId"].ToString())); } ddlFilId_Update.DataBind(); dt.Rows.Clear(); }
private void LoadFilterNewsNameAutocomplete() { try { string strName = ""; var dt = new DataTable(); dt = FilmService.Film_GetByAll(); for (int i = 0; i < dt.Rows.Count; i++) { strName += dt.Rows[i]["NameF"].ToString() + "|"; } ListFilm = Common.StringClass.Check(strName) && strName.Substring(strName.Length - 1).Contains("|") ? strName.Substring(0, strName.Length - 1) : strName; } catch (Exception ex) { WebMsgBox.Show(ex.Message); } }