public List <Account> GetAccountByNameString(string sendAccount, out string errorname) { IAccountDal IAccountDal = DalInstance.AccountDalInstance; errorname = string.Empty; List <Account> retaccounts = new List <Account>(); sendAccount = sendAccount.Replace(" ", ""); sendAccount = sendAccount.Replace(" ", ""); sendAccount = sendAccount.Replace('(', '('); sendAccount = sendAccount.Replace(')', ')'); sendAccount = sendAccount.Replace(';', ';'); string[] accounts = sendAccount.Split(';'); for (int i = 0; i < accounts.Length; i++) { accounts[i] = accounts[i].Trim(); Account account = IAccountDal.GetAccountByName(accounts[i]); if (account == null) { errorname += string.IsNullOrEmpty(errorname) ? accounts[i] : "," + accounts[i]; } else { if (Model.Utility.Tools.FindAccountById(retaccounts, account.Id) == null) { account = IAccountDal.GetAccountById(account.Id); retaccounts.Add(account); } } } return(retaccounts); }
protected override void ExcuteSelf() { _AccountGroup.AccountList = new List <Account>(); IAccountDal IAccountDal = DalInstance.AccountDalInstance; foreach (string s in _AccountMember.Split(';')) { Account account = IAccountDal.GetAccountByName(s); if (account != null) { _AccountGroup.AccountList.Add(account); } } DalInstance.AccountGroupDalInstance.Update(_AccountGroup); }
public Account GetAccountByName(string name) { AccountDto accountDto = _accountDal.GetAccountByName(name); return(accountDto == null ? null : new Account(accountDto)); }
public string GetEmployeeMailByName(string empName) { return(_IAccountDal.GetAccountByName(empName).Email1); }