protected void radSendTestMessage_Click(object sender, EventArgs e)
    {
        int currentUserID = Convert.ToInt32(Context.Items["UserID"]);

        qPtl_User        user    = new qPtl_User(Convert.ToInt32(Request.QueryString["userID"]));
        qPtl_UserProfile profile = new qPtl_UserProfile(Convert.ToInt32(Request.QueryString["userID"]));

        string userMobile    = string.Empty;
        string smsMessage    = string.Empty;
        string smsMessageURI = string.Empty;

        userMobile = txtMobileNumber.Text;

        // create object
        string smsMode   = System.Configuration.ConfigurationManager.AppSettings["SMSMode"];
        Guid   authToken = new Guid(System.Configuration.ConfigurationManager.AppSettings["SMSLicenseKey"]);

        Quartz.Communication.qCom_SMSMessageLog sendLong = new Quartz.Communication.qCom_SMSMessageLog();

        // send message + add log
        if (smsMode == "did")
        {
            // use custom number + key
            string did = System.Configuration.ConfigurationManager.AppSettings["SMSDid"];
            Quartz.Communication.CDYNE.SMSResponse[] response = Quartz.Communication.qCom_SMSMessage.SendSMSAdvancedSendMessage(userMobile, smsMessage, authToken, did, 0, false);
            sendLong.Insert(1, DateTime.Now, user.UserID, 0, smsMessageURI, userMobile, did, smsMessage, "sent", Convert.ToString(response[0].MessageID), 0, 0, "", false, false, 0, false, false, 0, string.Empty);
        }

        lblMessage.Text += "Finished sending text message to " + userMobile + "<br>";

        lblMessage.Visible = true;
    }
    protected void radSendTestMessage_Click(object sender, EventArgs e)
    {
        int currentUserID = Convert.ToInt32(Context.Items["UserID"]);

        qPtl_User user = new qPtl_User(Convert.ToInt32(Request.QueryString["userID"]));
        qPtl_UserProfile profile = new qPtl_UserProfile(Convert.ToInt32(Request.QueryString["userID"]));

        string userMobile = string.Empty;
        string smsMessage = string.Empty;
        string smsMessageURI = string.Empty;

        userMobile = txtMobileNumber.Text;

        // create object
        string smsMode = System.Configuration.ConfigurationManager.AppSettings["SMSMode"];
        Guid authToken = new Guid(System.Configuration.ConfigurationManager.AppSettings["SMSLicenseKey"]);
        Quartz.Communication.qCom_SMSMessageLog sendLong = new Quartz.Communication.qCom_SMSMessageLog();

        // send message + add log
        if (smsMode == "did")
        {
            // use custom number + key
            string did = System.Configuration.ConfigurationManager.AppSettings["SMSDid"];
            Quartz.Communication.CDYNE.SMSResponse[] response = Quartz.Communication.qCom_SMSMessage.SendSMSAdvancedSendMessage(userMobile, smsMessage, authToken, did, 0, false);
            sendLong.Insert(1, DateTime.Now, user.UserID, 0, smsMessageURI, userMobile, did, smsMessage, "sent", Convert.ToString(response[0].MessageID), 0, 0, "", false, false, 0, false, false, 0, string.Empty);
        }

        lblMessage.Text += "Finished sending text message to " + userMobile + "<br>";

        lblMessage.Visible = true;
    }