Пример #1
0
        //得到问题类型列表
        protected void bindReceptionType()
        {
            YouthReceptionTypeBLL type_bll = new YouthReceptionTypeBLL();
            DataSet ds = type_bll.GetList();

            ddl_type.DataValueField = "reception_type_id";
            ddl_type.DataTextField  = "reception_type";
            ddl_type.DataSource     = ds;
            ddl_type.DataBind();
            ddl_type.Items.Insert(0, new ListItem("", "0"));
        }
Пример #2
0
        protected void lbtnSave_Click(object sender, EventArgs e)
        {
            YouthReceptionType    model = new YouthReceptionType();
            YouthReceptionTypeBLL bll   = new YouthReceptionTypeBLL();

            model.Reception_type = txtName.Text.ToString();
            if (bll.AddReceptionType(model))
            {
                MyUtil.ShowMessageRedirect(this.Page, "添加成功", "ReceptionType.aspx");
            }
            else
            {
                MyUtil.ShowMessage(this.Page, "添加失败");
            }
        }