/// <summary>
 ///Invokes Deserialize method of DAL.
 /// </summary>
 public void Deserialize()
 {
     try
     {
         RetailerDAL.Deserialize();
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #2
0
        public static RetailerUser SearchRetailerBL(int searchRetailerID)
        {
            RetailerUser searchRetailer = null;

            try
            {
                RetailerDAL retailerDAL = new RetailerDAL();
                searchRetailer = retailerDAL.SearchRetailerDAL(searchRetailerID);
            }
            catch (GOException ex)
            {
                throw ex;
            }
            return(searchRetailer);
        }
Example #3
0
        public static bool UpdateRetailerBL(RetailerUser updateRetailer)
        {
            bool retailerUpdated = false;

            try
            {
                if (ValidateRetailer(updateRetailer))
                {
                    RetailerDAL retailerDAL = new RetailerDAL();
                    retailerUpdated = retailerDAL.UpdateRetailerDAL(updateRetailer);
                }
            }
            catch (GOException)
            {
                throw;
            }
            return(retailerUpdated);
        }
Example #4
0
        public static bool AddRetailerBL(RetailerUser newRetailer)
        {
            bool retailerAdded = false;

            try
            {
                if (ValidateRetailer(newRetailer))
                {
                    RetailerDAL guestDAL = new RetailerDAL();
                    retailerAdded = guestDAL.AddRetailerDAL(newRetailer);
                }
            }
            catch (GOException)
            {
                throw;
            }
            return(retailerAdded);
        }
Example #5
0
        public static List <RetailerUser> GetAllRetailersBL()
        {
            List <RetailerUser> retailerList = null;

            try
            {
                RetailerDAL retailerDAL = new RetailerDAL();
                retailerList = retailerDAL.GetAllRetailersDAL();
            }
            catch (GOException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(retailerList);
        }
Example #6
0
        public static bool DeleteRetailerBL(int deleteRetailerID)
        {
            bool retailerDeleted = false;

            try
            {
                if (deleteRetailerID > 0)
                {
                    RetailerDAL retailerDAL = new RetailerDAL();
                    retailerDeleted = retailerDAL.DeleteRetailerDAL(deleteRetailerID);
                }
                else
                {
                    throw new GOException("Invalid Retailer ID");
                }
            }
            catch (GOException)
            {
                throw;
            }
            return(retailerDeleted);
        }
 public RetailerProcessor()
 {
     retailerDAL = new RetailerDAL();
 }