public DataTable GetAll() { try { LenderBankDAL lenderBankDAL = new LenderBankDAL(); return(lenderBankDAL.GetAll()); } catch (Exception) { throw; } }
public DataTable GetById(int id) { try { LenderBankDAL lenderBankDAL = new LenderBankDAL(); return(lenderBankDAL.GetById(id)); } catch (Exception) { throw; } }
public bool Delete(LenderBanks lenderBank) { try { LenderBankDAL lenderBankDAL = new LenderBankDAL(); return(lenderBankDAL.Delete(lenderBank)); } catch (Exception) { throw; } }
public bool Save(LenderBanks lenderBank) { try { LenderBankDAL lenderBankDAL = new LenderBankDAL(); if (IsBankNameExist(lenderBank)) { throw new Exception("Bank name already exist."); } else { return(lenderBankDAL.Save(lenderBank)); } } catch (Exception) { throw; } }