public ActionResult Delete(int id) { EFDal dal = new EFDal(); dal.DeleteById(id); return(RedirectToAction("DisplayAllEmps")); }
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(); }
public void DeleteEmp(int ecode) { EFDal dal = new EFDal(); dal.DeleteById(ecode); }