Esempio n. 1
0
        public void ProcessRequest(HttpContext context)
        {
            bool     value   = false;
            string   message = "Fail!";
            XElement result  = new XElement("Result");
            int      total   = 0;

            try
            {
                int page        = int.Parse(context.Request["page"]);
                int size        = int.Parse(context.Request["size"]);
                int order       = int.Parse(context.Request["order"]);
                int consortiaID = int.Parse(context.Request["consortiaID"]);
                int applyID     = int.Parse(context.Request["applyID"]);
                int userID      = int.Parse(context.Request["userID"]);

                using (ConsortiaBussiness db = new ConsortiaBussiness())
                {
                    ConsortiaApplyUserInfo[] infos = db.GetConsortiaApplyUserPage(page, size, ref total, order, consortiaID, applyID, userID);
                    foreach (ConsortiaApplyUserInfo info in infos)
                    {
                        result.Add(FlashUtils.CreateConsortiaApplyUserInfo(info));
                    }

                    value   = true;
                    message = "Success!";
                }
            }
            catch (Exception ex)
            {
                log.Error("ConsortiaApplyUsersList", ex);
            }

            result.Add(new XAttribute("total", total));
            result.Add(new XAttribute("value", value));
            result.Add(new XAttribute("message", message));

            context.Response.ContentType = "text/plain";
            context.Response.Write(result.ToString(false));
        }
Esempio n. 2
0
        public static void Process(IHttpRequest Request, IHttpResponse Response)
        {
            bool     value   = false;
            string   message = "Fail!";
            XElement result  = new XElement("Result");
            int      total   = 0;

            try
            {
                int page        = int.Parse(Request.Uri.QueryString["page"]);
                int size        = int.Parse(Request.Uri.QueryString["size"]);
                int order       = int.Parse(Request.Uri.QueryString["order"]);
                int consortiaID = int.Parse(Request.Uri.QueryString["consortiaID"]);
                int applyID     = int.Parse(Request.Uri.QueryString["applyID"]);
                int userID      = int.Parse(Request.Uri.QueryString["userID"]);
                using (ConsortiaBussiness db = new ConsortiaBussiness())
                {
                    ConsortiaApplyUserInfo[] infos = db.GetConsortiaApplyUserPage(page, size, ref total, order, consortiaID, applyID, userID);
                    ConsortiaApplyUserInfo[] array = infos;
                    for (int i = 0; i < array.Length; i++)
                    {
                        ConsortiaApplyUserInfo info = array[i];
                        result.Add(FlashUtils.CreateConsortiaApplyUserInfo(info));
                    }
                    value   = true;
                    message = "Success!";
                }
            }
            catch (Exception ex)
            {
            }
            result.Add(new XAttribute("total", total));
            result.Add(new XAttribute("vaule", value));
            result.Add(new XAttribute("message", message));
            Response.Write(result.ToString(false));
        }