protected void add_Click(object sender, EventArgs e)
        {
            T_InfoAdmin model = new T_InfoAdmin();

            model = bll.getAdminByID(name.Text.Trim());

            //检查账户名是否存在
            if (model.InfoAdminPwd == null)
            {
                model.InfoAdminAccount = name.Text.Trim();
                model.InfoAdminName    = reaname.Text.ToString().Trim();
                model.InfoAdminPwd     = pwd.Text.ToString().Trim();
                model.InfoAdminTel     = phone.Text.ToString().Trim();


                //绑定类别下拉菜单
                model.InfoAdminCategory = DropDownList1.SelectedIndex;
                model.InfoAdminEmail    = useremail.Text.ToString().Trim();
                model.InfoAdminSector   = "";

                if (bll.Insert(model) == 1)
                {
                    Alert.ShowInTop("添加成功~");

                    PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
                }
            }
            else
            {
                Alert.ShowInTop("用户存在,请重新填写");
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string id = Request["id"].ToString();
                model = bll.getAdminByID(id);//直接绑定

                //

                name.Text    = model.InfoAdminAccount;
                reaname.Text = model.InfoAdminName;
                pwd.Text     = model.InfoAdminPwd;
                phone.Text   = model.InfoAdminTel;
                //绑定类别下拉菜单
                DropDownList1.SelectedIndex = model.InfoAdminCategory;

                useremail.Text = model.InfoAdminEmail;
            }
        }