示例#1
0
    protected void Adduser_WL(int SiteID, string Mail, string FullName, int ListID, string sendurl)
    {
        bool               tmp;
        bool               AddUsersToListResult;
        SendMsgResults     _res       = new SendMsgResults();
        SendMsgService     _svc       = new SendMsgService();
        List <SendMsgUser> _UsersList = new List <SendMsgUser>();
        List <SendMsgList> _mailList  = new List <SendMsgList>();

        //_mailList.Add(new SendMsgList() { ExistingListID = ListID, ExistingListIDSpecified = true });
        _mailList.Add(new SendMsgList()
        {
            ExistingListID = 55, ExistingListIDSpecified = true
        });
        _UsersList.Add(new SendMsgUser()
        {
            EmailAddress = Mail, UserSystemFields = new SendMsgFields[4] {
                new SendMsgFields()
                {
                    Key = "שם", Value = FullName
                }, new SendMsgFields()
                {
                    Key = "קישור הרשמה", Value = sendurl
                }, new SendMsgFields()
                {
                    Key = "נרשם דרך מייל", Value = "1"
                }, new SendMsgFields()
                {
                    Key = "מהיכן נרשם", Value = FromToIsender
                }
            }
        });

        _svc.AddUsersToLists(SiteID, true, "IL110077", _UsersList.ToArray(), _mailList.ToArray(), out AddUsersToListResult, out tmp, out _res);
    }
示例#2
0
    protected void Adduser_WL(int SiteID, string Mail, string FullName, int ListID)
    {
        bool               tmp;
        bool               AddUsersToListResult;
        SendMsgResults     _res       = new SendMsgResults();
        SendMsgService     _svc       = new SendMsgService();
        List <SendMsgUser> _UsersList = new List <SendMsgUser>();
        List <SendMsgList> _mailList  = new List <SendMsgList>();

        _mailList.Add(new SendMsgList()
        {
            ExistingListID = ListID, ExistingListIDSpecified = true
        });
        _UsersList.Add(new SendMsgUser()
        {
            EmailAddress = Mail, UserSystemFields = new SendMsgFields[1] {
                new SendMsgFields()
                {
                    Key = "שם", Value = FullName
                }
            }
        });

        _svc.AddUsersToLists(SiteID, true, "IL110077", _UsersList.ToArray(), _mailList.ToArray(), out AddUsersToListResult, out tmp, out _res);
    }
示例#3
0
    protected void Adduser_WL(int SiteID, string Mail, string FullName)
    {
        string groupid = "";

        if (Request.Cookies["JoinUsGroup"] != null)
        {
            groupid = Request.Cookies["JoinUsGroup"].Value;
        }

        int groupidInt;

        if (!int.TryParse(groupid, out groupidInt))
        {
            groupidInt = 19;
        }
        bool           tmp  = false;
        bool           tmp2 = false;
        SendMsgResults _res = new SendMsgResults();
        SendMsgService _svc = new SendMsgService();

        List <SendMsgList> _mailList = new List <SendMsgList>();

        List <SendMsgUser> _UsersList = new List <SendMsgUser>();

        _UsersList.Add(new SendMsgUser()
        {
            EmailAddress = Mail, UserSystemFields = new SendMsgFields[2] {
                new SendMsgFields()
                {
                    Key = "שם", Value = FullName
                }, new SendMsgFields()
                {
                    Key = "נרשם דרך פייסבוק", Value = "1"
                }
            }
        });
        _mailList.Add(new SendMsgList()
        {
            ExistingListID = groupidInt, ExistingListIDSpecified = true
        });
        _svc.AddUsersToLists(SiteID, true, "IL110077", _UsersList.ToArray(), _mailList.ToArray(), out tmp2, out tmp, out _res);

        if (_res.ResultMessage.Contains("Failed:1"))
        {
            using (MySqlConnection conn = new MySqlConnection(cmstrDefualts.ConnStr))
            {
                conn.Open();
                LoginUser.NotAddedToISend(Mail, conn);
            }
        }
    }
示例#4
0
    protected void Adduser_WL(int SiteID, string Mail, string FullName, int ListID, string sendurl)
    {
        bool               tmp;
        bool               AddUsersToListResult;
        SendMsgResults     _res       = new SendMsgResults();
        SendMsgService     _svc       = new SendMsgService();
        List <SendMsgUser> _UsersList = new List <SendMsgUser>();
        List <SendMsgList> _mailList  = new List <SendMsgList>();

        _mailList.Add(new SendMsgList()
        {
            ExistingListID = ListID, ExistingListIDSpecified = true
        });
        //_mailList.Add(new SendMsgList() { ExistingListID = 55, ExistingListIDSpecified = true });
        _UsersList.Add(new SendMsgUser()
        {
            EmailAddress = Mail
        });

        _svc.AddUsersToLists(SiteID, true, "IL110077", _UsersList.ToArray(), _mailList.ToArray(), out AddUsersToListResult, out tmp, out _res);
    }