//--------------------------------------------------------------------------- public static void UpdateMailListEmail(string oldEmail, UsersDataEntity usersDataObject) { MailListUsersEntity mlUser = MailListUsersFactory.GetObject(usersDataObject.ModuleTypeID, oldEmail); if (mlUser != null) { if (!string.IsNullOrEmpty(usersDataObject.Email)) { mlUser.Email = usersDataObject.Email; MailListUsersFactory.Update(mlUser); } else { MailListUsersFactory.Delete(mlUser.UserID); } } else { UsersDataFactory.RegisterInMailList(usersDataObject); } }
//--------------------------------------------------------------------------- public static void UpdateMailListEmail(string oldEmail, MessagesEntity msg) { MailListUsersEntity mlUser = MailListUsersFactory.GetObject(msg.ModuleTypeID, oldEmail); if (mlUser != null) { if (!string.IsNullOrEmpty(msg.EMail)) { mlUser.Email = msg.EMail; MailListUsersFactory.Update(mlUser); } else { MailListUsersFactory.Delete(mlUser.UserID); } } else { MessagesFactory.RegisterInMailList(msg); } }