示例#1
0
        /// <summary>
        /// 点击删除按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "")
            {
                MessageBox.Show("请填写要删除的ID"); return;
            }
            Blog model = new Blog();

            model.Id = Convert.ToInt32(textBox1.Text);
            BlogDAL.Drop(model, "id");
            ShowDataGird();
        }