private void BindBll() { _IPosition = BllInstance.PositionBllInstance; _IDepartment = BllInstance.DepartmentBllInstance; _IAccount = BllInstance.AccountBllInstance; _IBulletin = BllInstance.BulletinBllInstance; }
public static void SendEmailForEmployees(int bulletinID, List <Account> employeeRight, IAccountBll account) { try { IBulletinBll bulletinBll = BllInstance.BulletinBllInstance; foreach (Account tempEmployee in employeeRight) { Account employee = account.GetAccountById(tempEmployee.Id); if (employee.AccountType == VisibleType.None || !employee.IsAcceptEmail) { continue; } string to = employee.Email1; bulletinBll.SendEmailForBulletin(bulletinID, to, null); if (!string.IsNullOrEmpty(employee.Email2)) { to = employee.Email2; bulletinBll.SendEmailForBulletin(bulletinID, to, null); } } } catch (Exception ex) { try { StreamWriter sw = new StreamWriter(@"c:\faildMails.txt", true); sw.WriteLine(ex.Message); if (ex.InnerException != null) { sw.WriteLine(ex.InnerException.Message); } sw.Flush(); sw.Close(); } catch { } } }
public ListBulletinForwardPresenter(IListBulletinForwardView view, Account loginUser) : base(loginUser) { _View = view; _BulletinBll = BllInstance.BulletinBllInstance; }