예제 #1
0
    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");
        }
    }
예제 #2
0
 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()));
         }
     }
 }