示例#1
0
        private void btn_Xoa_Click(object sender, EventArgs e)
        {
            string user = Properties.Settings.Default.useName;
            string pass = Properties.Settings.Default.passWord;

            if (user.Equals("Empty") && pass.Equals("Empty"))
            {
                Login frm = new Login();
                frm.ShowDialog();
            }
            else
            {
                if (!txt_id.Text.Equals(""))
                {
                    if (tdbul.Delete(Convert.ToInt32(txt_id.Text)) == 1)
                    {
                        MessageBox.Show("Xoá thành công");
                    }
                    else
                    {
                        MessageBox.Show("Xoá thất bại");
                    }
                }
                else
                {
                    MessageBox.Show("Chưa chọn tiêu đề cần xoá");
                }
            }
        }
示例#2
0
 private void btn_Xoa_Click(object sender, EventArgs e)
 {
     if (!txt_id.Text.Equals(""))
     {
         if (tdbul.Delete(Convert.ToInt32(txt_id.Text)) == 1)
         {
             MessageBox.Show("Xoa Thanh Cong");
         }
         else
         {
             MessageBox.Show("Xoa That Bai");
         }
     }
     else
     {
         MessageBox.Show("Chua chon tieu de can xoa");
     }
 }