예제 #1
0
        private void BtnDelClick(object sender, EventArgs e)
        {
            if (idtb.Text == string.Empty)
            {
                MessageBox.Show("请输入课程编号!");
                return;
            }
            string cmd = $"delete from courses where cid='{idtb.Text}';";

            DBO.Delete(cmd);
            MessageBox.Show("删除成功!");
        }
예제 #2
0
        private void BtnDelClick(object sender, EventArgs e)
        {
            if (tbxs.Text == string.Empty)
            {
                MessageBox.Show("请输入学生学号!");
                return;
            }
            if (tbxc.Text == string.Empty)
            {
                MessageBox.Show("请输入课程编号!");
                return;
            }
            string cmd = $"delete from register where sid='{tbxs.Text}' and cid='{tbxc.Text}';";

            DBO.Delete(cmd);
            MessageBox.Show("删除成功");
        }