示例#1
0
        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);
            }
        }
示例#2
0
 internal void Delete(BE.User user)
 {
     _storage.Delete(user);
 }
示例#3
0
文件: User.cs 项目: ZhaoQi99/EasyLife
 /// <summary>
 /// 删除一个用户
 /// </summary>
 public void Delete(string username)
 {
     dal.Delete(username);
 }
示例#4
0
 public bool Delete(long id)
 {
     return(dal.Delete(id));
 }