public Notify Delete(long id) { int rowAffected = 0; try { rowAffected = _objDALProduct.DeleteProduct(id); if (rowAffected > 0) { objNotify.RowEffected = 1; objNotify.NotifyMessage = "Record Deleted Successfully"; } else { objNotify.RowEffected = 0; objNotify.NotifyMessage = "Product Not Deleted"; } return(objNotify); } catch (Exception ex) { if (ex is DALException) { throw ex; } else { ExceptionLogger.WriteExceptionInDB(ex, ExceptionLevel.DAL, ExceptionType.Error); } throw new BALException(ex.Message.ToString()); } }
public bool DeleteProduct(Product product) { return(productDAL.DeleteProduct(product)); }