示例#1
0
 private void BindBll()
 {
     _IPosition   = BllInstance.PositionBllInstance;
     _IDepartment = BllInstance.DepartmentBllInstance;
     _IAccount    = BllInstance.AccountBllInstance;
     _IBulletin   = BllInstance.BulletinBllInstance;
 }
示例#2
0
        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
                {
                }
            }
        }
示例#3
0
 public ListBulletinForwardPresenter(IListBulletinForwardView view, Account loginUser)
     : base(loginUser)
 {
     _View        = view;
     _BulletinBll = BllInstance.BulletinBllInstance;
 }