private void FillQuestionType() { DataTable dt = new Tables.T_QuestionTypes().Open("", "UseType = 1", "[ID]"); if ((dt == null) || (dt.Rows.Count == 0)) { PF.GoError(4, "数据库繁忙,请重试", "Room_Service"); } else { ControlExt.FillDropDownList(this.ddlQuestionType, dt, "Name", "ID"); } }
private void BindDataForType() { DataTable table = new Tables.T_QuestionTypes().Open("", "UseType = 1", "[ID]"); if (table == null) { PF.GoError(4, "数据库繁忙,请重试", "Admin_Questions"); } else { this.ddlType.Items.Clear(); this.ddlType.Items.Add(new ListItem("--选择问题类型--", "-1")); foreach (DataRow row in table.Rows) { this.ddlType.Items.Add(new ListItem(row["Name"].ToString(), row["ID"].ToString())); } } }