Example #1
0
        public void TestDelete()
        {
            List <Guid> list = new List <Guid>();

            list.Add(Guid.Parse("736d8731-8b33-4326-b593-22f803ca6cd0"));
            list.Add(Guid.Parse("557e6ac5-2b26-46d4-a821-fd86b2e2c6d1"));
            us.Delete(list);
        }
Example #2
0
        public JsonResult DeleteJson(List <int> ids)
        {
            int      _total = ids.Count();
            Response _resp  = new DAL.Response();

            _resp = userManage.Delete(ids);
            if (_resp.Code == 1)
            {
                _resp.Code    = 2;
                _resp.Message = "共提交删除" + _total + "位用户,实际删除" + _resp.Data + "位用户。";
            }
            return(Json(_resp));
        }
Example #3
0
 private void tsbtnDelete_Click(object sender, EventArgs e)
 {
     if (dgvShowList.SelectedRows.Count == 0)
     {
         MessageBox.Show("请选择要删除的选中项!", "删除提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     else
     {
         if (MessageBox.Show("确定删除该项?", "删除提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
         {
             int userId = Convert.ToInt32(dgvShowList.SelectedRows[0].Cells["id"].Value.ToString());
             if (userM.Delete(userId) > 0)
             {
                 MessageBox.Show("删除成功", "删除提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 showAllInfo();
             }
         }
     }
 }
Example #4
0
 public ActionResult Delete(int id)
 {
     return(Json(UserManage.Delete(id)));
 }
Example #5
0
 public IActionResult delAccount(string account, string password)
 {
     return(Ok(userManage.Delete(account, password)));
 }