Пример #1
0
        protected void btnSave_OnClick(object sender, EventArgs e)
        {
            manager newM = new manager();

            newM.mno      = mno.Value;
            newM.mname    = mname.Value;
            newM.sex      = sex.Value;
            newM.birthday = DateTime.Parse(birthday.Value);
            newM.stno     = stno.SelectedValue;
            int number = managerBLL.Update(newM);

            if (number > 0)
            {
                Response.Write("<script>alert('修改成功');window.location.href='ManagerList.aspx';</script>");
            }
            else
            {
                Response.Write("<script>alter('修改失败');</script>");
            }
        }
Пример #2
0
        protected void btnEdit_Click(object sender, EventArgs e)
        {
            var man = new manager();

            man.mno      = txtmno.Value;
            man.mname    = mname.Value;
            man.sex      = sex.Value;
            man.stno     = stno.Value;
            man.birthday = Convert.ToDateTime(birthday.Value);
            int number = bllman.Update(man);

            if (number > 0)
            {
                Response.Write("<script>alert('修改成功');window.location.href='ManagerList.aspx';</script>");
            }
            else
            {
                Response.Write("<script>alter('修改失败');</script>");
            }
        }
Пример #3
0
 /// <summary>
 /// 更改按钮
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btn_reset_Click(object sender, EventArgs e)
 {
     if (text_manager_name.Text != "" && text_manager_passowrd.Text != "" && text_manager_username.Text != "" && lab_prompt.Text != "该用户名已被使用")
     {
         mm.Manager_name     = text_manager_name.Text;
         mm.Manager_password = text_manager_passowrd.Text;
         mm.Manager_username = text_manager_username.Text;
         mm.Id = (int)com_manager_id.SelectedValue;
         int count = mb.Update(mm);
         if (count != 0)
         {
             MessageBox.Show("修改成功!");
             ReSet();
         }
         else
         {
             MessageBox.Show("修改失败!");
         }
     }
     else
     {
         MessageBox.Show("不能有空值!", "提示");
     }
 }