private bool DoEdit(int _id)
    {
        bool result = false;

        Cms.BLL.C_article_attribute_field   bll   = new Cms.BLL.C_article_attribute_field();
        Cms.Model.C_article_attribute_field model = bll.GetModel(_id);

        if (model.is_sys == 0)
        {
            model.control_type = ddlControlType.SelectedValue;
            model.data_length  = Utils.StrToInt(txtDataLength.Text.Trim(), 0);
            model.data_place   = Utils.StrToInt(ddlDataPlace.SelectedValue, 0);
            model.data_type    = rblDataType.SelectedValue;
        }
        model.sort_id = Utils.StrToInt(txtSortId.Text.Trim(), 99);
        model.title   = txtTitle.Text;
        if (cbIsRequired.Checked == true)
        {
            model.is_required = 1;
        }
        else
        {
            model.is_required = 0;
        }
        if (cbIsPassword.Checked == true)
        {
            model.is_password = 1;
        }
        else
        {
            model.is_password = 0;
        }
        if (cbIsHtml.Checked == true)
        {
            model.is_html = 1;
        }
        else
        {
            model.is_html = 0;
        }
        model.editor_type     = Utils.StrToInt(rblEditorType.SelectedValue, 0);
        model.item_option     = txtItemOption.Text.Trim();
        model.default_value   = txtDefaultValue.Text.Trim();
        model.valid_pattern   = txtValidPattern.Text.Trim();
        model.valid_tip_msg   = txtValidTipMsg.Text.Trim();
        model.valid_error_msg = txtValidErrorMsg.Text.Trim();

        if (bll.Update(model))
        {
            adminUser.AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "修改扩展字段:" + model.title); //记录日志
            result = true;
        }

        return(result);
    }
    private void ShowInfo(int _id)
    {
        Cms.BLL.C_article_attribute_field   bll   = new Cms.BLL.C_article_attribute_field();
        Cms.Model.C_article_attribute_field model = bll.GetModel(_id);

        txtName.Enabled = false;
        txtName.Attributes.Remove("ajaxurl");
        txtName.Attributes.Remove("datatype");
        ddlControlType.SelectedValue = model.control_type;
        showControlHtml(model.control_type); //显示对应的HTML
        txtSortId.Text = model.sort_id.ToString();
        txtName.Text   = model.name;
        txtTitle.Text  = model.title;
        if (model.is_required == 1)
        {
            cbIsRequired.Checked = true;
        }
        else
        {
            cbIsRequired.Checked = false;
        }
        if (model.is_password == 1)
        {
            cbIsPassword.Checked = true;
        }
        else
        {
            cbIsPassword.Checked = false;
        }
        if (model.is_html == 1)
        {
            cbIsHtml.Checked = true;
        }
        else
        {
            cbIsHtml.Checked = false;
        }
        rblEditorType.SelectedValue = model.editor_type.ToString();
        rblDataType.SelectedValue   = model.data_type;
        txtDataLength.Text          = model.data_length.ToString();
        ddlDataPlace.SelectedValue  = model.data_place.ToString();
        txtItemOption.Text          = model.item_option;
        txtDefaultValue.Text        = model.default_value;
        txtValidPattern.Text        = model.valid_pattern;
        txtValidTipMsg.Text         = model.valid_tip_msg;
        txtValidErrorMsg.Text       = model.valid_error_msg;
        if (model.is_sys == 1)
        {
            ddlControlType.Enabled = false;
        }
    }