/// <summary> /// delete product details /// </summary> public ActionResult Delete(int id) { try { string successMsg = TblProduct.Delete(id); if (successMsg == "") { return(RedirectToAction("Index")); } else { return(Json(new object[] { false, successMsg }, JsonRequestBehavior.AllowGet)); } } catch (Exception e) { return(Json(new object[] { false, e.Message })); } }
public void Delete(int id) { string successMsg = TblProduct.Delete(id); Assert.AreEqual(successMsg, ""); }