示例#1
0
        public ActionResult Delete(int id)
        {
            EFDal dal = new EFDal();

            dal.DeleteById(id);
            return(RedirectToAction("DisplayAllEmps"));
        }
示例#2
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            var Ecode = int.Parse(txtEcode.Text);

            var dal = new EFDal();

            dal.DeleteById(Ecode);
            MessageBox.Show("record deleted");
            dgv.DataSource = dal.GetAllEmps();
        }
示例#3
0
        public void DeleteEmp(int ecode)
        {
            EFDal dal = new EFDal();

            dal.DeleteById(ecode);
        }