public ActionResult Admin_Customer() { CustomerDB tool = new CustomerDB(); DataTable dtCus = tool.GetAllCus(); return(View(dtCus)); }
public ActionResult Staff_Customer() { DataTable dtCus; try { CustomerDB tool = new CustomerDB(); dtCus = tool.GetAllCus(); } catch (Exception ex) { ModelState.AddModelError("", ex.Message); return(RedirectToAction("Error", "Error")); } return(View(dtCus)); }