Exemplo n.º 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");
     }
 }
Exemplo n.º 2
0
    private void FillQuestionType()
    {
        DataTable dt = new DAL.Tables.T_QuestionTypes().Open("", "UseType = 1", "[ID]");

        if (dt == null || dt.Rows.Count == 0)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Room_Service");

            return;
        }

        Shove.ControlExt.FillDropDownList(ddlQuestionType, dt, "Name", "ID");
    }
Exemplo n.º 3
0
    private void BindDataForType()
    {
        DataTable dt = new DAL.Tables.T_QuestionTypes().Open("", "UseType = 1", "[ID]");

        if (dt == null)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Admin_Questions");

            return;
        }

        ddlType.Items.Clear();
        ddlType.Items.Add(new ListItem("--选择问题类型--", "-1"));

        foreach (DataRow dr in dt.Rows)
        {
            ddlType.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString()));
        }
    }
Exemplo n.º 4
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()));
         }
     }
 }