Exemple #1
0
        public bool AddBank(Bank bank)
        {
            try
            {
                bank.State = ObjectState.Added;
                _crudOperation.AddOperation(bank);
                return true;

            }
            catch (Exception ex)
            {
                var rr = ex.Message;
                return false;
            }
        }
Exemple #2
0
        public bool UpdateBank(Bank bank)
        {
            try
            {
                var dbObj = _crudOperation.GetSingleObject(bank.Id);
                dbObj.AccountName = bank.AccountName;
                dbObj.AccountNumber = bank.AccountNumber;
                dbObj.BankName = bank.BankName;
                dbObj.CurrencyId = bank.CurrencyId;
                dbObj.State = ObjectState.Modified;
                _crudOperation.UpdateOperation(dbObj);

                return true;

            }
            catch (Exception ex)
            {
                var rr = ex.Message;
                return false;
            }
        }