public static bool DeleteAddressSupBL(int deleteAddressID) { bool addressSupDeleted = false; try { if (deleteAddressID > 0) { AddressSupDAL addressSupDAL = new AddressSupDAL(); addressSupDeleted = addressSupDAL.DeleteAddressSupDAL(deleteAddressID); } else { throw new InventoryException("Invalid Address ID"); } } catch (InventoryException) { throw; } catch (Exception ex) { throw ex; } return(addressSupDeleted); }
public static bool DeleteAddressSupBL(string deleteAddressID) { bool addressSupDeleted = false; try { if (deleteAddressID != string.Empty) { AddressSupDAL addressSupDAL = new AddressSupDAL(); addressSupDeleted = addressSupDAL.DeleteAddressSupDAL(deleteAddressID); } else { throw new InventoryException("Invalid Address ID"); } } catch (Exception ex) { throw new InventoryException(ex.Message); } return(addressSupDeleted); }
public static AddressSup SearchAddressSupBL(String AddressID) { AddressSup searchAddressSup = null; try { AddressSupDAL addressSupDAL = new AddressSupDAL(); searchAddressSup = addressSupDAL.SearchAddressSupDAL(AddressID); } catch (Exception ex) { throw ex; } return(searchAddressSup); }
//Validating the address public static bool AddAddressSupBL(AddressSup newAddressSup) { bool addressSupAdded = false; try { if (ValidateAddressSup(newAddressSup)) { AddressSupDAL addressSupDAL = new AddressSupDAL(); addressSupAdded = addressSupDAL.AddAddressSupDAL(newAddressSup); } } catch (Exception ex) { throw new InventoryException(ex.Message); } return(addressSupAdded); }
public static bool UpdateAddressSupBL(AddressSup updateAddressSup) { bool addressSupUpdated = false; try { if (ValidateAddressSup(updateAddressSup)) { AddressSupDAL addressSupDAL = new AddressSupDAL(); addressSupUpdated = addressSupDAL.UpdateAddressSupDAL(updateAddressSup); } } catch (InventoryException) { throw; } catch (Exception ex) { throw ex; } return(addressSupUpdated); }