Ejemplo n.º 1
0
 /// <summary>
 /// 删除按钮
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btn_delete_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("您确定要删除此管理员?", "提示", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         mb.Delete((int)com_manager_id.SelectedValue);
         ReSet();
         if ((int)com_manager_id.SelectedValue == LoginInfo.manager_info.Id)     //如果删除的管理员ID和登陆的管理员ID一致,则退出登陆
         {
             Application.Restart();
         }
     }
 }
Ejemplo n.º 2
0
        protected void LinkButton1_OnClick(object sender, EventArgs e)
        {
            LinkButton link   = (LinkButton)sender;
            var        mno    = link.CommandArgument.ToString();
            int        number = bllman.Delete(mno);

            if (number > 0)
            {
                Response.Write("<script>alert('删除成功');window.location.href='ManagerList.aspx';</script>");
            }
            else
            {
                Response.Write("<script>alter('删除失败');</script>");
            }
        }