using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TL.Common.Util; namespace S_manager
{
public partial class S_GetCheckMater : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string matterId = Request.Params["matterid"];
char[] chs = { ',' };
try
{
string[] str = matterId.Split(chs, StringSplitOptions.RemoveEmptyEntries);
string strcnn = ConfigurationManager.ConnectionStrings["conn"].ToString();
SQLHelper sqlHelper = new SQLHelper(strcnn);
for (int i = ; i < str.Length; i++)
{ //更新数据库的CheckId
string sql = "update growup.dbo.S_Matter set CheckId='1' where S_MatterId ='" + str[i] + "'";
DataSet ds_result = sqlHelper.QueryByCmd(sql);
//格式化查询结果
string json = JsonConvert.SerializeObject(ds_result);
//返回给前端
Response.Write(json);
}
}
catch { } }
}
}

前台发送字符串给后台,格式为(a,b,c,d),后台将字符串转换成数组遍历后进而更新CheckId的更多相关文章

  1. JS - 字符串转换成数组,数组转换成字符串

    1.字符串转换成数组: var arr = "1, 2, 3, 4, 5, 6"; arr.split(","); // ["1",&quo ...

  2. JS字符串去替换元素再转换成数组

    原创:转载需注明原创地址 https://www.cnblogs.com/fanerwei222/p/11648074.html JS字符串替换不必要的元素, 然后去除多余的空格, 转换成数组: va ...

  3. php 字符串内容是数组格式 转换成数组

    一个简单的应用.. 例, $str    =    "array( 'USD'=>'1', 'GBP'=>'0.6494', 'EUR'=>'0.7668' ,'JPY'= ...

  4. php吧字符串直接转换成数组处理

    $str ='123456'; echo strlen($str) - 1; echo '<br>'; echo $str{strlen($str) - 1}; echo '<br& ...

  5. JS-如何把字符串转换成数组

    var a = "1,22,33,44"; // 字符串 var b = a.split(","); // 将字符串按照","分割,存入数组 ...

  6. xml转换为json格式时,如何将指定节点转换成数组 Json.NET

    使用Json.NET转换xml成json时,如果xml只有单个节点,但json要求是数组形式[], JsonConvert.SerializeXmlNode 并不能自动识别 示例如下: RecordA ...

  7. json.net xml转换为json格式时,如何将指定节点转换成数组

    using System.Xml.Linq; using Newtonsoft.Json; Response.ContentType = "application/json"; X ...

  8. js 判断是否为数组的方式 及 类数组转换成数组格式

    1. 判断是否为数组的通用方式 Object.prototype.toString.call(o)=='[object Array]' 其他方式: typeof ,  instanceof,  ary ...

  9. 数据处理 array json 格式 转换成 数组形式

    处理这种数据应该使用的方式是 this.cities= res.data.data.cities.sort((a,b)=>{ //排序 进行字母排序 return a.pinyin[0].cha ...

随机推荐

  1. 阿里云OneinStack,Linux下tomcat命令

    阿里云OneinStack,Linux下tomcat命令 Linux下如何查看tomcat是否启动在Linux系统下,重启Tomcat使用命令操作的首先,进入Tomcat下的bin目录cd /usr/ ...

  2. master page

    <?xml version="1.0"?><configuration>  <system.web>    <pages clientID ...

  3. svn使用方法介绍(1)

    TotoiseSVN的基本使用方法 在 项目管理实践教程一.工欲善其事,必先利其器[Basic Tools]中,我已经讲解了怎样安装TortoiseSVN.在上面的讲解中已经讲了怎么使用VisualS ...

  4. 基于webrtc的视频通话时webrtc的接口调用流程

    场景: 1.A call B 2.B answer 3.A connected with B 共同的步骤: A 和 B 都需要初始化webrtc模块,创建peerconnectionfactory 步 ...

  5. treegrid and datagrid ctrl or shift selectRow

    var tg = $('#tg');tg.treegrid({...}); // create treegridvar panel = tg.treegrid('getPanel');var body ...

  6. python matplotlib 中文显示参数设置

    python matplotlib 中文显示参数设置 方法一:每次编写代码时进行参数设置 #coding:utf-8import matplotlib.pyplot as pltplt.rcParam ...

  7. [poj2528] Mayor's posters (线段树+离散化)

    线段树 + 离散化 Description The citizens of Bytetown, AB, could not stand that the candidates in the mayor ...

  8. Maven学习(五)-- 聚合与继承

    标签(空格分隔): 学习笔记 Maven的聚合特性能够把项目的各个模块聚合在一起构建: Maven的继承特性能够帮助抽取各模块相同的依赖和插件等配置,在简化POM的同时,还能够促进各个模块配置的一致性 ...

  9. 凯撒密码加密C语言简单实现

    凯撒加密(Julius Caesar)该方法把一条消息中的每个字母用字母表中固定距离之后的那个字母代替.(如果超越了字母Z,会绕道字母表的起始位置.例如,如果每个字母都用字母表中两个位置之后的字母代替 ...

  10. java 代理模式二:动态代理

    java动态代理: java动态代理类位于java.lang.reflect包下,一般主要涉及两个类: 1.Interface InvocationHandler 该接口中仅定义了一个方法:Objec ...