public static bool DeleteAddressDisBL(string deleteAddressID) { bool addressDisDeleted = false; try { if (deleteAddressID != string.Empty) { AddressDisDAL addressDisDAL = new AddressDisDAL(); addressDisDeleted = addressDisDAL.DeleteAddressDisDAL(deleteAddressID); } else { throw new InventoryException("Invalid Address ID"); } } catch (Exception ex) { throw new InventoryException(ex.Message); } return(addressDisDeleted); }
public static bool DeleteAddressDisBL(int deleteAddressID) { bool addressDisDeleted = false; try { if (deleteAddressID > 0) { AddressDisDAL addressDisDAL = new AddressDisDAL(); addressDisDeleted = addressDisDAL.DeleteAddressDisDAL(deleteAddressID); } else { throw new InventoryException("Invalid Address ID"); } } catch (InventoryException) { throw; } catch (Exception ex) { throw ex; } return(addressDisDeleted); }
public static bool AddAddressDisBL(AddressDis newAddressDis) { bool addressDisAdded = false; try { if (ValidateAddressDis(newAddressDis)) { AddressDisDAL addressDisDAL = new AddressDisDAL(); addressDisAdded = addressDisDAL.AddAddressDisDAL(newAddressDis); } } catch (Exception ex) { throw new InventoryException(ex.Message); } return(addressDisAdded); }
public static bool UpdateAddressDisBL(AddressDis updateAddressDis) { bool addressDisUpdated = false; try { if (ValidateAddressDis(updateAddressDis)) { AddressDisDAL addressDisDAL = new AddressDisDAL(); addressDisUpdated = addressDisDAL.UpdateAddressDisDAL(updateAddressDis); } } catch (InventoryException) { throw; } catch (Exception ex) { throw ex; } return(addressDisUpdated); }