예제 #1
0
        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());
            }
        }
예제 #2
0
 public bool DeleteProduct(Product product)
 {
     return(productDAL.DeleteProduct(product));
 }