Пример #1
0
 public DataTable GetAll()
 {
     try
     {
         LenderBankDAL lenderBankDAL = new LenderBankDAL();
         return(lenderBankDAL.GetAll());
     }
     catch (Exception)
     {
         throw;
     }
 }
Пример #2
0
 public DataTable GetById(int id)
 {
     try
     {
         LenderBankDAL lenderBankDAL = new LenderBankDAL();
         return(lenderBankDAL.GetById(id));
     }
     catch (Exception)
     {
         throw;
     }
 }
Пример #3
0
 public bool Delete(LenderBanks lenderBank)
 {
     try
     {
         LenderBankDAL lenderBankDAL = new LenderBankDAL();
         return(lenderBankDAL.Delete(lenderBank));
     }
     catch (Exception)
     {
         throw;
     }
 }
Пример #4
0
        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;
            }
        }