public bool DeleteAccountTest([PexAssumeUnderTest] AccountBLL target, string idd) { bool result = target.DeleteAccount(idd); return(result); // TODO: add assertions to method AccountBLLTest.DeleteAccountTest(AccountBLL, String) }
public ActionResult AccountDelete(string Id) { Account loginAccount = membership.GetUser(); //未登录 if (loginAccount == null) { return(RedirectToAction("Index", "Login", null)); } accountBll.DeleteAccount(Guid.Parse(Id)); return(RedirectToAction("AccountList")); }
private void btnDel_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { id = gvAccount.GetRowCellValue(index, this.ID).ToString(); AccountBLL ad = new AccountBLL(); DicBLL dc = new DicBLL(); if (MessageBox.Show("Bạn có muốn xóa không?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { if (ad.DeleteAccount(id) == true) { MessageBox.Show(dc.successAccountMessage("delete")); } else { MessageBox.Show(dc.errorAccountMessage("else")); } loadData(); } }