Пример #1
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "application/json";
            string strID = context.Request.Params[0].ToString();
            int ID = 0;
            int writeContent =0;
            if (strID.StartsWith("Question"))
            {
                if (int.TryParse(strID.Replace("Question", ""), out ID))
                {
                    CY.CSTS.Core.Business.VoteAnswer voteAnswer = new CY.CSTS.Core.Business.VoteAnswer();
                    string contentAnswer = context.Request.Params[1].ToString().Trim();

                    voteAnswer.VoteItemID = ID;
                    voteAnswer.VoteAnswerContent = contentAnswer;

                    voteAnswer.Save();

                    writeContent = voteAnswer.GetMaxID();
                }
            }
            context.Response.Write(writeContent.ToString());
        }