Exemplo n.º 1
0
        public static bool DeleteReturnBL(int deleteReturnID)
        {
            bool returnDeleted = false;

            try
            {
                if (deleteReturnID > 0)
                {
                    Return_DAL returnDAL = new Return_DAL();
                    returnDeleted = returnDAL.DeleteReturnDAL(deleteReturnID);
                }
                else
                {
                    throw new GOException("Invalid Return ID");
                }
            }
            catch (GOException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(returnDeleted);
        }
Exemplo n.º 2
0
        public static Return SearchReturnBL(int searchReturnID)
        {
            Return searchReturn = null;

            try
            {
                Return_DAL returnDAL = new Return_DAL();
                searchReturn = returnDAL.SearchReturnDAL(searchReturnID);
            }
            catch (GOException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(searchReturn);
        }
Exemplo n.º 3
0
        public static List <Return> GetAllReturnsBL()
        {
            List <Return> returnList = null;

            try
            {
                Return_DAL returnDAL = new Return_DAL();
                returnList = returnDAL.GetAllReturnsDAL();
            }
            catch (GOException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(returnList);
        }
Exemplo n.º 4
0
        public static bool UpdateReturnBL(Return updateReturn)
        {
            bool returnUpdated = false;

            try
            {
                if (ValidateReturn(updateReturn))
                {
                    Return_DAL returnDAL = new Return_DAL();
                    returnUpdated = returnDAL.UpdateReturnDAL(updateReturn);
                }
            }
            catch (GOException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(returnUpdated);
        }