示例#1
0
 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
     {
         string[] datas = arr.Split('|');
         try
         {
             if (datas.Length > 1)
             {
                 SchSystem.BLL.SchInfo schbll = new SchSystem.BLL.SchInfo();
                 schbll.UpdateSchXXTServStat(int.Parse(datas[0]), int.Parse(datas[1]));
                 rsp.code = "success";
                 rsp.msg  = "操作成功";
             }
         }
         catch (Exception ex)
         {
             rsp.code = "error";
             rsp.msg  = ex.Message;
         }
     }
     return(rsp);
 }
示例#2
0
 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
     {
         string[] datas = arr.Split('|');
         if (datas[1] == "1" && DateTime.Parse(datas[2]) < DateTime.Now.AddDays(-1))//开启状态,则判断时间是否准确
         {
             rsp.code = "error";
             rsp.msg  = "结束时间小于当前时间,请重新选择";
         }
         try
         {
             SchSystem.BLL.SchInfo schbll = new SchSystem.BLL.SchInfo();
             if (datas[1] == "1")
             {
                 schbll.UpdateSonSysOpen(int.Parse(datas[0]), DateTime.Parse(datas[2]), "支撑操作开启");
                 //自动更新家校互通平台的数据维护人信息
                 schbll.UpdateSchXXTServStat(int.Parse(datas[0]), int.Parse(datas[1]));
             }
             else
             {
                 schbll.UpdateSonSysClose(int.Parse(datas[0]), "支撑操作关闭");
             }
             rsp.code = "success";
             rsp.msg  = "操作成功";
         }
         catch (Exception ex)
         {
             rsp.code = "error";
             rsp.msg  = ex.Message;
         }
     }
     return(rsp);
 }