public IAsyncResult BeginProcessRequest(HttpContext context, AsyncCallback cb, object extraData)
        {
            m_request = context.Request;
            m_response = context.Response;
            m_cookieCollection = context.Request.Cookies;
            m_asyncResult = new NuxleusAsyncResult(cb, extraData);
            bool success = true;

            Dictionary<string, string> cookieDictionary = Nuxleus.Web.Utility.GetCookieValues(m_cookieCollection, out success, sessionCookies.ToArray());

            string ip = m_request.UserHostAddress.ToString();

            string currentUserId = String.Empty;
            if (cookieDictionary.TryGetValue("userid", out currentUserId))
            {
                DeleteAttributesTask task = new DeleteAttributesTask { DomainName = "event", ItemName = m_request.QueryString["eventid"], Attribute = deleteAttributes };
                IResponse response = task.Invoke();

                DeleteAttributesResult result = (DeleteAttributesResult)response.Result;

                SelectTask selectTask = new SelectTask { DomainName = new Domain { Name = "event" }, SelectExpression = String.Format("select * from event where eventcreator = '{0}'", currentUserId) };
                IResponse selectResponse = selectTask.Invoke();

                SelectResult selectResult = (SelectResult)selectResponse.Result;

                List<AwsSdbModel.Attribute> attributes = new List<AwsSdbModel.Attribute>();

                WriteDebugXmlToOutputStream(selectResult.Item);
            }


            m_asyncResult.CompleteCall();
            return m_asyncResult;
        }
        public IAsyncResult BeginProcessRequest(HttpContext context, AsyncCallback cb, object extraData)
        {
            m_request = context.Request;
            m_response = context.Response;
            m_cookieCollection = context.Request.Cookies;
            String sessionid = m_cookieCollection["sessionid"].Value;
            String userid = m_cookieCollection["userid"].Value;
            String username = m_cookieCollection["username"].Value;
            String name = m_cookieCollection["name"].Value;
            String collection_id = m_request.QueryString["media-collection"];
            //String uservalidated = m_cookieCollection["uservalidated"].Value;

            string ip = m_request.UserHostAddress.ToString();

            m_task = new SelectTask { DomainName = new Domain { Name = "media" }, SelectExpression = String.Format("select * from media where mediacreator = '{0}' and CollectionId = '{1}'", userid, collection_id) };
            m_iTaskResult = new NuxleusAsyncResult(cb, extraData);
            
            m_task.Transaction.OnSuccessfulTransaction += new OnSuccessfulTransaction(Transaction_OnSuccessfulTransaction);
            m_task.Transaction.OnFailedTransaction += new OnFailedTransaction(Transaction_OnFailedTransaction);
            return m_task.BeginInvoke(m_iTaskResult);
        }
        public IAsyncResult BeginProcessRequest(HttpContext context, AsyncCallback cb, object extraData)
        {
            m_request = context.Request;
            m_response = context.Response;
            m_cookieCollection = context.Request.Cookies;
            m_asyncResult = new NuxleusAsyncResult(cb, extraData);
            bool success = true;

            Dictionary<string, string> cookieDictionary = Nuxleus.Web.Utility.GetCookieValues(m_cookieCollection, out success, sessionCookies.ToArray());

            string ip = m_request.UserHostAddress.ToString();

            string currentUserId = String.Empty;
            if (cookieDictionary.TryGetValue("userid", out currentUserId))
            {
                m_task = new SelectTask { DomainName = new Domain { Name = "event" }, SelectExpression = String.Format("select * from event where eventcreator = '{0}'", currentUserId) };
                m_iTaskResult = new NuxleusAsyncResult(cb, extraData);
            
            m_task.Transaction.OnSuccessfulTransaction += new OnSuccessfulTransaction(Transaction_OnSuccessfulTransaction);
            m_task.Transaction.OnFailedTransaction += new OnFailedTransaction(Transaction_OnFailedTransaction);

            }
                        return m_task.BeginInvoke(m_iTaskResult);
        }
Exemple #4
0
        public IAsyncResult BeginProcessRequest(HttpContext context, AsyncCallback cb, object extraData)
        {
            m_request = context.Request;
            m_response = context.Response;
            m_cookieCollection = context.Response.Cookies;
            m_asyncResult = new NuxleusAsyncResult(cb, extraData);

            string ip = m_request.UserHostAddress.ToString();

            NameValueCollection form = m_request.Form;
            m_returnLocation = form.Get("return_url");

            email = form.Get("email");
            password = form.Get("password");
            sessionid = Guid.NewGuid().ToString();

            m_task = new SelectTask { DomainName = new Domain { Name = "account" }, SelectExpression = String.Format("select name,email,username,password from account where email = '{0}'", email) };
            m_iTaskResult = new NuxleusAsyncResult(cb, extraData);

            m_task.Transaction.OnSuccessfulTransaction += new OnSuccessfulTransaction(Transaction_OnSuccessfulTransaction);
            m_task.Transaction.OnFailedTransaction += new OnFailedTransaction(Transaction_OnFailedTransaction);
            return m_task.BeginInvoke(m_iTaskResult);

        }