private void btnDeleteAccount_Click(object sender, EventArgs e) { DialogResult dr = MessageBox.Show("R u Sure?", "Delete confermation", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question); if (dr == DialogResult.No || dr == DialogResult.Cancel) { return; } DAL.User user = new DAL.User(); DAL.Info info = new DAL.Info(); int Id = Convert.ToInt32(dataGridView1.SelectedRows[0].Cells["id"].Value); user.Id = Id; info.Id = Id; if (info.Delete() && user.Delete()) { Show_Gridview(); } else { MessageBox.Show(user.Error + info.Error); } }
internal void Delete(BE.User user) { _storage.Delete(user); }
/// <summary> /// 删除一个用户 /// </summary> public void Delete(string username) { dal.Delete(username); }
public bool Delete(long id) { return(dal.Delete(id)); }