예제 #1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            ProgramModel objStudent = new ProgramModel();

            objStudent.ProgramCode = txtcode.Text;

            objStudCore.deleteProgram(objStudent);
            loadData();
            //reset feilds
            txtcode.Text = "";
            txtDes.Text  = "";
            txtName.Text = "";
        }
예제 #2
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            DialogResult result = MessageBox.Show("Are you sure you want to Delete?", "Confirm Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

            if (result.ToString().Equals("Yes"))
            {
                ProgramModel objStudent = new ProgramModel();

                objStudent.ProgramCode = txtcode.Text;

                objStudCore.deleteProgram(objStudent);
                loadData();
                //reset feilds
                txtcode.Text = "";
                txtDes.Text  = "";
                txtName.Text = "";
            }
        }