public ActionResult Index() { Customer customer = Session["Customer"] as Customer; List <Note> notes = noteBLL.GetCustomerNotes(customer.CustomerID); return(View(notes)); }
public ActionResult Delete(int Id) { List <Lead> leads = leadBLL.GetCustomerLeads(Id); List <Note> notes = noteBLL.GetCustomerNotes(Id); foreach (Lead item in leads) { leadBLL.Delete(item.LeadID); } foreach (Note item in notes) { noteBLL.Delete(item.NoteID); } customerBLL.Delete(Id); return(RedirectToAction("Index")); }