public static Com.DataPack.DataRsp <string> schsubsave(string arr) { Com.DataPack.DataRsp <string> rsp = new Com.DataPack.DataRsp <string>(); if (Com.Session.userid == null) { rsp.code = "expire"; rsp.msg = "页面已经过期,请重新登录"; } else { try { string[] datas = arr.Split('|'); if (datas[1] == "1" && DateTime.Parse(datas[2]) < DateTime.Now.AddDays(-1))//开启状态,则判断时间是否准确 { rsp.code = "error"; rsp.msg = "时间选择不正确"; } else { SchSystem.BLL.SchInfo schbll = new SchSystem.BLL.SchInfo(); if (datas[1] == "1") { schbll.UpdateSchXXTOpen(int.Parse(datas[0]), DateTime.Parse(datas[2]), "支撑操作开启"); } else { schbll.UpdateSchXXTClose(int.Parse(datas[0]), "支撑操作关闭"); } rsp.code = "success"; rsp.msg = "操作成功"; } } catch (Exception ex) { rsp.code = "error"; rsp.msg = ex.Message; } } return(rsp); }