public IResponse CheckCurrencyCode(Transaction transaction) { string senderCurrencyCode = _accountDal.Get(a => a.Id == transaction.SenderAccountNumber).CurrencyCode; var receiverCurrencyCode = _accountDal.Get(b => b.Id == transaction.ReceiverAccountNumber).CurrencyCode; if (senderCurrencyCode == receiverCurrencyCode) { return(new ResponseModel(transaction.Id, false)); } return(new ResponseModel(transaction.Id, true, Messages.CurrencyCodeError)); }
public Account Get(string username) { if (string.IsNullOrEmpty(username)) { return(null); } return(accountDal.Get(x => x.Username == username)); }
public bool Login(string username, string password) { Account account = accountDal.Get(x => x.Username == username); if (account == null) { return(false); } if (account.Password == password) { return(true); } else { return(false); } }
public bool Add(string username, Product product) { Account account = accountDal.Get(x => x.Username == username); if (product.CategoryId == 0 || product.Price == null || string.IsNullOrEmpty(product.Name) || string.IsNullOrEmpty(product.ImagePath) || product.LongLat == null || product.PublishDate == null) { return(false); } product.AccountId = account.Id; productDal.Add(product); return(true); }
Kullanici IAccountService.Login(Login login) { QueryParam[] parametreler = new QueryParam[] { new QueryParam { ParamName = "UserName", ParamValue = login.UserName }, new QueryParam { ParamName = "Password", ParamValue = login.Password } }; var result = _accountDal.Get(NorthwindApp.StoredProcedures.Account.Login, parametreler); NorthwindApp.Entities.DTO.Kullanici kullaniciDTO = new Kullanici(); if (result != null) { SimpleMapper.PropertyMap(result, kullaniciDTO); kullaniciDTO.KullaniciId = Encryptor.Encrypt(kullaniciDTO.KullaniciId); } return(kullaniciDTO); }
public Account GetByUserNameAndPassword(string userName, string password) { return(_accountDal.Get(x => x.UserName == userName & x.Password == password)); }
Account IAccountService.GetAccountByNumber(string accountNumber) { return(_accountDal.Get(x => x.AccountNumber == accountNumber)); }
public Account Get(int accountId) { return(_accountDal.Get(accountId)); }
public IDataResult <Account> GetById(int id) { return(new SuccessDataResult <Account>(_accountDal.Get(a => a.AccountId == id), Messages.AccountListed)); }
public ResponseDataModel <Account> Get(int id) { var result = _accountDal.Get(b => b.Id == id); return(new ResponseDataModel <Account>(result, false)); }
public Account Get(Account entity) { return(_accountDal.Get(p => p.Id == entity.Id)); }
public Account GetWithHgsNo(string HGS) { return(accountDal.Get(x => x.HgsNo == HGS)); }
public Account GetAccount(int id) { return(_accountDal.Get(x => x.AccountID == id)); }
/// <summary> /// Gets the first item that fufills the filter. /// </summary> /// <param name="filter">The filter.</param> /// <returns></returns> public IAccountDataModel Get(Func <IAccountDataModel, bool> filter, IModelContext context = null) { return(dal.Get(filter, context)); }