Ejemplo n.º 1
0
        private void Upd_Type_ByID(HttpContext context)
        {
            String jSonString = "";

            try {
                AlbumsBO albumsBO = new AlbumsBO();
                int      id       = Convert.ToInt32(context.Request.QueryString["ID"]);
                int      type     = Convert.ToInt32(context.Request.QueryString["Type"]);
                int      ret      = albumsBO.Upd_Type_ByID(id, type);
                if (ret == 0)
                {
                    jSonString = "{\"status\":\"error|" + ret + "\"}";
                }
                if (ret != 0)
                {
                    jSonString = "{\"status\": \"success\"}";
                }
            }
            catch (Exception ex) {
                jSonString = "{\"status\":\"error\" ,\"message\":\"" + ex.Message + "\"}";
            }
            finally {
                context.Response.Write(jSonString);
            }
        }