예제 #1
0
        protected void Button1_Click1(object sender, EventArgs e)
        {
            administatorsModel administatorsModel = new administatorsModel();

            administatorsModel.midName = username.Value;
            if (newpassword2.Value == userpassword.Value)
            {
                administatorsModel.mpassword = userpassword.Value;
            }
            else
            {
                JSHelper.Alert(this, "两次密码输入不一致");
            }
            administatorsModel.mphone  = txtphone.Value;
            administatorsModel.mailbox = email.Value;
            Admin_BLL.administratorBLL administratorBLL = new Admin_BLL.administratorBLL();
            int count = administratorBLL.insert(administatorsModel);

            if (count > 0)
            {
                JSHelper.Alert(this, "添加成功");
                RepeaterList();
            }
            else
            {
                JSHelper.Alert(this, "添加失败");
            }
        }
예제 #2
0
        public void RepeaterList()
        {
            string Name    = txtName.Value;
            string Addtime = start.Value;

            Admin_BLL.administratorBLL administratorBLL = new Admin_BLL.administratorBLL();
            Repeatertable.DataSource = administratorBLL.administators(Name, Addtime);
            Repeatertable.DataBind();
        }